Bugzilla – Attachment 171176 Details for
Bug 35402
Update the OPAC and staff interface to Bootstrap 5
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35402: Fix cypress tests
Bug-35402-Fix-cypress-tests.patch (text/plain), 11.82 KB, created by
Jonathan Druart
on 2024-09-09 08:32:48 UTC
(
hide
)
Description:
Bug 35402: Fix cypress tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-09-09 08:32:48 UTC
Size:
11.82 KB
patch
obsolete
>From bd3bb23a8881da758394ebeeafa38edc681edcb6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 9 Sep 2024 10:20:36 +0200 >Subject: [PATCH] Bug 35402: Fix cypress tests > >--- > t/cypress/integration/Admin/RecordSources_spec.ts | 2 +- > t/cypress/integration/ERM/Agreements_spec.ts | 6 +++--- > t/cypress/integration/ERM/DataProviders_spec.ts | 6 +++--- > t/cypress/integration/ERM/Dialog_spec.ts | 6 ++++-- > t/cypress/integration/ERM/Licenses_spec.ts | 12 +++++++++--- > t/cypress/integration/ERM/Packages_spec.ts | 12 +++++++++--- > t/cypress/integration/ERM/Searchbar_spec.ts | 10 +++++----- > t/cypress/integration/ERM/Titles_spec.ts | 6 +++--- > 8 files changed, 37 insertions(+), 23 deletions(-) > >diff --git a/t/cypress/integration/Admin/RecordSources_spec.ts b/t/cypress/integration/Admin/RecordSources_spec.ts >index 8a4278e4996..298eb186120 100644 >--- a/t/cypress/integration/Admin/RecordSources_spec.ts >+++ b/t/cypress/integration/Admin/RecordSources_spec.ts >@@ -161,7 +161,7 @@ describe("Record sources CRUD tests", () => { > cy.get("#record_sources_list table tbody tr:nth-child(2n+2)") > .contains("Delete") > .click(); >- cy.get(".dialog.alert.confirmation h1").contains( >+ cy.get(".alert-warning.confirmation h1").contains( > "Are you sure you want to delete this record source?" > ); > cy.contains("Source 2"); >diff --git a/t/cypress/integration/ERM/Agreements_spec.ts b/t/cypress/integration/ERM/Agreements_spec.ts >index cc720f6a31b..626bbb8f089 100644 >--- a/t/cypress/integration/ERM/Agreements_spec.ts >+++ b/t/cypress/integration/ERM/Agreements_spec.ts >@@ -575,7 +575,7 @@ describe("Agreement CRUD operations", () => { > cy.get("#agreements_list table tbody tr:first") > .contains("Delete") > .click(); >- cy.get(".dialog.alert.confirmation h1").contains( >+ cy.get(".alert-warning.confirmation h1").contains( > "remove this agreement" > ); > cy.contains(agreement.name); >@@ -597,7 +597,7 @@ describe("Agreement CRUD operations", () => { > cy.get("#agreements_list table tbody tr:first") > .contains("Delete") > .click(); >- cy.get(".dialog.alert.confirmation h1").contains( >+ cy.get(".alert-warning.confirmation h1").contains( > "remove this agreement" > ); > cy.contains("Yes, delete").click(); >@@ -634,7 +634,7 @@ describe("Agreement CRUD operations", () => { > ); > > cy.get("#agreements_show #toolbar").contains("Delete").click(); >- cy.get(".dialog.alert.confirmation h1").contains( >+ cy.get(".alert-warning.confirmation h1").contains( > "remove this agreement" > ); > cy.contains("Yes, delete").click(); >diff --git a/t/cypress/integration/ERM/DataProviders_spec.ts b/t/cypress/integration/ERM/DataProviders_spec.ts >index 3f4c3ac92bf..d0c2078ac2d 100644 >--- a/t/cypress/integration/ERM/DataProviders_spec.ts >+++ b/t/cypress/integration/ERM/DataProviders_spec.ts >@@ -319,7 +319,7 @@ describe("Data provider CRUD operations", () => { > cy.get("#usage_data_providers_list table tbody tr:first") > .contains("Delete") > .click(); >- cy.get(".dialog.alert.confirmation h1").contains( >+ cy.get(".alert-warning.confirmation h1").contains( > "remove this data provider" > ); > cy.contains(dataProvider.name); >@@ -342,7 +342,7 @@ describe("Data provider CRUD operations", () => { > // cy.get("#usage_data_providers_list table tbody tr:first") > // .contains("Delete") > // .click(); >- // cy.get(".dialog.alert.confirmation h1").contains( >+ // cy.get(".alert-warning.confirmation h1").contains( > // "remove this data provider" > // ); > cy.contains("Yes, delete").click(); >@@ -386,7 +386,7 @@ describe("Data provider CRUD operations", () => { > cy.get("#usage_data_providers_show #toolbar") > .contains("Delete") > .click(); >- cy.get(".dialog.alert.confirmation h1").contains( >+ cy.get(".alert-warning.confirmation h1").contains( > "remove this data provider" > ); > cy.contains("Yes, delete").click(); >diff --git a/t/cypress/integration/ERM/Dialog_spec.ts b/t/cypress/integration/ERM/Dialog_spec.ts >index 8638bc3040d..89e0ef8285c 100644 >--- a/t/cypress/integration/ERM/Dialog_spec.ts >+++ b/t/cypress/integration/ERM/Dialog_spec.ts >@@ -156,7 +156,7 @@ describe("Dialog operations", () => { > .contains("Delete") > .click(); > cy.contains("No, do not delete").click(); >- cy.get(".dialog.alert.confirmation h1").should("not.exist"); >+ cy.get(".alert-warning.confirmation h1").should("not.exist"); > cy.get("main div[class='alert alert-info']").contains( > "Package updated" > ); >@@ -169,7 +169,9 @@ describe("Dialog operations", () => { > cy.get("#packages_list table tbody tr:first") > .contains("Delete") > .click(); >- cy.get(".dialog.alert.confirmation h1").contains("remove this package"); >+ cy.get(".alert-warning.confirmation h1").contains( >+ "remove this package" >+ ); > cy.contains("Yes, delete").click(); > cy.get("main div[class='alert alert-info']") > .contains("Local package") >diff --git a/t/cypress/integration/ERM/Licenses_spec.ts b/t/cypress/integration/ERM/Licenses_spec.ts >index a2176146c2f..ae189b640e1 100644 >--- a/t/cypress/integration/ERM/Licenses_spec.ts >+++ b/t/cypress/integration/ERM/Licenses_spec.ts >@@ -304,7 +304,9 @@ describe("License CRUD operations", () => { > cy.get("#licenses_list table tbody tr:first") > .contains("Delete") > .click(); >- cy.get(".dialog.alert.confirmation h1").contains("remove this license"); >+ cy.get(".alert-warning.confirmation h1").contains( >+ "remove this license" >+ ); > cy.contains(license.name); > > // Accept the confirmation dialog, get 500 >@@ -324,7 +326,9 @@ describe("License CRUD operations", () => { > cy.get("#licenses_list table tbody tr:first") > .contains("Delete") > .click(); >- cy.get(".dialog.alert.confirmation h1").contains("remove this license"); >+ cy.get(".alert-warning.confirmation h1").contains( >+ "remove this license" >+ ); > cy.contains("Yes, delete").click(); > cy.get("main div[class='alert alert-info']") > .contains("License") >@@ -357,7 +361,9 @@ describe("License CRUD operations", () => { > cy.get("#licenses_show h2").contains("License #" + license.license_id); > > cy.get("#licenses_show #toolbar").contains("Delete").click(); >- cy.get(".dialog.alert.confirmation h1").contains("remove this license"); >+ cy.get(".alert-warning.confirmation h1").contains( >+ "remove this license" >+ ); > cy.contains("Yes, delete").click(); > > //Make sure we return to list after deleting from show >diff --git a/t/cypress/integration/ERM/Packages_spec.ts b/t/cypress/integration/ERM/Packages_spec.ts >index ecf78b05666..746b5b3bd11 100644 >--- a/t/cypress/integration/ERM/Packages_spec.ts >+++ b/t/cypress/integration/ERM/Packages_spec.ts >@@ -299,7 +299,9 @@ describe("Package CRUD operations", () => { > cy.get("#packages_list table tbody tr:first") > .contains("Delete") > .click(); >- cy.get(".dialog.alert.confirmation h1").contains("remove this package"); >+ cy.get(".alert-warning.confirmation h1").contains( >+ "remove this package" >+ ); > cy.contains(erm_package.name); > > // Accept the confirmation dialog, get 500 >@@ -319,7 +321,9 @@ describe("Package CRUD operations", () => { > cy.get("#packages_list table tbody tr:first") > .contains("Delete") > .click(); >- cy.get(".dialog.alert.confirmation h1").contains("remove this package"); >+ cy.get(".alert-warning.confirmation h1").contains( >+ "remove this package" >+ ); > cy.contains("Yes, delete").click(); > cy.get("main div[class='alert alert-info']") > .contains("Local package") >@@ -356,7 +360,9 @@ describe("Package CRUD operations", () => { > ); > > cy.get("#packages_show #toolbar").contains("Delete").click(); >- cy.get(".dialog.alert.confirmation h1").contains("remove this package"); >+ cy.get(".alert-warning.confirmation h1").contains( >+ "remove this package" >+ ); > cy.contains("Yes, delete").click(); > > //Make sure we return to list after deleting from show >diff --git a/t/cypress/integration/ERM/Searchbar_spec.ts b/t/cypress/integration/ERM/Searchbar_spec.ts >index 0023c0292d6..f2c12f89960 100644 >--- a/t/cypress/integration/ERM/Searchbar_spec.ts >+++ b/t/cypress/integration/ERM/Searchbar_spec.ts >@@ -13,24 +13,24 @@ describe("Searchbar header changes", () => { > > it("Default option is agreements", () => { > cy.visit("/cgi-bin/koha/erm/erm.pl"); >- cy.get("#agreement_search-tab").parent().should("have.class", "active"); >+ cy.get("#agreement_search-tab").should("have.class", "active"); > > cy.visit("/cgi-bin/koha/erm/agreements"); >- cy.get("#agreement_search-tab").parent().should("have.class", "active"); >+ cy.get("#agreement_search-tab").should("have.class", "active"); > }); > > it("Should change to licenses when in licenses", () => { > cy.visit("/cgi-bin/koha/erm/licenses"); >- cy.get("#license_search-tab").parent().should("have.class", "active"); >+ cy.get("#license_search-tab").should("have.class", "active"); > }); > > it("Should change to packages when in local packages", () => { > cy.visit("/cgi-bin/koha/erm/eholdings/local/packages"); >- cy.get("#package_search-tab").parent().should("have.class", "active"); >+ cy.get("#package_search-tab").should("have.class", "active"); > }); > > it("Should change to titles when in local titles", () => { > cy.visit("/cgi-bin/koha/erm/eholdings/local/titles"); >- cy.get("#title_search-tab").parent().should("have.class", "active"); >+ cy.get("#title_search-tab").should("have.class", "active"); > }); > }); >diff --git a/t/cypress/integration/ERM/Titles_spec.ts b/t/cypress/integration/ERM/Titles_spec.ts >index 2ff2240b1a2..6d19e87a9d8 100644 >--- a/t/cypress/integration/ERM/Titles_spec.ts >+++ b/t/cypress/integration/ERM/Titles_spec.ts >@@ -452,7 +452,7 @@ describe("Title CRUD operations", () => { > cy.visit("/cgi-bin/koha/erm/eholdings/local/titles"); > > cy.get("#titles_list table tbody tr:first").contains("Delete").click(); >- cy.get(".dialog.alert.confirmation h1").contains("remove this title"); >+ cy.get(".alert-warning.confirmation h1").contains("remove this title"); > cy.contains(erm_title.publication_title); > > // Accept the confirmation dialog, get 500 >@@ -470,7 +470,7 @@ describe("Title CRUD operations", () => { > body: null, > }); > cy.get("#titles_list table tbody tr:first").contains("Delete").click(); >- cy.get(".dialog.alert.confirmation h1").contains("remove this title"); >+ cy.get(".alert-warning.confirmation h1").contains("remove this title"); > cy.contains("Yes, delete").click(); > cy.get("main div[class='alert alert-info']") > .contains("Local title") >@@ -515,7 +515,7 @@ describe("Title CRUD operations", () => { > ); > > cy.get("#eholdings_title_show #toolbar").contains("Delete").click(); >- cy.get(".dialog.alert.confirmation h1").contains("remove this title"); >+ cy.get(".alert-warning.confirmation h1").contains("remove this title"); > cy.contains("Yes, delete").click(); > > //Make sure we return to list after deleting from show >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35402
:
170651
|
170709
|
170710
|
170711
|
170712
|
170714
|
170715
|
170716
|
170717
|
170745
|
170768
|
170877
|
170905
|
170962
|
170963
| 171176