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

(-)a/t/cypress/integration/SIP2/Accounts.ts (-6 / +6 lines)
Lines 136-142 describe("Accounts", () => { Link Here
136
        cy.left_menu_active_item_is("Accounts");
136
        cy.left_menu_active_item_is("Accounts");
137
137
138
        // Fill in the form for normal attributes
138
        // Fill in the form for normal attributes
139
        cy.get("#accounts_add").contains("Submit").click();
139
        cy.get("#accounts_add").contains("Save").click();
140
        cy.get("input:invalid,textarea:invalid,select:invalid").should(
140
        cy.get("input:invalid,textarea:invalid,select:invalid").should(
141
            "have.length",
141
            "have.length",
142
            2
142
            2
Lines 195-201 describe("Accounts", () => { Link Here
195
195
196
        // relationshipWidgets
196
        // relationshipWidgets
197
        cy.contains("Add new custom patron field").click();
197
        cy.contains("Add new custom patron field").click();
198
        cy.get("#accounts_add").contains("Submit").click();
198
        cy.get("#accounts_add").contains("Save").click();
199
        cy.get("input:invalid,textarea:invalid,select:invalid").should(
199
        cy.get("input:invalid,textarea:invalid,select:invalid").should(
200
            "have.length",
200
            "have.length",
201
            2
201
            2
Lines 239-245 describe("Accounts", () => { Link Here
239
        cy.intercept("POST", "/api/v1/sip2/accounts", {
239
        cy.intercept("POST", "/api/v1/sip2/accounts", {
240
            statusCode: 500,
240
            statusCode: 500,
241
        });
241
        });
242
        cy.get("#accounts_add").contains("Submit").click();
242
        cy.get("#accounts_add").contains("Save").click();
243
243
244
        cy.get("main div[class='alert alert-warning']").contains(
244
        cy.get("main div[class='alert alert-warning']").contains(
245
            "Something went wrong: Error: Internal Server Error"
245
            "Something went wrong: Error: Internal Server Error"
Lines 250-256 describe("Accounts", () => { Link Here
250
            statusCode: 201,
250
            statusCode: 201,
251
            body: account,
251
            body: account,
252
        });
252
        });
253
        cy.get("#accounts_add").contains("Submit").click();
253
        cy.get("#accounts_add").contains("Save").click();
254
        cy.get("main div[class='alert alert-info']").contains(
254
        cy.get("main div[class='alert alert-info']").contains(
255
            "Account created"
255
            "Account created"
256
        );
256
        );
Lines 310-316 describe("Accounts", () => { Link Here
310
                delay: 1000,
310
                delay: 1000,
311
            });
311
            });
312
        }).as("edit-account");
312
        }).as("edit-account");
313
        cy.get("#accounts_add").contains("Submit").click();
313
        cy.get("#accounts_add").contains("Save").click();
314
        cy.get("main div[class='modal_centered']").contains("Submitting...");
314
        cy.get("main div[class='modal_centered']").contains("Submitting...");
315
        cy.wait("@edit-account");
315
        cy.wait("@edit-account");
316
        cy.get("main div[class='alert alert-warning']").contains(
316
        cy.get("main div[class='alert alert-warning']").contains(
Lines 322-328 describe("Accounts", () => { Link Here
322
            statusCode: 200,
322
            statusCode: 200,
323
            body: account,
323
            body: account,
324
        });
324
        });
325
        cy.get("#accounts_add").contains("Submit").click();
325
        cy.get("#accounts_add").contains("Save").click();
326
        cy.get("main div[class='alert alert-info']").contains(
326
        cy.get("main div[class='alert alert-info']").contains(
327
            "Account updated"
327
            "Account updated"
328
        );
328
        );
(-)a/t/cypress/integration/SIP2/Institutions.ts (-5 / +5 lines)
Lines 57-63 describe("Institutions", () => { Link Here
57
        cy.left_menu_active_item_is("Institutions");
57
        cy.left_menu_active_item_is("Institutions");
58
58
59
        // Fill in the form for normal attributes
59
        // Fill in the form for normal attributes
60
        cy.get("#institutions_add").contains("Submit").click();
60
        cy.get("#institutions_add").contains("Save").click();
61
        cy.get("input:invalid,textarea:invalid,select:invalid").should(
61
        cy.get("input:invalid,textarea:invalid,select:invalid").should(
62
            "have.length",
62
            "have.length",
63
            1
63
            1
Lines 83-89 describe("Institutions", () => { Link Here
83
        cy.intercept("POST", "/api/v1/sip2/institutions", {
83
        cy.intercept("POST", "/api/v1/sip2/institutions", {
84
            statusCode: 500,
84
            statusCode: 500,
85
        });
85
        });
86
        cy.get("#institutions_add").contains("Submit").click();
86
        cy.get("#institutions_add").contains("Save").click();
87
87
88
        cy.get("main div[class='alert alert-warning']").contains(
88
        cy.get("main div[class='alert alert-warning']").contains(
89
            "Something went wrong: Error: Internal Server Error"
89
            "Something went wrong: Error: Internal Server Error"
Lines 94-100 describe("Institutions", () => { Link Here
94
            statusCode: 201,
94
            statusCode: 201,
95
            body: institution,
95
            body: institution,
96
        });
96
        });
97
        cy.get("#institutions_add").contains("Submit").click();
97
        cy.get("#institutions_add").contains("Save").click();
98
        cy.get("main div[class='alert alert-info']").contains(
98
        cy.get("main div[class='alert alert-info']").contains(
99
            "Institution created"
99
            "Institution created"
100
        );
100
        );
Lines 152-158 describe("Institutions", () => { Link Here
152
                delay: 1000,
152
                delay: 1000,
153
            });
153
            });
154
        });
154
        });
155
        cy.get("#institutions_add").contains("Submit").click();
155
        cy.get("#institutions_add").contains("Save").click();
156
156
157
        cy.get("main div[class='modal_centered']").contains("Submitting...");
157
        cy.get("main div[class='modal_centered']").contains("Submitting...");
158
        cy.wait(1000);
158
        cy.wait(1000);
Lines 165-171 describe("Institutions", () => { Link Here
165
            statusCode: 200,
165
            statusCode: 200,
166
            body: institution,
166
            body: institution,
167
        });
167
        });
168
        cy.get("#institutions_add").contains("Submit").click();
168
        cy.get("#institutions_add").contains("Save").click();
169
        cy.get("main div[class='alert alert-info']").contains(
169
        cy.get("main div[class='alert alert-info']").contains(
170
            "Institution updated"
170
            "Institution updated"
171
        );
171
        );
(-)a/t/cypress/integration/SIP2/SystemPreferenceOverrides.ts (-6 / +5 lines)
Lines 73-79 describe("SystemPreferenceOverrides", () => { Link Here
73
        cy.left_menu_active_item_is("System preference overrides");
73
        cy.left_menu_active_item_is("System preference overrides");
74
74
75
        // Fill in the form for normal attributes
75
        // Fill in the form for normal attributes
76
        cy.get("#system_preference_overrides_add").contains("Submit").click();
76
        cy.get("#system_preference_overrides_add").contains("Save").click();
77
        cy.get("input:invalid,textarea:invalid,select:invalid").should(
77
        cy.get("input:invalid,textarea:invalid,select:invalid").should(
78
            "have.length",
78
            "have.length",
79
            2
79
            2
Lines 85-91 describe("SystemPreferenceOverrides", () => { Link Here
85
        cy.intercept("POST", "/api/v1/sip2/system_preference_overrides", {
85
        cy.intercept("POST", "/api/v1/sip2/system_preference_overrides", {
86
            statusCode: 500,
86
            statusCode: 500,
87
        });
87
        });
88
        cy.get("#system_preference_overrides_add").contains("Submit").click();
88
        cy.get("#system_preference_overrides_add").contains("Save").click();
89
89
90
        cy.get("main div[class='alert alert-warning']").contains(
90
        cy.get("main div[class='alert alert-warning']").contains(
91
            "Something went wrong: Error: Internal Server Error"
91
            "Something went wrong: Error: Internal Server Error"
Lines 96-102 describe("SystemPreferenceOverrides", () => { Link Here
96
            statusCode: 201,
96
            statusCode: 201,
97
            body: system_preference_override,
97
            body: system_preference_override,
98
        });
98
        });
99
        cy.get("#system_preference_overrides_add").contains("Submit").click();
99
        cy.get("#system_preference_overrides_add").contains("Save").click();
100
        cy.get("main div[class='alert alert-info']").contains(
100
        cy.get("main div[class='alert alert-info']").contains(
101
            "System preference override created"
101
            "System preference override created"
102
        );
102
        );
Lines 157-163 describe("SystemPreferenceOverrides", () => { Link Here
157
                });
157
                });
158
            }
158
            }
159
        );
159
        );
160
        cy.get("#system_preference_overrides_add").contains("Submit").click();
160
        cy.get("#system_preference_overrides_add").contains("Save").click();
161
161
162
        cy.get("main div[class='modal_centered']").contains("Submitting...");
162
        cy.get("main div[class='modal_centered']").contains("Submitting...");
163
        cy.wait(1000);
163
        cy.wait(1000);
Lines 170-176 describe("SystemPreferenceOverrides", () => { Link Here
170
            statusCode: 200,
170
            statusCode: 200,
171
            body: system_preference_overrides,
171
            body: system_preference_overrides,
172
        });
172
        });
173
        cy.get("#system_preference_overrides_add").contains("Submit").click();
173
        cy.get("#system_preference_overrides_add").contains("Save").click();
174
        cy.get("main div[class='alert alert-info']").contains(
174
        cy.get("main div[class='alert alert-info']").contains(
175
            "System preference override updated"
175
            "System preference override updated"
176
        );
176
        );
177
- 

Return to bug 41916