Bugzilla – Attachment 186927 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.27 KB, created by
Brendan Lawlor
on 2025-09-25 18:12:13 UTC
(
hide
)
Description:
Bug 40865: Add a cypress test
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2025-09-25 18:12:13 UTC
Size:
2.27 KB
patch
obsolete
>From 41befd126cec153020379613bc4990b45c431ea3 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 > >Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> >--- > .../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 bffcd29580..125f8867ba 100644 >--- a/t/cypress/integration/KohaTable/PatronSearch_spec.ts >+++ b/t/cypress/integration/KohaTable/PatronSearch_spec.ts >@@ -181,3 +181,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.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 40865
:
186917
|
186920
|
186926
| 186927