From 5a88428931b2af62f5b73d58cf21142a64c08d58 Mon Sep 17 00:00:00 2001 From: Drew Del Rosario Date: Wed, 4 Oct 2023 20:23:58 -0700 Subject: [PATCH] Fix locator --- e2e/tests/erStatus.spec.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/e2e/tests/erStatus.spec.js b/e2e/tests/erStatus.spec.js index 38dca869..4c32df51 100644 --- a/e2e/tests/erStatus.spec.js +++ b/e2e/tests/erStatus.spec.js @@ -31,8 +31,8 @@ test.describe('ER status', () => { await expect(appPage).toHaveURL('/ems'); await appPage.getByRole('button', { name: /hospital info/i }).click(); const ucsfRow = appPage.locator('.hospitalstatusrow_container').filter({ hasText: /ucsf parnassus/i }); - await expect(ucsfRow.getByText('5')).toBeVisible(); - await expect(ucsfRow.getByText('8')).toBeVisible(); + await expect(ucsfRow.locator('.hospitalstatusrow__data').filter({ hasText: '5' })).toBeVisible(); + await expect(ucsfRow.locator('.hospitalstatusrow__data').filter({ hasText: '8' })).toBeVisible(); await expect(ucsfRow.getByText('scanner broke')).toBeVisible(); await context.close(); }); @@ -66,7 +66,6 @@ test.describe('ER status', () => { await expect(appPage).toHaveURL('/ems'); await appPage.getByRole('button', { name: /hospital info/i }).click(); const row = appPage.locator('.hospitalstatusrow_container', { hasText: /ucsf parnassus/i }); - // console.log("ROW: ", row) await expect(row.locator('.hospitalstatusrow__data', { hasText: '5' })).not.toBeVisible(); await expect(row.locator('.hospitalstatusrow__data', { hasText: '8' })).not.toBeVisible(); await expect(row.locator('.hospitalstatusrow__notes', { hasText: 'scanner broke' })).not.toBeVisible();