mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
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
This commit is contained in:
parent
5f60950802
commit
21bfc5a45a
36 changed files with 15340 additions and 18715 deletions
21
tests/cypress/features/01-wizard/wizard.feature
Normal file
21
tests/cypress/features/01-wizard/wizard.feature
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
Feature: Wizard Setup
|
||||
Scenario: When visiting Ombi for the first time we should be on the Wizard page
|
||||
When I visit Ombi
|
||||
Then I should be on the "Wizard"
|
||||
|
||||
Scenario: When navigating through the Wizard feature we are required to create a local user
|
||||
When I visit Ombi
|
||||
And I click through all of the pages
|
||||
And I finish the Wizard
|
||||
Then I should get a notification "Username '' is invalid, can only contain letters or digits."
|
||||
And I should be on the User tab
|
||||
|
||||
Scenario: Completing the Wizard
|
||||
When I visit Ombi
|
||||
And I click through to the user page
|
||||
And I enter a username
|
||||
And I enter a password
|
||||
And I go to the finished tab
|
||||
And I finish the Wizard
|
||||
Then I should be on the "login"
|
53
tests/cypress/features/01-wizard/wizard.ts
Normal file
53
tests/cypress/features/01-wizard/wizard.ts
Normal file
|
@ -0,0 +1,53 @@
|
|||
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');
|
||||
});
|
||||
});
|
13
tests/cypress/features/login/login.feature
Normal file
13
tests/cypress/features/login/login.feature
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
Feature: Login Page
|
||||
Scenario: When visiting Ombi and the Landing Page is enabled, we should end up on the landing page
|
||||
Given I set the Landing Page to "true"
|
||||
When I visit Ombi
|
||||
Then I should be on the "landingpage"
|
||||
Then I click continue
|
||||
Then I should be on the "login/true"
|
||||
|
||||
Scenario: When visiting Ombi and the Landing Page is disabled, we should end up on the login page
|
||||
Given I set the Landing Page to "false"
|
||||
When I visit Ombi
|
||||
Then I should be on the "login"
|
19
tests/cypress/features/login/login.ts
Normal file
19
tests/cypress/features/login/login.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { After, Before, Given, When, Then } from "@badeball/cypress-cucumber-preprocessor";
|
||||
import { loginPage as Page } from "@/integration/page-objects";
|
||||
|
||||
Given("I set the Landing Page to {string}", (bool) => {
|
||||
cy.landingSettings(bool);
|
||||
});
|
||||
|
||||
When("I visit Ombi", () => {
|
||||
Page.visit();
|
||||
});
|
||||
|
||||
Then("I should be on the {string}", (string) => {
|
||||
cy.location("pathname").should("eq", `/${string}`);
|
||||
|
||||
});
|
||||
|
||||
Then("I click continue", () => {
|
||||
cy.get("[data-cy=continue]").click();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue