diff --git a/tests/cypress/integration/page-objects/details/tv/tvdetails.page.ts b/tests/cypress/integration/page-objects/details/tv/tvdetails.page.ts index 81de64e4e..1277eba93 100644 --- a/tests/cypress/integration/page-objects/details/tv/tvdetails.page.ts +++ b/tests/cypress/integration/page-objects/details/tv/tvdetails.page.ts @@ -75,8 +75,8 @@ class TvDetailsPage extends BasePage { return cy.get('#partiallyAvailableBtn'); } - get reportIssueButton(): Cypress.Chainable { - return cy.get('#reportIssueBtn'); + reportIssueButton(timeout: number): Cypress.Chainable { + return cy.get('#reportIssueBtn', { timeout: timeout}); } diff --git a/tests/cypress/tests/details/tv/tvdetails-buttons.spec.ts b/tests/cypress/tests/details/tv/tvdetails-buttons.spec.ts index ad56572ae..f4177d14d 100644 --- a/tests/cypress/tests/details/tv/tvdetails-buttons.spec.ts +++ b/tests/cypress/tests/details/tv/tvdetails-buttons.spec.ts @@ -67,13 +67,13 @@ describe("TV Details Buttons", () => { }); - it("Issues Enabled", () => { + it.only("Issues Enabled", () => { cy.intercept("GET", "**/Settings/issuesenabled", 'true').as('issuesEnabled'); cy.visit("/details/tv/1399"); cy.wait('@issuesEnabled'); - Page.reportIssueButton.should('be.visible'); + Page.reportIssueButton(10000).should('be.visible'); }); it("Issues Disabled", () => { @@ -81,6 +81,6 @@ describe("TV Details Buttons", () => { Page.visit("1399"); - Page.reportIssueButton.should('not.exist'); + Page.reportIssueButton(1000).should('not.exist'); }); }); diff --git a/tests/cypress/tests/discover/discover-cards-requests.spec.ts b/tests/cypress/tests/discover/discover-cards-requests.spec.ts index 6b330dfa5..1e8765994 100644 --- a/tests/cypress/tests/discover/discover-cards-requests.spec.ts +++ b/tests/cypress/tests/discover/discover-cards-requests.spec.ts @@ -17,6 +17,7 @@ describe("Discover Cards Requests Tests", () => { movie.requested = false; body[0] = movie; + console.log('sending res') res.send(body); }); }).as("cardsResponse"); @@ -24,7 +25,7 @@ describe("Discover Cards Requests Tests", () => { Page.visit(); cy.wait("@cardsResponse").then((res) => { - const body = JSON.parse(res.response.body); + const body = res.response.body; var expectedId = body[0].id; var title = body[0].title; @@ -76,7 +77,7 @@ describe("Discover Cards Requests Tests", () => { Page.visit(); cy.wait("@cardsResponse").then((res) => { - const body = JSON.parse(res.response.body); + const body = res.response.body var expectedId = body[6].id; var title = body[6].title; @@ -119,7 +120,7 @@ describe("Discover Cards Requests Tests", () => { Page.visit(); cy.wait("@cardsResponse").then((res) => { - const body = JSON.parse(res.response.body); + const body = res.response.body var expectedId = body[1].id; var title = body[1].title; @@ -151,7 +152,7 @@ describe("Discover Cards Requests Tests", () => { Page.visit(); cy.wait("@cardsResponse").then((res) => { - const body = JSON.parse(res.response.body); + const body = res.response.body var expectedId = body[1].id; var title = body[1].title; @@ -183,7 +184,7 @@ describe("Discover Cards Requests Tests", () => { Page.visit(); cy.wait("@cardsResponse").then((res) => { - const body = JSON.parse(res.response.body); + const body = res.response.body var expectedId = body[1].id; var title = body[1].title; @@ -220,7 +221,7 @@ describe("Discover Cards Requests Tests", () => { Page.visit(); cy.wait("@cardsResponse").then((res) => { - const body = JSON.parse(res.response.body); + const body = res.response.body var expectedId = body[1].id; var title = body[1].title; @@ -284,7 +285,7 @@ describe("Discover Cards Requests Tests", () => { cy.wait("@otherResponses"); cy.wait("@cardsResponse").then((res) => { - const body = JSON.parse(res.response.body); + const body = res.response.body var expectedId = body[3].id; var title = body[3].title; @@ -337,7 +338,7 @@ describe("Discover Cards Requests Tests", () => { cy.wait("@otherResponses"); cy.wait("@cardsResponse").then((res) => { - const body = JSON.parse(res.response.body); + const body = res.response.body var expectedId = body[5].id; var title = body[5].title; diff --git a/tests/cypress/tests/discover/discover-recently-requested.spec.ts b/tests/cypress/tests/discover/discover-recently-requested.spec.ts index b8bceb088..0fe3332d0 100644 --- a/tests/cypress/tests/discover/discover-recently-requested.spec.ts +++ b/tests/cypress/tests/discover/discover-recently-requested.spec.ts @@ -199,7 +199,7 @@ describe("Discover Recently Requested Tests", () => { }); }); - it.only("Approve Requested Tv Show", () => { + it("Approve Requested Tv Show", () => { cy.requestAllTv(71712); diff --git a/tests/cypress/tests/login/login.spec.ts b/tests/cypress/tests/login/login.spec.ts index e633712cf..0c45b6cbd 100644 --- a/tests/cypress/tests/login/login.spec.ts +++ b/tests/cypress/tests/login/login.spec.ts @@ -6,13 +6,17 @@ describe("Login Tests", () => { cy.landingSettings(false); cy.fixture("login/authenticationSettngs").then((settings) => { settings.enableOAuth = true; - cy.intercept("GET", "/Settings/Authentication", settings).as( + cy.intercept("GET", "api/v1/Settings/Authentication", (req) => { + req.reply((res) => { + res.send(settings); + }); + }).as( "authSettings" ); }); Page.visit(); - +cy.wait("@authSettings"); Page.plexSignInButton.should("be.visible"); Page.ombiSignInButton.should("be.visible"); }); @@ -21,7 +25,7 @@ describe("Login Tests", () => { cy.landingSettings(false); cy.fixture("login/authenticationSettngs").then((settings) => { settings.enableOAuth = false; - cy.intercept("GET", "/Settings/Authentication", settings).as( + cy.intercept("GET", "api/v1//Settings/Authentication", settings).as( "authSettings" ); }); diff --git a/tests/cypress/tests/navigation/navigation-bar.spec.ts b/tests/cypress/tests/navigation/navigation-bar.spec.ts index b633f6db4..6c7f80f6d 100644 --- a/tests/cypress/tests/navigation/navigation-bar.spec.ts +++ b/tests/cypress/tests/navigation/navigation-bar.spec.ts @@ -24,7 +24,7 @@ describe("Navigation Bar Tests", () => { cy.removeLogin(); cy.loginWithCreds(id, "a"); - cy.intercept("GET", "search/Movie/Popular").as("discoverLoad"); + cy.intercept("GET", "api/v2/search/Movie/Popular/**").as("discoverLoad"); Page.visit(); cy.wait("@discoverLoad"); diff --git a/tests/cypress/tests/user-preferences/user-preferences-profile.spec.ts b/tests/cypress/tests/user-preferences/user-preferences-profile.spec.ts index a53af7cfa..f435f7c94 100644 --- a/tests/cypress/tests/user-preferences/user-preferences-profile.spec.ts +++ b/tests/cypress/tests/user-preferences/user-preferences-profile.spec.ts @@ -12,7 +12,7 @@ const langs = [ ]; langs.forEach((l) => { - it.only(`Change language to ${l.code}, UI should update`, () => { + it(`Change language to ${l.code}, UI should update`, () => { cy.intercept('POST','**/language').as('langSave'); Page.visit();