View | Details | Raw Unified | Return to bug 33408
Collapse All | Expand All

(-)a/t/cypress/integration/ERM/Agreements_spec.ts (-6 / +2 lines)
Lines 118-125 function get_licenses_to_relate() { Link Here
118
118
119
describe("Agreement CRUD operations", () => {
119
describe("Agreement CRUD operations", () => {
120
    before(() => {
120
    before(() => {
121
        cy.fetch_initial_ERM_sys_pref_value();
121
        cy.intercept("GET", "/cgi-bin/koha/svc/config/systempreferences/?pref=ERMModule", '{"value":"1"}');
122
        cy.set_ERM_sys_pref_value(true);
122
        cy.intercept("GET", "/cgi-bin/koha/svc/config/systempreferences/?pref=ERMProviders", '{"value":"local"}');
123
    });
123
    });
124
124
125
    beforeEach(() => {
125
    beforeEach(() => {
Lines 127-136 describe("Agreement CRUD operations", () => { Link Here
127
        cy.title().should("eq", "Koha staff interface");
127
        cy.title().should("eq", "Koha staff interface");
128
    });
128
    });
129
129
130
    after(() => {
131
        cy.reset_initial_ERM_sys_pref_value();
132
    });
133
134
    it("List agreements", () => {
130
    it("List agreements", () => {
135
        // GET agreements returns 500
131
        // GET agreements returns 500
136
        cy.intercept("GET", "/api/v1/erm/agreements*", {
132
        cy.intercept("GET", "/api/v1/erm/agreements*", {
(-)a/t/cypress/integration/ERM/Dialog_spec.ts (-6 / +2 lines)
Lines 23-30 function get_package() { Link Here
23
23
24
describe("Dialog operations", () => {
24
describe("Dialog operations", () => {
25
    before(() => {
25
    before(() => {
26
        cy.fetch_initial_ERM_sys_pref_value();
26
        cy.intercept("GET", "/cgi-bin/koha/svc/config/systempreferences/?pref=ERMModule", '{"value":"1"}');
27
        cy.set_ERM_sys_pref_value(true);
27
        cy.intercept("GET", "/cgi-bin/koha/svc/config/systempreferences/?pref=ERMProviders", '{"value":"local"}');
28
    });
28
    });
29
29
30
    beforeEach(() => {
30
    beforeEach(() => {
Lines 32-41 describe("Dialog operations", () => { Link Here
32
        cy.title().should("eq", "Koha staff interface");
32
        cy.title().should("eq", "Koha staff interface");
33
    });
33
    });
34
34
35
    after(() => {
36
        cy.reset_initial_ERM_sys_pref_value();
37
    });
38
39
    it("There are no ... defined", () => {
35
    it("There are no ... defined", () => {
40
        // GET packages returns empty list
36
        // GET packages returns empty list
41
        cy.intercept("GET", "/api/v1/erm/eholdings/local/packages*", {
37
        cy.intercept("GET", "/api/v1/erm/eholdings/local/packages*", {
(-)a/t/cypress/integration/ERM/Licenses_spec.ts (-6 / +2 lines)
Lines 34-41 function get_license() { Link Here
34
34
35
describe("License CRUD operations", () => {
35
describe("License CRUD operations", () => {
36
    before(() => {
36
    before(() => {
37
        cy.fetch_initial_ERM_sys_pref_value();
37
        cy.intercept("GET", "/cgi-bin/koha/svc/config/systempreferences/?pref=ERMModule", '{"value":"1"}');
38
        cy.set_ERM_sys_pref_value(true);
38
        cy.intercept("GET", "/cgi-bin/koha/svc/config/systempreferences/?pref=ERMProviders", '{"value":"local"}');
39
    });
39
    });
40
40
41
    beforeEach(() => {
41
    beforeEach(() => {
Lines 43-52 describe("License CRUD operations", () => { Link Here
43
        cy.title().should("eq", "Koha staff interface");
43
        cy.title().should("eq", "Koha staff interface");
44
    });
44
    });
45
45
46
    after(() => {
47
        cy.reset_initial_ERM_sys_pref_value();
48
    });
49
50
    it("List license", () => {
46
    it("List license", () => {
51
        // GET license returns 500
47
        // GET license returns 500
52
        cy.intercept("GET", "/api/v1/erm/licenses*", {
48
        cy.intercept("GET", "/api/v1/erm/licenses*", {
(-)a/t/cypress/integration/ERM/Packages_spec.ts (-6 / +2 lines)
Lines 25-32 function get_package() { Link Here
25
25
26
describe("Package CRUD operations", () => {
26
describe("Package CRUD operations", () => {
27
    before(() => {
27
    before(() => {
28
        cy.fetch_initial_ERM_sys_pref_value();
28
        cy.intercept("GET", "/cgi-bin/koha/svc/config/systempreferences/?pref=ERMModule", '{"value":"1"}');
29
        cy.set_ERM_sys_pref_value(true);
29
        cy.intercept("GET", "/cgi-bin/koha/svc/config/systempreferences/?pref=ERMProviders", '{"value":"local"}');
30
    });
30
    });
31
31
32
    beforeEach(() => {
32
    beforeEach(() => {
Lines 34-43 describe("Package CRUD operations", () => { Link Here
34
        cy.title().should("eq", "Koha staff interface");
34
        cy.title().should("eq", "Koha staff interface");
35
    });
35
    });
36
36
37
    after(() => {
38
        cy.reset_initial_ERM_sys_pref_value();
39
    });
40
41
    it("List package", () => {
37
    it("List package", () => {
42
        // GET package returns 500
38
        // GET package returns 500
43
        cy.intercept("GET", "/api/v1/erm/eholdings/local/packages*", {
39
        cy.intercept("GET", "/api/v1/erm/eholdings/local/packages*", {
(-)a/t/cypress/integration/ERM/Titles_spec.ts (-7 / +2 lines)
Lines 19-26 function get_packages_to_relate() { Link Here
19
19
20
describe("Title CRUD operations", () => {
20
describe("Title CRUD operations", () => {
21
    before(() => {
21
    before(() => {
22
        cy.fetch_initial_ERM_sys_pref_value();
22
        cy.intercept("GET", "/cgi-bin/koha/svc/config/systempreferences/?pref=ERMModule", '{"value":"1"}');
23
        cy.set_ERM_sys_pref_value(true);
23
        cy.intercept("GET", "/cgi-bin/koha/svc/config/systempreferences/?pref=ERMProviders", '{"value":"local"}');
24
    });
24
    });
25
25
26
    beforeEach(() => {
26
    beforeEach(() => {
Lines 28-37 describe("Title CRUD operations", () => { Link Here
28
        cy.title().should("eq", "Koha staff interface");
28
        cy.title().should("eq", "Koha staff interface");
29
    });
29
    });
30
30
31
    after(() => {
32
        cy.reset_initial_ERM_sys_pref_value();
33
    });
34
35
    it("Import titles", () => {
31
    it("Import titles", () => {
36
        let erm_title = cy.get_title();
32
        let erm_title = cy.get_title();
37
        let resource = erm_title.resources[0];
33
        let resource = erm_title.resources[0];
38
- 

Return to bug 33408