mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 18:47:15 -07:00
features
This commit is contained in:
parent
dc0a66f4d8
commit
618a775eb3
7 changed files with 404 additions and 2969 deletions
13
tests/cypress/features/login.feature
Normal file
13
tests/cypress/features/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.ts
Normal file
19
tests/cypress/features/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();
|
||||
});
|
|
@ -1,20 +1,6 @@
|
|||
import { loginPage as Page } from "@/integration/page-objects";
|
||||
|
||||
describe("Login Tests", () => {
|
||||
it("Landing Page is enabled, should redirect", () => {
|
||||
cy.landingSettings(true);
|
||||
Page.visit();
|
||||
cy.location("pathname").should("eq", "/landingpage");
|
||||
cy.get("[data-cy=continue]").click();
|
||||
cy.location("pathname").should("contains", "/login");
|
||||
});
|
||||
|
||||
it("Landing Page is disabled, should not redirect", () => {
|
||||
cy.landingSettings(false);
|
||||
Page.visit();
|
||||
|
||||
cy.location("pathname").should("eq", "/login");
|
||||
});
|
||||
|
||||
it("Plex OAuth Enabled, should be button", () => {
|
||||
cy.landingSettings(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue