|
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 |
); |