Matt Blenkinsop
6d567185f0
This patch amends Searchbar_spec.ts to account for the new licenses option
Test plan:
1) Run yarn cypress open
2) Select the Searchbar_spec.ts test
3) The test should pass
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5b3d848b2e
)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
40 lines
No EOL
1.3 KiB
TypeScript
40 lines
No EOL
1.3 KiB
TypeScript
import { mount } from "@cypress/vue";
|
|
|
|
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("Should change to licenses when in licenses", () => {
|
|
cy.visit("/cgi-bin/koha/erm/licenses");
|
|
cy.get("#license_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")
|
|
})
|
|
}) |