Bugzilla – Attachment 189700 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), 2.02 KB, created by
Pedro Amorim
on 2025-11-19 11:40:50 UTC
(
hide
)
Description:
Bug 41214: Add cypress test
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-11-19 11:40:50 UTC
Size:
2.02 KB
patch
obsolete
>From d8c94b9d09aa9ca382971069d1ce6ea7a514ede7 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 > >Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> >--- > 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 27feac28cff..d2a7f9db7a2 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
|
189695
|
189697
|
189698
|
189699
|
189700
|
189701
|
189702
|
189902
|
189903
|
189904
|
189905