Bugzilla – Attachment 183986 Details for
Bug 40345
Missing Cypress tests for checkout history - OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40345: Add tests for bug 38102
Bug-40345-Add-tests-for-bug-38102.patch (text/plain), 2.46 KB, created by
Jonathan Druart
on 2025-07-11 12:16:22 UTC
(
hide
)
Description:
Bug 40345: Add tests for bug 38102
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-07-11 12:16:22 UTC
Size:
2.46 KB
patch
obsolete
>From bfe198d3d1ce48e0271d3027d4d1503599cfabd8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 11 Jul 2025 07:28:18 +0200 >Subject: [PATCH] Bug 40345: Add tests for bug 38102 > >Test plan: > yarn cypress run --spec t/cypress/integration/KohaTable/OPACCirculationHistory_spec.ts >must return green > >Revert commits from bug 38102 >Run again the Cypress tests >=> They fail >--- > .../KohaTable/OPACCirculationHistory_spec.ts | 43 +++++++++++++++++++ > 1 file changed, 43 insertions(+) > create mode 100644 t/cypress/integration/KohaTable/OPACCirculationHistory_spec.ts > >diff --git a/t/cypress/integration/KohaTable/OPACCirculationHistory_spec.ts b/t/cypress/integration/KohaTable/OPACCirculationHistory_spec.ts >new file mode 100644 >index 00000000000..04c0a7bd603 >--- /dev/null >+++ b/t/cypress/integration/KohaTable/OPACCirculationHistory_spec.ts >@@ -0,0 +1,43 @@ >+describe("opac-readingrecord", () => { >+ beforeEach(() => { >+ let objects_to_cleanup = []; >+ cy.task("apiGet", { >+ endpoint: "/api/v1/patrons/51", >+ }).then(patron => { >+ [...Array(51)].forEach(() => { >+ cy.task("insertSampleCheckout", { >+ patron: patron, >+ }).then(objects_checkout => { >+ objects_to_cleanup.push(objects_checkout); >+ cy.task("query", { >+ sql: "INSERT INTO old_issues SELECT * FROM issues WHERE issue_id=?", >+ values: [objects_checkout.checkout.checkout_id], >+ }); >+ cy.task("query", { >+ sql: "DELETE FROM issues WHERE issue_id=?", >+ values: [objects_checkout.checkout.checkout_id], >+ }); >+ }); >+ }); >+ >+ cy.wrap(objects_to_cleanup).as("objects_to_cleanup"); >+ }); >+ >+ cy.loginOpac(); >+ }); >+ >+ afterEach(function () { >+ cy.task("deleteSampleObjects", [this.objects_to_cleanup]); >+ }); >+ >+ it("50 items should be displayed by default", function () { >+ cy.visitOpac("/cgi-bin/koha/opac-readingrecord.pl"); >+ >+ cy.contains("Showing 1 to 50 of 50 entries"); >+ cy.get("table#readingrec tbody tr").should("have.length", 50); >+ >+ cy.contains("Show all items").click(); >+ cy.contains("Showing 1 to 51 of 51 entries"); >+ cy.get("table#readingrec tbody tr").should("have.length", 51); >+ }); >+}); >-- >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 40345
:
183974
|
183975
|
183976
|
183977
|
183979
|
183983
|
183984
|
183985
| 183986 |
183987
|
183988