|
Line 0
Link Here
|
| 0 |
- |
1 |
describe("Searchbar header changes", () => { |
|
|
2 |
before(() => { |
| 3 |
cy.fetch_initial_ERM_sys_pref_value(); |
| 4 |
cy.set_ERM_sys_pref_value(true); |
| 5 |
}); |
| 6 |
|
| 7 |
beforeEach(() => { |
| 8 |
cy.login(); |
| 9 |
cy.title().should("eq", "Koha staff interface"); |
| 10 |
}); |
| 11 |
|
| 12 |
after(() => { |
| 13 |
cy.reset_initial_ERM_sys_pref_value(); |
| 14 |
}); |
| 15 |
|
| 16 |
it("Default option is agreements", () => { |
| 17 |
cy.visit("/cgi-bin/koha/erm/erm.pl"); |
| 18 |
cy.get("#agreement_search_tab").parent().should("have.class", "active") |
| 19 |
|
| 20 |
cy.visit("/cgi-bin/koha/erm/agreements"); |
| 21 |
cy.get("#agreement_search_tab").parent().should("have.class", "active") |
| 22 |
}) |
| 23 |
|
| 24 |
it("Default option also applies to licenses", () => { |
| 25 |
cy.visit("/cgi-bin/koha/erm/license"); |
| 26 |
cy.get("#agreement_search_tab").parent().should("have.class", "active") |
| 27 |
}) |
| 28 |
|
| 29 |
it("Should change to packages when in local packages", () => { |
| 30 |
cy.visit("/cgi-bin/koha/erm/eholdings/local/packages"); |
| 31 |
cy.get("#package_search_tab").parent().should("have.class", "active") |
| 32 |
}) |
| 33 |
|
| 34 |
it("Should change to titles when in local titles", () => { |
| 35 |
cy.visit("/cgi-bin/koha/erm/eholdings/local/titles"); |
| 36 |
cy.get("#title_search_tab").parent().should("have.class", "active") |
| 37 |
}) |
| 38 |
}) |