Bugzilla – Attachment 179636 Details for
Bug 37273
Add ID column to Agreements table in the ERM
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37273: Fix Cypress tests
Bug-37273-Fix-Cypress-tests.patch (text/plain), 4.39 KB, created by
Jonathan Druart
on 2025-03-24 09:33:24 UTC
(
hide
)
Description:
Bug 37273: Fix Cypress tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-03-24 09:33:24 UTC
Size:
4.39 KB
patch
obsolete
>From bfd593946852ec859052a61d10962f6f59b658b0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 24 Mar 2025 10:31:41 +0100 >Subject: [PATCH] Bug 37273: Fix Cypress tests > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/cypress/integration/ERM/Agreements_spec.ts | 31 ++++++++++---------- > t/cypress/integration/ERM/Licenses_spec.ts | 30 ++++++++++--------- > 2 files changed, 32 insertions(+), 29 deletions(-) > >diff --git a/t/cypress/integration/ERM/Agreements_spec.ts b/t/cypress/integration/ERM/Agreements_spec.ts >index 1d6dd91a255..6bbcb2cdf38 100644 >--- a/t/cypress/integration/ERM/Agreements_spec.ts >+++ b/t/cypress/integration/ERM/Agreements_spec.ts >@@ -534,13 +534,14 @@ describe("Agreement CRUD operations", () => { > "get-agreement" > ); > cy.visit("/cgi-bin/koha/erm/agreements"); >- let name_link = cy.get( >- "#agreements_list table tbody tr:first td:first a" >- ); >- name_link.should( >- "have.text", >- agreement.name + " (#" + agreement.agreement_id + ")" >- ); >+ let id_cell = cy.get("#agreements_list table tbody tr:first td:first"); >+ id_cell.contains(agreement.agreement_id); >+ >+ let name_link = cy >+ .get("#agreements_list table tbody tr:first td") >+ .eq(1) >+ .find("a"); >+ name_link.should("have.text", agreement.name); > name_link.click(); > cy.wait("@get-agreement"); > cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet! >@@ -618,14 +619,14 @@ describe("Agreement CRUD operations", () => { > cy.intercept("GET", "/api/v1/erm/agreements/*", agreement).as( > "get-agreement" > ); >- cy.visit("/cgi-bin/koha/erm/agreements"); >- let name_link = cy.get( >- "#agreements_list table tbody tr:first td:first a" >- ); >- name_link.should( >- "have.text", >- agreement.name + " (#" + agreement.agreement_id + ")" >- ); >+ let id_cell = cy.get("#agreements_list table tbody tr:first td:first"); >+ id_cell.contains(agreement.agreement_id); >+ >+ let name_link = cy >+ .get("#agreements_list table tbody tr:first td") >+ .eq(1) >+ .find("a"); >+ name_link.should("have.text", agreement.name); > name_link.click(); > cy.wait("@get-agreement"); > cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet! >diff --git a/t/cypress/integration/ERM/Licenses_spec.ts b/t/cypress/integration/ERM/Licenses_spec.ts >index 361dfa94bff..170d28e3eed 100644 >--- a/t/cypress/integration/ERM/Licenses_spec.ts >+++ b/t/cypress/integration/ERM/Licenses_spec.ts >@@ -246,13 +246,14 @@ describe("License CRUD operations", () => { > "get-license" > ); > cy.visit("/cgi-bin/koha/erm/licenses"); >- let name_link = cy.get( >- "#licenses_list table tbody tr:first td:first a" >- ); >- name_link.should( >- "have.text", >- license.name + " (#" + license.license_id + ")" >- ); >+ let id_cell = cy.get("#licenses_list table tbody tr:first td:first"); >+ id_cell.contains(license.license_id); >+ >+ let name_link = cy >+ .get("#licenses_list table tbody tr:first td") >+ .eq(1) >+ .find("a"); >+ name_link.should("have.text", license.name); > name_link.click(); > cy.wait("@get-license"); > cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet! >@@ -323,13 +324,14 @@ describe("License CRUD operations", () => { > "get-license" > ); > cy.visit("/cgi-bin/koha/erm/licenses"); >- let name_link = cy.get( >- "#licenses_list table tbody tr:first td:first a" >- ); >- name_link.should( >- "have.text", >- license.name + " (#" + license.license_id + ")" >- ); >+ let id_cell = cy.get("#licenses_list table tbody tr:first td:first"); >+ id_cell.contains(license.license_id); >+ >+ let name_link = cy >+ .get("#licenses_list table tbody tr:first td") >+ .eq(1) >+ .find("a"); >+ name_link.should("have.text", license.name); > name_link.click(); > cy.wait("@get-license"); > cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet! >-- >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 37273
:
168606
|
169107
|
172137
|
176740
|
176741
|
178507
|
179119
| 179636