Skip to content

Commit

Permalink
chore: Update e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveGT96 committed Dec 2, 2024
1 parent a90ea96 commit 10d8dce
Show file tree
Hide file tree
Showing 31 changed files with 31 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ describe("Add Disease Activity specs", () => {
it("should cancel the cancellation of the disease creation", () => {
cy.dataCy("add-new-disease").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to Reset the Form? All the unsaved data will be lost."
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ describe("Diseases Edit Activity specs", () => {
it("should cancel the cancellation of the disease creation", () => {
cy.dataCy("table-edit-action").first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to Reset the Form? All the unsaved data will be lost."
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("Add exam Activity specs", () => {
it("should cancel the cancellation of the exam creation", () => {
cy.dataCy("add-new-exam").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains("Are you sure to Reset the Form");
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe("Exams edit activity specs", () => {
it("should cancel the cancellation of the exam creation", () => {
cy.dataCy("table-edit-action").first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains("Are you sure to Reset the Form");
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ describe("Add Operation Activity specs", () => {
it("should cancel the cancellation of the operation creation", () => {
cy.dataCy("add-new-operation").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to Reset the Form? All the unsaved data will be lost."
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ describe("Operations Edit Activity specs", () => {
it("should cancel the cancellation of the operation creation", () => {
cy.dataCy("table-edit-action").first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to Reset the Form? All the unsaved data will be lost."
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.be.visible");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ describe("Add admission type Activity specs", () => {
it("should cancel the cancellation of the admission type creation", () => {
cy.dataCy("add-admission-type").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the admission type creation?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ describe("Admission types Edit Activity specs", () => {
it("should cancel the cancellation of the admission type update", () => {
cy.dataCy("table-edit-action").first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the admission type update?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ describe("Admission types Edit Activity specs", () => {
it("should cancel the cancellation of the age types update", () => {
cy.dataCy("edit-age-types").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the age types update?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ describe("Add delivery type Activity specs", () => {
it("should cancel the cancellation of the delivery type creation", () => {
cy.dataCy("add-delivery-type").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the delivery type creation?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ describe("Delivery types Edit Activity specs", () => {
it("should cancel the cancellation of the delivery type update", () => {
cy.dataCy("table-edit-action").first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the delivery type update?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ describe("Add delivery result type Activity specs", () => {
it("should cancel the cancellation of the delivery result type creation", () => {
cy.dataCy("add-deliveryresult-type").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the delivery result type creation?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ describe("Delivery result types Edit Activity specs", () => {
it("should cancel the cancellation of the delivery result type update", () => {
cy.dataCy("table-edit-action").first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the delivery result type update?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ describe("Add discharge type Activity specs", () => {
it("should cancel the cancellation of the discharge type creation", () => {
cy.dataCy("add-discharge-type").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the discharge type creation?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ describe("Discharge types Edit Activity specs", () => {
it("should cancel the cancellation of the discharge type update", () => {
cy.dataCy("table-edit-action").first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the discharge type update?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ describe("Add disease type Activity specs", () => {
it("should cancel the cancellation of the disease type creation", () => {
cy.dataCy("add-disease-type").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the disease type creation?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ describe("Disease types Edit Activity specs", () => {
it("should cancel the cancellation of the disease type update", () => {
cy.dataCy("table-edit-action").first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the disease type update?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ describe("Add exam type Activity specs", () => {
it("should cancel the cancellation of the exam type creation", () => {
cy.dataCy("add-exam-type").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the exam type creation?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ describe("Exam types Edit Activity specs", () => {
it("should cancel the cancellation of the exam type update", () => {
cy.dataCy("table-edit-action").first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the exam type update?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ describe("Add medical type Activity specs", () => {
it("should cancel the cancellation of the medical type creation", () => {
cy.dataCy("add-medical-type").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the medical type creation?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ describe("Medical types Edit Activity specs", () => {
it("should cancel the cancellation of the medical type update", () => {
cy.dataCy("table-edit-action").first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the medical type update?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ describe("Add operation type Activity specs", () => {
it("should cancel the cancellation of the operation type creation", () => {
cy.dataCy("add-operation-type").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the operation type creation?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ describe("Operation types Edit Activity specs", () => {
it("should cancel the cancellation of the operation type update", () => {
cy.dataCy("table-edit-action").first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the operation type update?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ describe("Add pregnant treatment type Activity specs", () => {
it("should cancel the cancellation of the pregnant treatment type creation", () => {
cy.dataCy("add-pregnanttreatment-type").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the pregnant treatment type creation?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ describe("Pregnant treatment types Edit Activity specs", () => {
it("should cancel the cancellation of the pregnant treatment type update", () => {
cy.dataCy("table-edit-action").first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the pregnant treatment type update?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ describe("Add vaccine type Activity specs", () => {
it("should cancel the cancellation of the vaccine type creation", () => {
cy.dataCy("add-vaccine-type").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the vaccine type creation?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ describe("vaccine types Edit Activity specs", () => {
it("should cancel the cancellation of the vaccine type update", () => {
cy.dataCy("table-edit-action").first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the vaccine type update?"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ describe("Add Vaccine Activity specs", () => {
it("should cancel the cancellation of the vaccine creation", () => {
cy.dataCy("add-new-vaccine").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the vaccine creation"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ describe("Vaccines Edit Activity specs", () => {
it("should cancel the cancellation of the vaccine creation", () => {
cy.dataCy("table-edit-action").first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to cancel the vaccine update"
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.exist");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ describe("Add Ward Activity specs", () => {
it("should cancel the cancellation of the ward creation", () => {
cy.dataCy("add-new-ward").click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to Reset the Form? All the unsaved data will be lost."
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.be.visible");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ describe("Edit Ward Activity specs", () => {
it("should cancel the cancellation of the ward creation", () => {
cy.get('button[title="Edit"]').first().click();
cy.dataCy("cancel-form").click();
cy.dataCy("dialog-info").contains(
"Are you sure to Reset the Form? All the unsaved data will be lost."
);
cy.dataCy("dialog-info").contains("lost");
cy.dataCy("close-dialog").click();
cy.dataCy("dialog-info").should("not.be.visible");
});
Expand Down

0 comments on commit 10d8dce

Please sign in to comment.