Bugzilla – Attachment 176878 Details for
Bug 38941
Convert the acquisitions menu to a Vue island
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38941: Add a cypress test
Bug-38941-Add-a-cypress-test.patch (text/plain), 2.40 KB, created by
Matt Blenkinsop
on 2025-01-21 17:22:02 UTC
(
hide
)
Description:
Bug 38941: Add a cypress test
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2025-01-21 17:22:02 UTC
Size:
2.40 KB
patch
obsolete
>From 62d1b14e705d20b38f757ad372d82329ca2cdcb8 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Tue, 21 Jan 2025 17:21:27 +0000 >Subject: [PATCH] Bug 38941: Add a cypress test > >--- > .../Islands/AcquisitionsMenu_spec.ts | 49 +++++++++++++++++++ > 1 file changed, 49 insertions(+) > create mode 100644 t/cypress/integration/Islands/AcquisitionsMenu_spec.ts > >diff --git a/t/cypress/integration/Islands/AcquisitionsMenu_spec.ts b/t/cypress/integration/Islands/AcquisitionsMenu_spec.ts >new file mode 100644 >index 00000000000..e8583df1620 >--- /dev/null >+++ b/t/cypress/integration/Islands/AcquisitionsMenu_spec.ts >@@ -0,0 +1,49 @@ >+describe("Acquisitions menu", () => { >+ beforeEach(() => { >+ cy.login(); >+ cy.title().should("eq", "Koha staff interface"); >+ >+ cy.query( >+ "UPDATE systempreferences SET value=0 WHERE variable='EDIFACT'" >+ ); >+ cy.query( >+ "UPDATE systempreferences SET value=0 WHERE variable='MarcOrderingAutomation'" >+ ); >+ }); >+ >+ it("Should render a left menu", () => { >+ cy.visit("/cgi-bin/koha/acqui/acqui-home.pl"); >+ cy.get("#navmenulist").should("be.visible"); >+ cy.get("#navmenulist a").should("have.length", 14); >+ }); >+ >+ it("Should show/hide links based on sysprefs", () => { >+ cy.visit("/cgi-bin/koha/acqui/acqui-home.pl"); >+ cy.get("#navmenulist").should("be.visible"); >+ >+ cy.query( >+ "UPDATE systempreferences SET value=1 WHERE variable='EDIFACT'" >+ ); >+ cy.get("#navmenulist a").should("have.length", 17); >+ }); >+ >+ it("Should show/hide links based on permissions", () => { >+ cy.visit("/cgi-bin/koha/acqui/acqui-home.pl"); >+ cy.get("#navmenulist").should("be.visible"); >+ >+ cy.query("UPDATE borrowers SET flags=2052 WHERE borrowernumber=51"); >+ cy.get("#navmenulist a").should("have.length", 8); >+ }); >+ it("Should correctly apply the 'current' class", () => { >+ cy.visit("/cgi-bin/koha/acqui/acqui-home.pl"); >+ cy.get("#navmenulist").should("be.visible"); >+ >+ cy.get("#navmenulist a") >+ .contains("Acquisitions home") >+ .should("have.class", "current"); >+ cy.get("#navmenulist a").contains("Budgets").click(); >+ cy.get("#navmenulist a") >+ .contains("Budgets") >+ .should("have.class", "current"); >+ }); >+}); >-- >2.48.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 38941
:
176877
| 176878