Bugzilla – Attachment 187329 Details for
Bug 6473
Test bug for Git-bz ✔ ❤ ★
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38201: Remove DT warnings from Cypress tests
4edf8e5.patch (text/plain), 7.49 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-10-02 20:54:37 UTC
(
hide
)
Description:
Bug 38201: Remove DT warnings from Cypress tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-10-02 20:54:37 UTC
Size:
7.49 KB
patch
obsolete
>From 4edf8e5b7a3fa6701ecde1700b0acd878b70986b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 26 Sep 2025 12:19:41 +0200 >Subject: [PATCH] Bug 38201: Remove DT warnings from Cypress tests > >(cherry picked from commit b2a779e12f3ae23e10cba6177f248e12263306f8) >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > t/cypress/integration/ERM/Dialog_spec.ts | 8 +++++--- > t/cypress/integration/ERM/Packages_spec.ts | 11 ++++------- > t/cypress/integration/Preservation/Trains.ts | 15 ++++++++++++++- > .../integration/Preservation/WaitingList.ts | 17 ++++++++++++++++- > t/cypress/support/e2e.js | 1 + > 5 files changed, 40 insertions(+), 12 deletions(-) > >diff --git a/t/cypress/integration/ERM/Dialog_spec.ts b/t/cypress/integration/ERM/Dialog_spec.ts >index ce0235be7ca..71d4829b6b0 100644 >--- a/t/cypress/integration/ERM/Dialog_spec.ts >+++ b/t/cypress/integration/ERM/Dialog_spec.ts >@@ -17,6 +17,7 @@ function get_package() { > package_id: 1, > }, > ], >+ notes: "", > resources_count: 0, > }; > } >@@ -100,12 +101,13 @@ describe("Dialog operations", () => { > "X-Base-Total-Count": "1", > "X-Total-Count": "1", > }, >- }); >+ }).as("get-packages"); > cy.get("#packages_add").contains("Submit").click(); >+ cy.wait("@get-packages"); >+ cy.get("#packages_list").should("exist"); > cy.get("main div[class='alert alert-info']").contains( > "Package created" > ); >- cy.get("#packages_list").should("exist"); > cy.get("main div[class='alert alert-info']").should("have.length", 1); > > cy.intercept("GET", "/api/v1/erm/eholdings/local/titles*", { >@@ -115,7 +117,7 @@ describe("Dialog operations", () => { > "X-Base-Total-Count": "1", > "X-Total-Count": "1", > }, >- }); >+ }).as("get-titles"); > cy.get(".sidebar_menu").contains("Titles").click(); > // Info messages should be cleared when view is changed > cy.get("main div[class='alert alert-info']").should("not.exist"); >diff --git a/t/cypress/integration/ERM/Packages_spec.ts b/t/cypress/integration/ERM/Packages_spec.ts >index d912755679a..56d9870c535 100644 >--- a/t/cypress/integration/ERM/Packages_spec.ts >+++ b/t/cypress/integration/ERM/Packages_spec.ts >@@ -32,8 +32,9 @@ describe("Package CRUD operations", () => { > "X-Base-Total-Count": "0", > "X-Total-Count": "0", > }, >- }); >+ }).as("get-packages"); > cy.visit("/cgi-bin/koha/erm/eholdings/local/packages"); >+ cy.wait("@get-packages"); > cy.get("#packages_list").contains("There are no packages defined"); > > // GET packages returns something >@@ -47,13 +48,9 @@ describe("Package CRUD operations", () => { > "X-Base-Total-Count": "1", > "X-Total-Count": "1", > }, >- }); >- cy.intercept( >- "GET", >- "/api/v1/erm/eholdings/local/packages/*", >- erm_package >- ); >+ }).as("get-packages"); > cy.visit("/cgi-bin/koha/erm/eholdings/local/packages"); >+ cy.wait("@get-packages"); > cy.get("#packages_list").contains("Showing 1 to 1 of 1 entries"); > }); > >diff --git a/t/cypress/integration/Preservation/Trains.ts b/t/cypress/integration/Preservation/Trains.ts >index 9b2834d210e..727f3de9bc3 100644 >--- a/t/cypress/integration/Preservation/Trains.ts >+++ b/t/cypress/integration/Preservation/Trains.ts >@@ -68,25 +68,31 @@ function get_items() { > biblio: { > biblio_id: 1, > title: "a biblio title", >+ author: "an author", > }, > external_id: "bc_1", > item_id: 1, >+ callnumber: "cn_1", > }, > { > biblio: { > biblio_id: 2, > title: "an other biblio title", >+ author: "another author", > }, > external_id: "bc_2", > item_id: 2, >+ callnumber: "cn_2", > }, > { > biblio: { > biblio_id: 3, > title: "yet an other biblio title", >+ author: "yet another author", > }, > external_id: "bc_3", > item_id: 3, >+ callnumber: "cn_3", > }, > ]; > } >@@ -128,6 +134,8 @@ function get_train_items() { > train_item_1.processing_id = 1; > train_item_1.processing = get_processings()[0]; > train_item_1.item_id = 1; >+ train_item_1.train_item_id = 1; >+ train_item_1.user_train_item_id = 1; > > let train_item_2 = get_items()[1]; > let processing_attributes = get_attributes(); >@@ -158,6 +166,8 @@ function get_train_items() { > train_item_2.processing_id = 1; > train_item_2.processing = get_processings()[0]; > train_item_2.item_id = 2; >+ train_item_2.train_item_id = 2; >+ train_item_2.user_train_item_id = 2; > > let train_item_3 = get_items()[0]; > let processing_attributes = get_other_attributes(); >@@ -181,6 +191,8 @@ function get_train_items() { > train_item_3.processing_id = 2; > train_item_3.processing = get_processings()[1]; > train_item_3.item_id = 3; >+ train_item_3.train_item_id = 3; >+ train_item_3.user_train_item_id = 3; > > return [train_item_1, train_item_2, train_item_3]; > } >@@ -568,8 +580,9 @@ describe("Trains", () => { > "GET", > "/api/v1/preservation/trains/" + train.train_id, > train_with_one_item >- ); >+ ).as("get-train"); > cy.contains("Submit").click(); >+ cy.wait("@get-train"); > cy.get("#trains_show").contains("Showing 1 to 1 of 1 entries"); > > let train_with_2_items = Object.assign({}, train); >diff --git a/t/cypress/integration/Preservation/WaitingList.ts b/t/cypress/integration/Preservation/WaitingList.ts >index 9c55e80a5aa..961ae83bc96 100644 >--- a/t/cypress/integration/Preservation/WaitingList.ts >+++ b/t/cypress/integration/Preservation/WaitingList.ts >@@ -7,20 +7,35 @@ function get_items() { > biblio: { > biblio_id: 1, > title: "a biblio title", >+ author: "an author", > }, > external_id: "bc_1", > item_id: 1, >+ callnumber: "cn_1", > }, > { > biblio: { > biblio_id: 2, >- title: "yet another biblio title", >+ title: "an other biblio title", >+ author: "another author", >+ }, >+ external_id: "bc_2", >+ item_id: 2, >+ callnumber: "cn_2", >+ }, >+ { >+ biblio: { >+ biblio_id: 3, >+ title: "yet an other biblio title", >+ author: "yet another author", > }, > external_id: "bc_3", > item_id: 3, >+ callnumber: "cn_3", > }, > ]; > } >+ > let config = { > permissions: { manage_sysprefs: "1" }, > settings: { >diff --git a/t/cypress/support/e2e.js b/t/cypress/support/e2e.js >index cde77420fa1..d2efe54732c 100644 >--- a/t/cypress/support/e2e.js >+++ b/t/cypress/support/e2e.js >@@ -337,6 +337,7 @@ cy.get_package = () => { > name: "package 1", > package_type: "complete", > content_type: "Print", >+ notes: "", > package_agreements: [ > { > agreement: { >-- >2.51.0
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 6473
:
4386
|
6837
|
6838
|
6839
|
6840
|
6841
|
6842
|
6843
|
7154
|
7155
|
7567
|
7994
|
7995
|
7996
|
7997
|
8018
|
9807
|
9808
|
9813
|
9831
|
9832
|
9836
|
9854
|
10842
|
10843
|
10844
|
10845
|
10846
|
10847
|
10848
|
10849
|
10850
|
10851
|
10852
|
10853
|
10854
|
10855
|
10856
|
10857
|
10858
|
11540
|
11543
|
11544
|
12502
|
12513
|
12514
|
12515
|
12516
|
12517
|
12518
|
12519
|
13473
|
13673
|
14955
|
14969
|
14970
|
14972
|
15201
|
18949
|
18950
|
18951
|
18952
|
18953
|
18954
|
18955
|
18956
|
18957
|
18958
|
18959
|
18960
|
18961
|
18962
|
18963
|
18971
|
18972
|
19518
|
19519
|
19591
|
19592
|
19871
|
19879
|
19880
|
19881
|
19882
|
20011
|
20012
|
20013
|
20014
|
22477
|
22481
|
22482
|
22496
|
22502
|
22503
|
31958
|
32444
|
32445
|
32446
|
32447
|
32448
|
32449
|
32450
|
32451
|
32452
|
34200
|
34201
|
34625
|
34999
|
35130
|
35269
|
35273
|
35274
|
35275
|
35276
|
35277
|
35279
|
35280
|
35303
|
40954
|
40957
|
45345
|
45349
|
45731
|
45732
|
45733
|
45734
|
47283
|
47284
|
47298
|
47299
|
47300
|
47334
|
47336
|
49083
|
56974
|
61059
|
61069
|
62038
|
65313
|
77301
|
78016
|
79959
|
80178
|
80179
|
80180
|
80181
|
80182
|
84400
|
86644
|
86645
|
87152
|
88128
|
95586
|
95716
|
97394
|
99026
|
99027
|
114217
|
114218
|
114219
|
114220
|
114221
|
114222
|
114223
|
114224
|
114225
|
114226
|
119255
|
121181
|
131891
|
131893
|
131894
|
134862
|
144109
|
144144
|
144671
|
144672
|
144673
|
147183
|
149030
|
149031
|
149032
|
149033
|
160566
|
160567
|
160568
|
182093
|
183107
|
183177
|
183178
|
183179
|
183180
|
183182
|
183183
|
183285
|
183286
|
187209
|
187321
|
187322
|
187323
|
187324
|
187325
|
187326
|
187327
|
187328
|
187329
|
187330
|
187331
|
187332
|
187333
|
187334
|
187335
|
187336
|
187337
|
187338
|
187339
|
187340
|
187341
|
187342
|
187343
|
187344
|
187345
|
187346
|
187347
|
187348
|
187349
|
187350
|
187351
|
187352
|
187353
|
187354
|
187355
|
187356
|
187357
|
187358
|
187359
|
187360
|
187361
|
187362
|
187363
|
187364
|
187365
|
187366
|
187367
|
187368
|
187369
|
187370
|
187371
|
187372
|
187545
|
187546