From 5d6391974ceab446bc200bef579630b84211b67a Mon Sep 17 00:00:00 2001 From: Arthur Suzuki Date: Fri, 17 Jan 2025 16:18:17 +0100 Subject: [PATCH] Bug 36372: (QA follow-up) fix Cypress tests --- t/cypress/integration/Catalogue/Detail_spec.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/t/cypress/integration/Catalogue/Detail_spec.ts b/t/cypress/integration/Catalogue/Detail_spec.ts index b3cd2b90177..cc9ef427c97 100644 --- a/t/cypress/integration/Catalogue/Detail_spec.ts +++ b/t/cypress/integration/Catalogue/Detail_spec.ts @@ -13,15 +13,18 @@ describe("Set record_source button is present", () => { }); after(() => { - cy.visit("/cgi-bin/koha/cataloguing/record_source.pl?biblionumber=51"); - cy.get("select").select("No specified source"); - cy.get("input[type=submit]").click(); + cy.visit("/cgi-bin/koha/catalogue/detail.pl?biblionumber=51"); + cy.get("div#toolbar div:nth-child(2) ul").invoke("show"); + cy.get("a#setrecordsource").click(); + cy.get("select#record_source_id").select("No specified source"); + cy.get("div#setRecordSourceModal") + .contains("Set record source") + .click(); cy.intercept("GET", "/api/v1/record_sources*").as("listSources"); cy.visit("/cgi-bin/koha/admin/record_sources"); cy.wait("@listSources"); cy.get("tr:last-child a.delete").click(); - cy.contains("Poop"); cy.get("button.approve").click(); }); @@ -30,7 +33,9 @@ describe("Set record_source button is present", () => { cy.contains("Edit").click(); cy.contains("Set record source").click(); cy.get("#record_source_id").select("Poop"); - cy.contains("Set record source").click(); + cy.get("div#setRecordSourceModal") + .contains("Set record source") + .click(); cy.visit("/cgi-bin/koha/catalogue/detail.pl?biblionumber=51"); cy.get("#catalogue_detail_record_source").contains("Poop"); }); -- 2.39.5