Bugzilla – Attachment 189322 Details for
Bug 41214
Cash register should only show if UseCashRegisters sys pref is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41214: Add cypress test
Bug-41214-Add-cypress-test.patch (text/plain), 1.90 KB, created by
Pedro Amorim
on 2025-11-07 13:57:49 UTC
(
hide
)
Description:
Bug 41214: Add cypress test
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-11-07 13:57:49 UTC
Size:
1.90 KB
patch
obsolete
>From 360c4e1aaed61d2f417a1077ad77e9b9e938509e Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Fri, 7 Nov 2025 13:56:55 +0000 >Subject: [PATCH] Bug 41214: Add cypress test > >cypress run --spec t/cypress/integration/SIP2/Accounts.ts --config video=false,screenshotOnRunFailure=false >--- > t/cypress/integration/SIP2/Accounts.ts | 11 +++++++++++ > 1 file changed, 11 insertions(+) > >diff --git a/t/cypress/integration/SIP2/Accounts.ts b/t/cypress/integration/SIP2/Accounts.ts >index 25711ef768d..e56b723d67a 100644 >--- a/t/cypress/integration/SIP2/Accounts.ts >+++ b/t/cypress/integration/SIP2/Accounts.ts >@@ -77,6 +77,7 @@ describe("Accounts", () => { > beforeEach(() => { > cy.login(); > cy.title().should("eq", "Koha staff interface"); >+ cy.set_syspref("UseCashRegisters", 0); > }); > > it("List accounts", () => { >@@ -232,6 +233,8 @@ describe("Accounts", () => { > > cy.get("#login_id").should("not.be.visible"); > >+ cy.get("#register_id").should("not.exist"); >+ > // Submit the form, get 500 > cy.intercept("POST", "/api/v1/sip2/accounts", { > statusCode: 500, >@@ -253,6 +256,13 @@ describe("Accounts", () => { > ); > }); > >+ it("Should show/hide register_id based on syspref", () => { >+ cy.set_syspref("UseCashRegisters", 1).then(() => { >+ cy.visit("/cgi-bin/koha/sip2/accounts/add"); >+ cy.get("#register_id").should("exist"); >+ }); >+ }); >+ > it("Edit account", () => { > let account = get_account(); > let accounts = [account]; >@@ -282,6 +292,7 @@ describe("Accounts", () => { > > // Form has been correctly filled in > cy.get("#login_id").should("have.value", accounts[0].login_id); >+ cy.get("#register_id").should("not.exist"); > > // cy.get("#checkin_yes").should("be.checked"); > // cy.get("#checkout_yes").should("be.checked"); >-- >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 41214
:
189263
| 189322