Bugzilla – Attachment 187013 Details for
Bug 40320
Missing Cypress tests for patron address display
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40320: Use insertSamplePatron
Bug-40320-Use-insertSamplePatron.patch (text/plain), 2.50 KB, created by
Jonathan Druart
on 2025-09-26 19:43:32 UTC
(
hide
)
Description:
Bug 40320: Use insertSamplePatron
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-09-26 19:43:32 UTC
Size:
2.50 KB
patch
obsolete
>From 78fa573d8feebbd74ba0398be670648b5f05a66d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 26 Sep 2025 21:41:22 +0200 >Subject: [PATCH] Bug 40320: Use insertSamplePatron > >On > commit 959b7e8f05059522151fb24992ed7250ac436dc1 > Bug 40345: Add insertSamplePatron > >We remove the ability to insert a patron using insertObject, we need to >use insertSamplePatron instead. >--- > t/cypress/integration/Patron/Address.ts | 27 +++++-------------------- > 1 file changed, 5 insertions(+), 22 deletions(-) > >diff --git a/t/cypress/integration/Patron/Address.ts b/t/cypress/integration/Patron/Address.ts >index 1d09a43690c..95667877678 100644 >--- a/t/cypress/integration/Patron/Address.ts >+++ b/t/cypress/integration/Patron/Address.ts >@@ -2,37 +2,20 @@ describe("Display address", () => { > beforeEach(() => { > cy.login(); > cy.title().should("eq", "Koha staff interface"); >- cy.task("buildSampleObject", { >- object: "patron", >- values: { >- street_number: 12, >- street_type: "Rd", >- address: "Awesome", >- address2: "Library", >- city: "Portland", >- state: "OR", >- postal_code: "44240", >- country: "USA", >- }, >- }).then(generatedPatron => { >- cy.task("insertObject", { >- type: "patron", >- object: generatedPatron, >- }).then(objects_patron => { >- cy.wrap(objects_patron).as("objects_patron"); >- }); >+ cy.task("insertSamplePatron").then(objects_patron => { >+ cy.wrap(objects_patron).as("objects_patron"); > }); > }); > > afterEach(function () { >- cy.task("deleteSampleObjects", [this.objects_patron]); >+ cy.task("deleteSampleObjects", this.objects_patron); > }); > > it("should have correct spacing", function () { >+ const patron = this.objects_patron.patron; > cy.visit( >- `/cgi-bin/koha/members/moremember.pl?borrowernumber=${this.objects_patron.patron_id}` >+ `/cgi-bin/koha/members/moremember.pl?borrowernumber=${patron.patron_id}` > ); >- const patron = this.objects_patron; > cy.get(".patronbriefinfo").should($el => { > const re = new RegExp( > `${patron.street_number} ${patron.address} ${patron.street_type}\\n\\s*${patron.address2}\\n\\s*${patron.city}, ${patron.state} ${patron.postal_code}\\n\\s*${patron.country}` >-- >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 40320
:
183843
|
183940
|
183944
|
184369
|
186958
| 187013