Bugzilla – Attachment 188640 Details for
Bug 39320
Create a 'landing page' for ERM
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39320: (ERMCounts QA follow-up): Update Cypress
Bug-39320-ERMCounts-QA-follow-up-Update-Cypress.patch (text/plain), 3.62 KB, created by
Pedro Amorim
on 2025-10-30 12:52:23 UTC
(
hide
)
Description:
Bug 39320: (ERMCounts QA follow-up): Update Cypress
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-10-30 12:52:23 UTC
Size:
3.62 KB
patch
obsolete
>From ca29ddd5eae3551901e1c9d06966a91bdf03b042 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Thu, 30 Oct 2025 12:41:50 +0000 >Subject: [PATCH] Bug 39320: (ERMCounts QA follow-up): Update Cypress > >cypress run --spec t/cypress/integration/ERM/ModuleDashboard_spec.ts >--- > .../integration/ERM/ModuleDashboard_spec.ts | 64 +++++++++++++------ > 1 file changed, 46 insertions(+), 18 deletions(-) > >diff --git a/t/cypress/integration/ERM/ModuleDashboard_spec.ts b/t/cypress/integration/ERM/ModuleDashboard_spec.ts >index 50aeb90adaf..06baa502e99 100644 >--- a/t/cypress/integration/ERM/ModuleDashboard_spec.ts >+++ b/t/cypress/integration/ERM/ModuleDashboard_spec.ts >@@ -7,16 +7,41 @@ describe("ERM Module Dashboard", () => { > "/api/v1/erm/config", > '{"settings":{"ERMModule":"1","ERMProviders":["local"]}}' > ); >- cy.intercept("GET", "/api/v1/erm/counts", { >- counts: { >- agreements_count: 1, >- documents_count: 0, >- eholdings_packages_count: 0, >- eholdings_titles_count: 0, >- licenses_count: 5, >- usage_data_providers_count: 1, >+ >+ cy.intercept("GET", "/api/v1/erm/agreements*", { >+ statusCode: 200, >+ headers: { >+ "X-Total-Count": "1", >+ }, >+ }).as("getAgreementsCount"); >+ >+ cy.intercept("GET", "/api/v1/erm/eholdings/local/packages*", { >+ statusCode: 200, >+ headers: { >+ "X-Total-Count": "0", >+ }, >+ }).as("getPackagesCount"); >+ >+ cy.intercept("GET", "/api/v1/erm/eholdings/local/titles*", { >+ statusCode: 200, >+ headers: { >+ "X-Total-Count": "0", >+ }, >+ }).as("getTitlesCount"); >+ >+ cy.intercept("GET", "/api/v1/erm/licenses*", { >+ statusCode: 200, >+ headers: { >+ "X-Total-Count": "5", > }, >- }).as("getCounts"); >+ }).as("getLicensesCount"); >+ >+ cy.intercept("GET", "/api/v1/erm/usage_data_providers*", { >+ statusCode: 200, >+ headers: { >+ "X-Total-Count": "1", >+ }, >+ }).as("getDataProvidersCount"); > > cy.intercept( > "GET", >@@ -24,9 +49,13 @@ describe("ERM Module Dashboard", () => { > cy.get_eusage_reports() > ).as("getReports"); > >- cy.intercept("GET", "/api/v1/erm/licenses*", [cy.get_license()]).as( >- "getLicenses" >- ); >+ cy.intercept("GET", "/api/v1/erm/licenses*", { >+ statusCode: 200, >+ body: [cy.get_license()], >+ headers: { >+ "X-Total-Count": "5", >+ }, >+ }).as("getLicenses"); > > cy.intercept("GET", "/api/v1/jobs*", [ > { >@@ -98,14 +127,13 @@ describe("ERM Module Dashboard", () => { > cy.visit("/cgi-bin/koha/erm/erm.pl"); > > //Display >- cy.get(".widget#ERMCounts .widget-content").should( >- "contain", >- "Loading..." >- ); >- cy.wait("@getCounts"); >+ cy.wait("@getAgreementsCount"); >+ cy.wait("@getLicenses"); >+ cy.wait("@getPackagesCount"); >+ cy.wait("@getTitlesCount"); >+ cy.wait("@getDataProvidersCount"); > cy.get(".widget#ERMCounts .widget-content").contains("1 agreement"); > cy.get(".widget#ERMCounts .widget-content").contains("5 licenses"); >- cy.get(".widget#ERMCounts .widget-content").contains("0 documents"); > cy.get(".widget#ERMCounts .widget-content").contains( > "0 local packages" > ); >-- >2.39.5
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 39320
:
187513
|
187514
|
187515
|
187516
|
187517
|
187518
|
187519
|
187520
|
187521
|
187522
|
187563
|
187568
|
187635
|
187636
|
187637
|
187638
|
187639
|
187640
|
187641
|
187642
|
187643
|
187644
|
187645
|
188094
|
188095
|
188096
|
188097
|
188098
|
188099
|
188100
|
188101
|
188102
|
188103
|
188104
|
188151
|
188279
|
188280
|
188281
|
188282
|
188283
|
188284
|
188285
|
188312
|
188315
|
188372
|
188375
|
188376
|
188637
|
188638
|
188639
|
188640
|
188641
|
188830
|
188831
|
188832
|
188833
|
188834
|
188835
|
188836
|
188837
|
188838
|
188839
|
188840
|
188841
|
188842
|
188843
|
188844
|
188845
|
188846
|
188847
|
188848
|
188849
|
188850
|
188851
|
188852
|
188853
|
188854
|
188855
|
188856
|
188857
|
188858
|
188859
|
188860
|
188861
|
188862
|
188863
|
188864