From 0e67b7a0e76d32b088f4b04d330875d66aa048fb Mon Sep 17 00:00:00 2001 From: Pranshu1902 Date: Sat, 13 Jan 2024 19:05:39 +0530 Subject: [PATCH] fix cypress tests --- cypress/e2e/facility_spec/locations.cy.ts | 4 +++- src/Components/Facility/LocationManagement.tsx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/facility_spec/locations.cy.ts b/cypress/e2e/facility_spec/locations.cy.ts index f590b4d02d5..aad777b9aa6 100644 --- a/cypress/e2e/facility_spec/locations.cy.ts +++ b/cypress/e2e/facility_spec/locations.cy.ts @@ -175,7 +175,9 @@ describe("Location Management Section", () => { // delete location cy.get("button[id=delete-location-button]").click().wait(1000); cy.get("button[id=submit]").click(); - cy.contains("Location Test Location deleted successfully").should("exist"); + facilityLocation.verifyNotification( + "Location Test Location deleted successfully" + ); }); afterEach(() => { diff --git a/src/Components/Facility/LocationManagement.tsx b/src/Components/Facility/LocationManagement.tsx index 72080b7757b..e9665540ba9 100644 --- a/src/Components/Facility/LocationManagement.tsx +++ b/src/Components/Facility/LocationManagement.tsx @@ -37,7 +37,7 @@ export default function LocationManagement({ facilityId }: Props) { }); if (res?.ok) { Notification.Success({ - msg: `Location ${showDeletePopup.name} deleted successully`, + msg: `Location ${showDeletePopup.name} deleted successfully`, }); } setShowDeletePopup({ ...showDeletePopup, open: false });