1
0
mirror of https://github.com/Ombi-app/Ombi.git synced 2025-03-12 04:35:27 -07:00
Jamie Rees cc98fc6aca
feat(wizard): Added the ability to start with a different database ()
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-01-03 16:19:53 +00:00

55 lines
1.4 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.databaseTab.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.databaseTab.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-3').should('have.attr', 'aria-selected', 'true');
});
});