Bugzilla – Attachment 175233 Details for
Bug 38461
Table features needs to be covered by e2e tests using Cypress
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38461: Add tests for catalogue/detail/holdings_table
Bug-38461-Add-tests-for-cataloguedetailholdingstab.patch (text/plain), 2.77 KB, created by
Victor Grousset/tuxayo
on 2024-12-05 06:13:13 UTC
(
hide
)
Description:
Bug 38461: Add tests for catalogue/detail/holdings_table
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2024-12-05 06:13:13 UTC
Size:
2.77 KB
patch
obsolete
>From 1e28a8cf3ef2c96a8891505baa58af7eead12b2f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 4 Dec 2024 14:30:06 +0100 >Subject: [PATCH] Bug 38461: Add tests for catalogue/detail/holdings_table > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > t/cypress/integration/KohaTable_spec.ts | 62 +++++++++++++++++++++++++ > 1 file changed, 62 insertions(+) > >diff --git a/t/cypress/integration/KohaTable_spec.ts b/t/cypress/integration/KohaTable_spec.ts >index 6803edf9fa..16f9c5c279 100644 >--- a/t/cypress/integration/KohaTable_spec.ts >+++ b/t/cypress/integration/KohaTable_spec.ts >@@ -468,3 +468,65 @@ describe("ERM ", () => { > }); > }); > }); >+ >+describe("Hit all tables", () => { >+ beforeEach(() => { >+ cy.login(); >+ cy.title().should("eq", "Koha staff interface"); >+ cy.window().then(win => { >+ win.localStorage.clear(); >+ }); >+ }); >+ >+ describe("catalogue/detail/holdings_table", () => { >+ const table_id = "holdings_table"; >+ it("correctly init", () => { >+ const biblio_id = 1; >+ cy.task("buildsampleobjects", { >+ object: "item", >+ count: restdefaultpagesize, >+ values: { >+ biblio_id, >+ checkout: null, >+ transfer: null, >+ lost_status: 0, >+ withdrawn: 0, >+ damaged_status: 0, >+ not_for_loan_status: 0, >+ course_item: null, >+ }, >+ }).then(items => { >+ cy.intercept("get", `/api/v1/biblios/${biblio_id}/items*`, { >+ statuscode: 200, >+ body: items, >+ headers: { >+ "x-base-total-count": basetotalcount, >+ "x-total-count": basetotalcount, >+ }, >+ }); >+ >+ cy.visit( >+ "/cgi-bin/koha/catalogue/detail.pl?biblionumber=" + >+ biblio_id >+ ); >+ >+ cy.window().then(win => { >+ win.libraries_map = items.reduce((map, i) => { >+ map[i.library_id] = i.library_id; >+ return map; >+ }, {}); >+ }); >+ >+ cy.get(`#${table_id}_wrapper tbody tr`).should( >+ "have.length", >+ restdefaultpagesize >+ ); >+ >+ cy.get(".show_filters").click(); >+ cy.get(`#${table_id}_wrapper .dt-info`).contains( >+ `showing 1 to ${restdefaultpagesize} of ${basetotalcount} entries` >+ ); >+ }); >+ }); >+ }); >+}); >-- >2.47.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 38461
:
174877
|
174878
|
175004
|
175005
|
175006
|
175007
|
175008
|
175009
|
175010
|
175011
|
175015
|
175016
|
175179
|
175223
|
175224
|
175225
|
175226
|
175227
|
175228
|
175229
|
175230
|
175231
|
175232
|
175233
|
175234
|
175235
|
175289
|
175290
|
175291
|
175292
|
176082
|
176083
|
176084
|
176085
|
176086
|
176087
|
176088
|
176089
|
176090
|
176091
|
176092
|
176093
|
176793
|
176846
|
176902