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

(-)a/t/cypress/integration/ERM/Agreements_spec.ts (+3 lines)
Lines 255-260 describe("Agreement CRUD operations", () => { Link Here
255
        cy.visit("/cgi-bin/koha/erm/agreements");
255
        cy.visit("/cgi-bin/koha/erm/agreements");
256
        cy.contains("New agreement").click();
256
        cy.contains("New agreement").click();
257
        cy.get("#agreements_add h2").contains("New agreement");
257
        cy.get("#agreements_add h2").contains("New agreement");
258
        cy.left_menu_active_item_is("Agreements");
258
259
259
        // Fill in the form for normal attributes
260
        // Fill in the form for normal attributes
260
        let agreement = get_agreement();
261
        let agreement = get_agreement();
Lines 492-497 describe("Agreement CRUD operations", () => { Link Here
492
        cy.wait("@get-agreement");
493
        cy.wait("@get-agreement");
493
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
494
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
494
        cy.get("#agreements_add h2").contains("Edit agreement");
495
        cy.get("#agreements_add h2").contains("Edit agreement");
496
        cy.left_menu_active_item_is("Agreements");
495
497
496
        // Form has been correctly filled in
498
        // Form has been correctly filled in
497
        cy.get("#agreement_name").should("have.value", agreements[0].name);
499
        cy.get("#agreement_name").should("have.value", agreements[0].name);
Lines 579-584 describe("Agreement CRUD operations", () => { Link Here
579
        cy.get("#agreements_show h2").contains(
581
        cy.get("#agreements_show h2").contains(
580
            "Agreement #" + agreement.agreement_id
582
            "Agreement #" + agreement.agreement_id
581
        );
583
        );
584
        cy.left_menu_active_item_is("Agreements");
582
585
583
        // TODO There are more to test here:
586
        // TODO There are more to test here:
584
        // Dates correctly formatted
587
        // Dates correctly formatted
(-)a/t/cypress/integration/ERM/Licenses_spec.ts (+3 lines)
Lines 82-87 describe("License CRUD operations", () => { Link Here
82
        cy.visit("/cgi-bin/koha/erm/licenses");
82
        cy.visit("/cgi-bin/koha/erm/licenses");
83
        cy.contains("New license").click();
83
        cy.contains("New license").click();
84
        cy.get("#licenses_add h2").contains("New license");
84
        cy.get("#licenses_add h2").contains("New license");
85
        cy.left_menu_active_item_is("Licenses");
85
86
86
        // Fill in the form for normal attributes
87
        // Fill in the form for normal attributes
87
        let license = get_license();
88
        let license = get_license();
Lines 169-174 describe("License CRUD operations", () => { Link Here
169
        cy.wait("@get-license");
170
        cy.wait("@get-license");
170
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
171
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
171
        cy.get("#licenses_add h2").contains("Edit license");
172
        cy.get("#licenses_add h2").contains("Edit license");
173
        cy.left_menu_active_item_is("Licenses");
172
174
173
        // Form has been correctly filled in
175
        // Form has been correctly filled in
174
        cy.get("#license_name").should("have.value", license.name);
176
        cy.get("#license_name").should("have.value", license.name);
Lines 230-235 describe("License CRUD operations", () => { Link Here
230
        cy.wait("@get-license");
232
        cy.wait("@get-license");
231
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
233
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
232
        cy.get("#licenses_show h2").contains("License #" + license.license_id);
234
        cy.get("#licenses_show h2").contains("License #" + license.license_id);
235
        cy.left_menu_active_item_is("Licenses");
233
    });
236
    });
234
237
235
    it("Delete license", () => {
238
    it("Delete license", () => {
(-)a/t/cypress/integration/ERM/Packages_spec.ts (+4 lines)
Lines 86-91 describe("Package CRUD operations", () => { Link Here
86
        cy.visit("/cgi-bin/koha/erm/eholdings/local/packages");
86
        cy.visit("/cgi-bin/koha/erm/eholdings/local/packages");
87
        cy.contains("New package").click();
87
        cy.contains("New package").click();
88
        cy.get("#packages_add h2").contains("New package");
88
        cy.get("#packages_add h2").contains("New package");
89
        cy.left_menu_active_item_is("Packages");
89
90
90
        // Fill in the form for normal attributes
91
        // Fill in the form for normal attributes
91
        let erm_package = get_package();
92
        let erm_package = get_package();
Lines 171-176 describe("Package CRUD operations", () => { Link Here
171
        cy.wait("@get-package");
172
        cy.wait("@get-package");
172
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
173
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
173
        cy.get("#packages_add h2").contains("Edit package");
174
        cy.get("#packages_add h2").contains("Edit package");
175
        cy.left_menu_active_item_is("Packages");
174
176
175
        // Form has been correctly filled in
177
        // Form has been correctly filled in
176
        cy.get("#package_name").should("have.value", erm_package.name);
178
        cy.get("#package_name").should("have.value", erm_package.name);
Lines 232-237 describe("Package CRUD operations", () => { Link Here
232
        cy.get("#packages_show h2").contains(
234
        cy.get("#packages_show h2").contains(
233
            "Package #" + erm_package.package_id
235
            "Package #" + erm_package.package_id
234
        );
236
        );
237
        cy.left_menu_active_item_is("Packages");
238
235
        // There are no resources, the table should not be displayed
239
        // There are no resources, the table should not be displayed
236
        cy.contains("Titles (0)");
240
        cy.contains("Titles (0)");
237
        cy.get("#title_list_result table").should("not.exist");
241
        cy.get("#title_list_result table").should("not.exist");
(-)a/t/cypress/integration/ERM/Titles_spec.ts (+4 lines)
Lines 47-52 describe("Title CRUD operations", () => { Link Here
47
        cy.wait(500);
47
        cy.wait(500);
48
        cy.get("#toolbar a").contains("Import from list").click();
48
        cy.get("#toolbar a").contains("Import from list").click();
49
        cy.get("h2").contains("Import from a list");
49
        cy.get("h2").contains("Import from a list");
50
        cy.left_menu_active_item_is("Titles");
50
        cy.get("#package_list .vs__selected").should("not.exist");
51
        cy.get("#package_list .vs__selected").should("not.exist");
51
52
52
        // Make sure packages are returned
53
        // Make sure packages are returned
Lines 127-132 describe("Title CRUD operations", () => { Link Here
127
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
128
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
128
        cy.contains("New title").click();
129
        cy.contains("New title").click();
129
        cy.get("#titles_add h2").contains("New title");
130
        cy.get("#titles_add h2").contains("New title");
131
        cy.left_menu_active_item_is("Titles");
130
132
131
        // Fill in the form for normal attributes
133
        // Fill in the form for normal attributes
132
        let erm_title = cy.get_title();
134
        let erm_title = cy.get_title();
Lines 249-254 describe("Title CRUD operations", () => { Link Here
249
        cy.wait("@get-title");
251
        cy.wait("@get-title");
250
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
252
        cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
251
        cy.get("#titles_add h2").contains("Edit title");
253
        cy.get("#titles_add h2").contains("Edit title");
254
        cy.left_menu_active_item_is("Titles");
252
255
253
        // Form has been correctly filled in
256
        // Form has been correctly filled in
254
        cy.get("#title_publication_title").should(
257
        cy.get("#title_publication_title").should(
Lines 402-407 describe("Title CRUD operations", () => { Link Here
402
        cy.get("#eholdings_title_show h2").contains(
405
        cy.get("#eholdings_title_show h2").contains(
403
            "Title #" + erm_title.title_id
406
            "Title #" + erm_title.title_id
404
        );
407
        );
408
        cy.left_menu_active_item_is("Titles");
405
        // There are no packages, the table should not be displayed
409
        // There are no packages, the table should not be displayed
406
        cy.contains("Packages (0)");
410
        cy.contains("Packages (0)");
407
        cy.get("#table#package_list").should("not.exist");
411
        cy.get("#table#package_list").should("not.exist");
(-)a/t/cypress/support/index.js (-1 / +4 lines)
Lines 19-24 import './commands'; Link Here
19
// Alternatively you can use CommonJS syntax:
19
// Alternatively you can use CommonJS syntax:
20
// require('./commands')
20
// require('./commands')
21
21
22
Cypress.Commands.add('left_menu_active_item_is', (label) => {
23
    cy.get("#navmenulist a.current:not(.disabled)").should('have.length',1).contains(label);
24
})
25
22
cy.get_title = () => {
26
cy.get_title = () => {
23
    return {
27
    return {
24
        access_type: "access type",
28
        access_type: "access type",
25
- 

Return to bug 34691