Bugzilla – Attachment 186920 Details for
Bug 40865
Single patron result does not redirect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40865: Add a cypress test
Bug-40865-Add-a-cypress-test.patch (text/plain), 2.22 KB, created by
Jonathan Druart
on 2025-09-25 12:04:02 UTC
(
hide
)
Description:
Bug 40865: Add a cypress test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-09-25 12:04:02 UTC
Size:
2.22 KB
patch
obsolete
>From e982dfe9d210b2d06dce55757d95e4bff4598249 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 25 Sep 2025 14:03:36 +0200 >Subject: [PATCH] Bug 40865: Add a cypress test > >--- > .../KohaTable/PatronSearch_spec.ts | 52 +++++++++++++++++++ > 1 file changed, 52 insertions(+) > >diff --git a/t/cypress/integration/KohaTable/PatronSearch_spec.ts b/t/cypress/integration/KohaTable/PatronSearch_spec.ts >index c6bff2545ac..92dd23c852a 100644 >--- a/t/cypress/integration/KohaTable/PatronSearch_spec.ts >+++ b/t/cypress/integration/KohaTable/PatronSearch_spec.ts >@@ -271,3 +271,55 @@ describe("Filters", () => { > }); > }); > }); >+ >+describe("On single result", () => { >+ const table_id = "memberresultst"; >+ >+ beforeEach(() => { >+ cleanup(); >+ cy.login(); >+ cy.title().should("eq", "Koha staff interface"); >+ cy.window().then(win => { >+ win.localStorage.clear(); >+ }); >+ }); >+ >+ it("should redirect", () => { >+ cy.task("insertSamplePatron").then(patron_objects => { >+ let patron = patron_objects.patron; >+ patron.library = patron_objects.library; >+ cy.intercept("GET", "/api/v1/patrons*", { >+ statusCode: 200, >+ body: [patron], >+ headers: { >+ "X-Base-Total-Count": baseTotalCount, >+ "X-Total-Count": "1", >+ }, >+ }).as("searchPatrons"); >+ >+ cy.visit("/cgi-bin/koha/mainpage.pl"); >+ >+ cy.get("#findborrower").type( >+ `${patron.surname} ${patron.firstname}` >+ ); >+ // Wait for auto complete >+ cy.wait("@searchPatrons"); >+ >+ cy.get("#findborrower").type(`{enter}`); >+ >+ cy.title().should( >+ "to.match", >+ new RegExp(`^Checking out to.* ${patron.surname}`) >+ ); >+ >+ cy.location("pathname").should( >+ "include", >+ "/cgi-bin/koha/circ/circulation.pl" >+ ); >+ cy.location("search").should( >+ "include", >+ `?borrowernumber=${patron.patron_id}` >+ ); >+ }); >+ }); >+}); >-- >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 40865
:
186917
|
186920
|
186926
|
186927