|
Lines 506-520
describe("Agreement CRUD operations", () => {
Link Here
|
| 506 |
cy.get("#agreements_list table tbody tr:first") |
506 |
cy.get("#agreements_list table tbody tr:first") |
| 507 |
.contains("Delete") |
507 |
.contains("Delete") |
| 508 |
.click(); |
508 |
.click(); |
| 509 |
cy.get("#agreements_confirm_delete h2").contains("Delete agreement"); |
509 |
cy.get(".dialog.alert.confirmation h1").contains("remove this agreement"); |
| 510 |
cy.contains("Agreement name: " + agreement.name); |
|
|
| 511 |
|
510 |
|
| 512 |
// Submit the form, get 500 |
511 |
// Submit the form, get 500 |
| 513 |
cy.intercept("DELETE", "/api/v1/erm/agreements/*", { |
512 |
cy.intercept("DELETE", "/api/v1/erm/agreements/*", { |
| 514 |
statusCode: 500, |
513 |
statusCode: 500, |
| 515 |
error: "Something went wrong", |
514 |
error: "Something went wrong", |
| 516 |
}); |
515 |
}); |
| 517 |
cy.contains("Yes, delete").click(); |
516 |
cy.contains("Accept").click(); |
| 518 |
cy.get("main div[class='dialog alert']").contains( |
517 |
cy.get("main div[class='dialog alert']").contains( |
| 519 |
"Something went wrong: Error: Internal Server Error" |
518 |
"Something went wrong: Error: Internal Server Error" |
| 520 |
); |
519 |
); |
|
Lines 524-530
describe("Agreement CRUD operations", () => {
Link Here
|
| 524 |
statusCode: 204, |
523 |
statusCode: 204, |
| 525 |
body: null, |
524 |
body: null, |
| 526 |
}); |
525 |
}); |
| 527 |
cy.contains("Yes, delete").click(); |
526 |
cy.get("#agreements_list table tbody tr:first") |
|
|
527 |
.contains("Delete") |
| 528 |
.click(); |
| 529 |
cy.get(".dialog.alert.confirmation h1").contains("remove this agreement"); |
| 530 |
cy.contains("Accept").click(); |
| 528 |
cy.get("main div[class='dialog message']").contains( |
531 |
cy.get("main div[class='dialog message']").contains( |
| 529 |
"Agreement deleted" |
532 |
"Agreement deleted" |
| 530 |
); |
533 |
); |
| 531 |
- |
|
|