This commit is contained in:
tidusjar 2022-12-02 16:26:03 +00:00
commit 618a775eb3
7 changed files with 404 additions and 2969 deletions

View 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"

View 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();
});

View file

@ -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);