Ombi/tests/cypress/features/01-wizard/wizard.ts
Jamie 21bfc5a45a
fix: More automation tests mainly around the Plex Settings page (#4821)
* updates

* test coverage on the plex settings page

* features

* Update cypress.yml

* Update cypress.yml

* Update cypress.yml

* Update cypress.config.ts

* fixes

* stuff

* put it back

* a

* always kill docker

* Run the wizard as part of the feature files

* fix?

* slow the tests down

* subby

* Update user-preferences-profile.spec.ts

* Update user-preferences-profile.spec.ts
2023-06-20 14:03:49 +01:00

53 lines
1.3 KiB
TypeScript

import { Given, When, Then } from "@badeball/cypress-cucumber-preprocessor";
import { wizardPage as Page } from "@/integration/page-objects";
Given("I set the Landing Page to {string}", (bool) => {
cy.landingSettings(bool);
});
When("I visit Ombi", () => {
Page.visit();
});
When("I click through all of the pages", () => {
Page.welcomeTab.next.click();
Page.mediaServerTab.next.click();
Page.localUserTab.next.click();
Page.ombiConfigTab.next.click();
});
When("I finish the Wizard", () => {
Page.finishButton.click();
});
When("I click through to the user page", () => {
Page.welcomeTab.next.click();
Page.mediaServerTab.next.click();
});
When("I enter a username", () => {
Page.localUserTab.username.type(Cypress.env("username"));
});
When("I enter a password", () => {
Page.localUserTab.password.type(Cypress.env("password"));
});
When("I go to the finished tab", () => {
Page.localUserTab.next.click();
Page.ombiConfigTab.next.click();
});
Then("I should be on the {string}", (string) => {
cy.location("pathname").should("eq", `/${string}`);
});
Then("I should get a notification {string}", (string) => {
cy.verifyNotification(string);
});
Then("I should be on the User tab", () => {
Page.matStepsHeader.then((_) => {
cy.get('#cdk-step-label-0-2').should('have.attr', 'aria-selected', 'true');
});
});