From 715ee60b6f40f948d48c46d1a7094f7c0a2a394d Mon Sep 17 00:00:00 2001
From: Jovan Ssebaggala <jssebaggala@outlook.com>
Date: Tue, 20 Aug 2024 07:10:27 +0300
Subject: [PATCH] fix failing tests

---
 e2e/specs/clinical-forms.spec.ts | 8 ++++----
 e2e/specs/results-viewer.spec.ts | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/e2e/specs/clinical-forms.spec.ts b/e2e/specs/clinical-forms.spec.ts
index 46c343b921..3f5879c782 100644
--- a/e2e/specs/clinical-forms.spec.ts
+++ b/e2e/specs/clinical-forms.spec.ts
@@ -90,8 +90,8 @@ test('Fill a clinical form', async ({ page }) => {
   });
 
   await test.step('Then I should see a success notification', async () => {
-    await expect(page.getByText(/record created/i, { exact: true })).toBeVisible();
-    await expect(page.getByText(/a new encounter was created/i, { exact: true })).toBeVisible();
+    await expect(page.getByText(/form submitted/i, { exact: true })).toBeVisible();
+    await expect(page.getByText(/form submitted successfully/i, { exact: true })).toBeVisible();
   });
 
   await test.step('And if I navigate to the visits dashboard', async () => {
@@ -219,8 +219,8 @@ test('Form state is retained when minimizing a form in the workspace', async ({
   });
 
   await test.step('Then I should see a success notification', async () => {
-    await expect(page.getByText(/record created/i)).toBeVisible();
-    await expect(page.getByText(/a new encounter was created/i)).toBeVisible();
+    await expect(page.getByText(/form submitted/i)).toBeVisible();
+    await expect(page.getByText(/form submitted successfully/i)).toBeVisible();
   });
 });
 
diff --git a/e2e/specs/results-viewer.spec.ts b/e2e/specs/results-viewer.spec.ts
index f914e2275f..0dce6a4a1d 100644
--- a/e2e/specs/results-viewer.spec.ts
+++ b/e2e/specs/results-viewer.spec.ts
@@ -257,8 +257,8 @@ test('Record and edit test results', async ({ page }) => {
   });
 
   await test.step('Then I should see a success notification', async () => {
-    await expect(page.getByText(/record created/i, { exact: true })).toBeVisible();
-    await expect(page.getByText(/a new encounter was created/i, { exact: true })).toBeVisible();
+    await expect(page.getByText(/form submitted/i, { exact: true })).toBeVisible();
+    await expect(page.getByText(/form submitted successfully/i, { exact: true })).toBeVisible();
   });
 
   await test.step('When I go to the results viewer page', async () => {