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

(-)a/t/cypress/integration/Agreements_spec.ts (-1 / +1 lines)
Lines 123-129 describe("Agreement CRUD operations", () => { Link Here
123
    });
123
    });
124
124
125
    beforeEach(() => {
125
    beforeEach(() => {
126
        cy.login("koha", "koha");
126
        cy.login();
127
        cy.title().should("eq", "Koha staff interface");
127
        cy.title().should("eq", "Koha staff interface");
128
    });
128
    });
129
129
(-)a/t/cypress/integration/Licenses_spec.ts (-1 / +1 lines)
Lines 39-45 describe("License CRUD operations", () => { Link Here
39
    });
39
    });
40
40
41
    beforeEach(() => {
41
    beforeEach(() => {
42
        cy.login("koha", "koha");
42
        cy.login();
43
        cy.title().should("eq", "Koha staff interface");
43
        cy.title().should("eq", "Koha staff interface");
44
    });
44
    });
45
45
(-)a/t/cypress/integration/Packages_spec.ts (-1 / +1 lines)
Lines 30-36 describe("Package CRUD operations", () => { Link Here
30
    });
30
    });
31
31
32
    beforeEach(() => {
32
    beforeEach(() => {
33
        cy.login("koha", "koha");
33
        cy.login();
34
        cy.title().should("eq", "Koha staff interface");
34
        cy.title().should("eq", "Koha staff interface");
35
    });
35
    });
36
36
(-)a/t/cypress/integration/Titles_spec.ts (-1 / +1 lines)
Lines 73-79 describe("Title CRUD operations", () => { Link Here
73
    });
73
    });
74
74
75
    beforeEach(() => {
75
    beforeEach(() => {
76
        cy.login("koha", "koha");
76
        cy.login();
77
        cy.title().should("eq", "Koha staff interface");
77
        cy.title().should("eq", "Koha staff interface");
78
    });
78
    });
79
79
(-)a/t/cypress/support/commands.js (-6 / +6 lines)
Lines 24-34 Link Here
24
// -- This will overwrite an existing command --
24
// -- This will overwrite an existing command --
25
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
25
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
26
26
27
28
Cypress.Commands.add('login', (username, password) => {
27
Cypress.Commands.add('login', (username, password) => {
28
    var user = typeof username === 'undefined' ? Cypress.env('KOHA_USER') : username;
29
    var pass = typeof password === 'undefined' ? Cypress.env('KOHA_PASS') : password;
29
    cy.visit('/cgi-bin/koha/mainpage.pl?logout.x=1')
30
    cy.visit('/cgi-bin/koha/mainpage.pl?logout.x=1')
30
    cy.get("#userid").type(username)
31
    cy.get("#userid").type(user)
31
    cy.get("#password").type(password)
32
    cy.get("#password").type(pass)
32
    cy.get("#submit-button").click()
33
    cy.get("#submit-button").click()
33
})
34
})
34
35
Lines 49-55 Cypress.Commands.add('set_ERM_sys_pref_value', (enable) => { Link Here
49
})
50
})
50
51
51
Cypress.Commands.add('fetch_initial_ERM_sys_pref_value', () => {
52
Cypress.Commands.add('fetch_initial_ERM_sys_pref_value', () => {
52
    cy.login("koha", "koha");
53
    cy.login();
53
    cy.visit('/cgi-bin/koha/admin/admin-home.pl')
54
    cy.visit('/cgi-bin/koha/admin/admin-home.pl')
54
    cy.get("h4").contains("Global system preferences").click();
55
    cy.get("h4").contains("Global system preferences").click();
55
    cy.get("a[title^=E-resource]").contains("E-resource management").click();
56
    cy.get("a[title^=E-resource]").contains("E-resource management").click();
Lines 59-64 Cypress.Commands.add('fetch_initial_ERM_sys_pref_value', () => { Link Here
59
})
60
})
60
61
61
Cypress.Commands.add('reset_initial_ERM_sys_pref_value', () => {
62
Cypress.Commands.add('reset_initial_ERM_sys_pref_value', () => {
62
    cy.login("koha", "koha");
63
    cy.login();
63
    cy.set_ERM_sys_pref_value(Cypress.env("initial_ERM_Module_sys_pref_value"));
64
    cy.set_ERM_sys_pref_value(Cypress.env("initial_ERM_Module_sys_pref_value"));
64
})
65
})
65
- 

Return to bug 32898