mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
test: ✅ Updated automation tests
This commit is contained in:
parent
704252e885
commit
b6fa61b33d
3 changed files with 13 additions and 8 deletions
|
@ -23,6 +23,7 @@
|
|||
//
|
||||
// -- This will overwrite an existing command --
|
||||
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
||||
|
||||
import 'cypress-wait-until';
|
||||
|
||||
Cypress.Commands.add("landingSettings", (enabled) => {
|
||||
|
@ -66,7 +67,7 @@ Cypress.Commands.add('removeLogin', () => {
|
|||
});
|
||||
|
||||
Cypress.Commands.add('verifyNotification', (text) => {
|
||||
cy.contains(text);
|
||||
cy.contains(text, {timeout: 10000});
|
||||
});
|
||||
|
||||
Cypress.Commands.add('createUser', (username, password, claims) => {
|
||||
|
|
|
@ -10,7 +10,7 @@ describe("Movie Details Buttons", () => {
|
|||
|
||||
Page.adminOptionsDialog.requestButton.click();
|
||||
|
||||
cy.verifyNotification("Tom & Jerry (2021) has been successfully added");
|
||||
cy.verifyNotification("Request for Tom & Jerry has been added successfully");
|
||||
|
||||
Page.requestedButton.should("be.visible");
|
||||
});
|
||||
|
@ -26,7 +26,7 @@ describe("Movie Details Buttons", () => {
|
|||
Page.visit("651571");
|
||||
|
||||
Page.requestButton.click();
|
||||
cy.verifyNotification("Breach (2020) has been successfully added");
|
||||
cy.verifyNotification("Request for Breach has been added successfully");
|
||||
|
||||
Page.requestedButton.should("be.visible");
|
||||
});
|
||||
|
@ -62,7 +62,7 @@ describe("Movie Details Buttons", () => {
|
|||
Page.visit("793723");
|
||||
|
||||
Page.requestButton.click();
|
||||
cy.verifyNotification("Sentinelle (2021) has been successfully added");
|
||||
cy.verifyNotification("Request for Sentinelle has been added successfully");
|
||||
|
||||
Page.requestedButton.should("be.visible");
|
||||
|
||||
|
@ -90,7 +90,7 @@ describe("Movie Details Buttons", () => {
|
|||
Page.adminOptionsDialog.isOpen();
|
||||
Page.adminOptionsDialog.requestButton.click();
|
||||
cy.verifyNotification(
|
||||
"Harry Potter and the Deathly Hallows: Part 1 (2010) has been successfully added"
|
||||
"Request for Harry Potter and the Deathly Hallows: Part 1 has been added successfully"
|
||||
);
|
||||
|
||||
cy.reload();
|
||||
|
@ -98,6 +98,10 @@ describe("Movie Details Buttons", () => {
|
|||
Page.markAvailableButton.should("exist");
|
||||
Page.markAvailableButton.click();
|
||||
|
||||
cy.waitUntil(() => {
|
||||
return Page.availableButton.should("be.visible");
|
||||
})
|
||||
|
||||
cy.verifyNotification("Request is now available");
|
||||
Page.availableButton.should("exist");
|
||||
});
|
||||
|
@ -111,7 +115,7 @@ describe("Movie Details Buttons", () => {
|
|||
Page.adminOptionsDialog.isOpen();
|
||||
Page.adminOptionsDialog.requestButton.click();
|
||||
cy.verifyNotification(
|
||||
"Harry Potter and the Philosopher's Stone (2001) has been successfully added"
|
||||
"Request for Harry Potter and the Philosopher's Stone has been added successfully"
|
||||
);
|
||||
|
||||
cy.reload();
|
||||
|
|
|
@ -42,7 +42,7 @@ describe("Discover Cards Requests Tests", () => {
|
|||
Page.adminOptionsDialog.isOpen();
|
||||
Page.adminOptionsDialog.requestButton.click();
|
||||
|
||||
cy.verifyNotification("has been successfully added!");
|
||||
cy.verifyNotification("has been added successfully");
|
||||
|
||||
card.requestButton.should("not.exist");
|
||||
card.availabilityText.should("have.text", "Pending");
|
||||
|
@ -91,7 +91,7 @@ describe("Discover Cards Requests Tests", () => {
|
|||
card.requestButton.should("be.visible");
|
||||
card.requestButton.click();
|
||||
|
||||
cy.verifyNotification("has been successfully added!");
|
||||
cy.verifyNotification("has been added successfully");
|
||||
|
||||
card.requestButton.should("not.exist");
|
||||
card.availabilityText.should("have.text", "Pending");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue