Bugzilla – Attachment 149227 Details for
Bug 33422
ERM - Search header should change to match the section you are in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33422: Add cypress test
Bug-33422-Add-cypress-test.patch (text/plain), 2.03 KB, created by
Matt Blenkinsop
on 2023-04-06 09:38:39 UTC
(
hide
)
Description:
Bug 33422: Add cypress test
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2023-04-06 09:38:39 UTC
Size:
2.03 KB
patch
obsolete
>From 9613f84276882346b9bf0b1e1c0690d15b69c186 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Thu, 6 Apr 2023 09:37:09 +0000 >Subject: [PATCH] Bug 33422: Add cypress test > >This patch adds a cypress test to check whether the "active" class is correctly updating when navigating >--- > t/cypress/integration/Searchbar_spec.ts | 38 +++++++++++++++++++++++++ > 1 file changed, 38 insertions(+) > create mode 100644 t/cypress/integration/Searchbar_spec.ts > >diff --git a/t/cypress/integration/Searchbar_spec.ts b/t/cypress/integration/Searchbar_spec.ts >new file mode 100644 >index 0000000000..bf42ccc68e >--- /dev/null >+++ b/t/cypress/integration/Searchbar_spec.ts >@@ -0,0 +1,38 @@ >+describe("Searchbar header changes", () => { >+ before(() => { >+ cy.fetch_initial_ERM_sys_pref_value(); >+ cy.set_ERM_sys_pref_value(true); >+ }); >+ >+ beforeEach(() => { >+ cy.login(); >+ cy.title().should("eq", "Koha staff interface"); >+ }); >+ >+ after(() => { >+ cy.reset_initial_ERM_sys_pref_value(); >+ }); >+ >+ it("Default option is agreements", () => { >+ cy.visit("/cgi-bin/koha/erm/erm.pl"); >+ cy.get("#agreement_search_tab").parent().should("have.class", "active") >+ >+ cy.visit("/cgi-bin/koha/erm/agreements"); >+ cy.get("#agreement_search_tab").parent().should("have.class", "active") >+ }) >+ >+ it("Default option also applies to licenses", () => { >+ cy.visit("/cgi-bin/koha/erm/license"); >+ cy.get("#agreement_search_tab").parent().should("have.class", "active") >+ }) >+ >+ it("Should change to packages when in local packages", () => { >+ cy.visit("/cgi-bin/koha/erm/eholdings/local/packages"); >+ cy.get("#package_search_tab").parent().should("have.class", "active") >+ }) >+ >+ it("Should change to titles when in local titles", () => { >+ cy.visit("/cgi-bin/koha/erm/eholdings/local/titles"); >+ cy.get("#title_search_tab").parent().should("have.class", "active") >+ }) >+}) >\ No newline at end of file >-- >2.37.1 (Apple Git-137.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 33422
:
149220
|
149221
|
149224
| 149227