diff --git a/e2e/pages/allergies-page.ts b/e2e/pages/allergies-page.ts index d87204e413..f3fb09e219 100644 --- a/e2e/pages/allergies-page.ts +++ b/e2e/pages/allergies-page.ts @@ -3,8 +3,7 @@ import { Page } from '@playwright/test'; export class PatientAllergiesPage { constructor(readonly page: Page) {} - // TODO: Switch to getByRole locators using the provided aria-labels - readonly allergyTable = () => this.page.getByTestId('allergy-table'); + readonly allergiesTable = () => this.page.getByRole('table', { name: /allergies summary/i }); async goTo(uuid: string) { await this.page.goto('/openmrs/spa/patient/' + uuid + '/chart/Allergies'); diff --git a/e2e/pages/conditions-page.ts b/e2e/pages/conditions-page.ts index d4f7f66b11..1c08645a71 100644 --- a/e2e/pages/conditions-page.ts +++ b/e2e/pages/conditions-page.ts @@ -3,7 +3,7 @@ import { Page } from '@playwright/test'; export class ConditionsPage { constructor(readonly page: Page) {} - readonly conditionsTable = () => this.page.locator('tbody'); + readonly conditionsTable = () => this.page.getByRole('table', { name: /conditions summary/i }); async goTo(uuid: string) { await this.page.goto(`/openmrs/spa/patient/${uuid}/chart/Conditions`); diff --git a/e2e/pages/program-page.ts b/e2e/pages/program-page.ts index 2d5b4f3cd9..04b841fb73 100644 --- a/e2e/pages/program-page.ts +++ b/e2e/pages/program-page.ts @@ -3,9 +3,8 @@ import { Page } from '@playwright/test'; export class ProgramsPage { constructor(readonly page: Page) {} - // TODO: Switch to getByRole locators using the provided aria-labels - readonly programsTable = () => this.page.getByTestId('program-table'); - readonly editButton = () => this.page.getByTestId('edit-program-button'); + readonly programsTable = () => this.page.getByRole('table', { name: /program enrollments/i }); + readonly editProgramButton = () => this.page.getByRole('button', { name: /edit program/i }); async goTo(patientUuid: string) { await this.page.goto(`patient/${patientUuid}/chart/Programs`); diff --git a/e2e/pages/vitals-and-biometrics-page.ts b/e2e/pages/vitals-and-biometrics-page.ts index a498ff120b..f31cabac3a 100644 --- a/e2e/pages/vitals-and-biometrics-page.ts +++ b/e2e/pages/vitals-and-biometrics-page.ts @@ -3,9 +3,8 @@ import { Page } from '@playwright/test'; export class BiometricsAndVitalsPage { constructor(readonly page: Page) {} - // TODO: Switch to getByRole locators using the provided aria-labels - readonly vitalsTable = () => this.page.getByTestId('vitals-table'); - readonly biometricsTable = () => this.page.getByTestId('biometrics-table'); + readonly biometricsTable = () => this.page.getByRole('table', { name: /biometrics/i }); + readonly vitalsTable = () => this.page.getByRole('table', { name: /vitals/i }); async goTo(uuid: string) { await this.page.goto('/openmrs/spa/patient/' + uuid + '/chart/Vitals%20%26%20Biometrics'); diff --git a/e2e/specs/biometrics.spec.ts b/e2e/specs/biometrics.spec.ts index 47970fddf8..5ee6d4bb9a 100644 --- a/e2e/specs/biometrics.spec.ts +++ b/e2e/specs/biometrics.spec.ts @@ -1,8 +1,8 @@ -import { test } from '../core'; -import { BiometricsAndVitalsPage } from '../pages'; import { expect } from '@playwright/test'; -import { generateRandomPatient, deletePatient, Patient, startVisit, endVisit } from '../commands'; import { Visit } from '@openmrs/esm-framework'; +import { generateRandomPatient, deletePatient, Patient, startVisit, endVisit } from '../commands'; +import { test } from '../core'; +import { BiometricsAndVitalsPage } from '../pages'; let patient: Patient; let visit: Visit; @@ -25,7 +25,7 @@ test('Record biometrics', async ({ page, api }) => { await test.step('And then I fill the form', async () => { await biometricsPage.page.getByRole('spinbutton', { name: /height/i }).fill('170'); - await biometricsPage.page.getByRole('spinbutton', { name: /Weight/i }).fill('65'); + await biometricsPage.page.getByRole('spinbutton', { name: /weight/i }).fill('65'); await expect(biometricsPage.page.getByRole('spinbutton', { name: /bmi/i })).toHaveValue('22.5'); await biometricsPage.page.getByRole('spinbutton', { name: /muac/i }).fill('25'); }); @@ -40,12 +40,12 @@ test('Record biometrics', async ({ page, api }) => { await test.step('And I should see the newly recorded biometrics on the page', async () => { const headerRow = biometricsPage.biometricsTable().locator('thead > tr'); + const dataRow = biometricsPage.biometricsTable().locator('tbody > tr'); + await expect(headerRow).toContainText(/weight/i); await expect(headerRow).toContainText(/height/i); await expect(headerRow).toContainText(/bmi/i); await expect(headerRow).toContainText(/muac/i); - - const dataRow = biometricsPage.biometricsTable().locator('tbody > tr'); await expect(dataRow).toContainText('65'); await expect(dataRow).toContainText('170'); await expect(dataRow).toContainText('22.5'); diff --git a/e2e/specs/conditions.spec.ts b/e2e/specs/conditions.spec.ts index 70378a641f..5908c2beaf 100644 --- a/e2e/specs/conditions.spec.ts +++ b/e2e/specs/conditions.spec.ts @@ -1,7 +1,7 @@ -import { test } from '../core'; -import { ConditionsPage } from '../pages'; import { expect } from '@playwright/test'; import { generateRandomPatient, deletePatient, Patient } from '../commands'; +import { test } from '../core'; +import { ConditionsPage } from '../pages'; let patient: Patient; @@ -11,9 +11,8 @@ test.beforeEach(async ({ api }) => { test('Record, edit and delete a condition', async ({ page, api }) => { const conditionsPage = new ConditionsPage(page); - const table = conditionsPage.page.getByRole('table', { name: /conditions summary/i }); - const headerRow = table.locator('thead > tr'); - const dataRow = table.locator('tbody > tr'); + const headerRow = conditionsPage.conditionsTable().locator('thead > tr'); + const dataRow = conditionsPage.conditionsTable().locator('tbody > tr'); await test.step('When I go to the Conditions page', async () => { await conditionsPage.goTo(patient.uuid); diff --git a/e2e/specs/drug-allergies.spec.ts b/e2e/specs/drug-allergies.spec.ts index 8c3fe166b7..000fdd4ed5 100644 --- a/e2e/specs/drug-allergies.spec.ts +++ b/e2e/specs/drug-allergies.spec.ts @@ -1,7 +1,7 @@ -import { test } from '../core'; -import { PatientAllergiesPage } from '../pages'; import { expect } from '@playwright/test'; import { generateRandomPatient, deletePatient, Patient } from '../commands'; +import { test } from '../core'; +import { PatientAllergiesPage } from '../pages'; let patient: Patient; @@ -11,19 +11,21 @@ test.beforeEach(async ({ api }) => { test('Record an allergy to a drug', async ({ page, api }) => { const allergiesPage = new PatientAllergiesPage(page); + const headerRow = allergiesPage.allergiesTable().locator('thead > tr'); + const dataRow = allergiesPage.allergiesTable().locator('tbody > tr'); await test.step('When I visit the Allergies page', async () => { await allergiesPage.goTo(patient.uuid); }); await test.step('And I click the `Record allergy intolerance` link to launch the form', async () => { - await allergiesPage.page.getByText('Record allergy').click(); + await allergiesPage.page.getByText(/record allergy intolerance/i).click(); }); await test.step('And I record an allergy to a drug', async () => { - await allergiesPage.page.getByText('ACE inhibitors').click(); - await allergiesPage.page.getByText('Mental status change').click(); - await allergiesPage.page.getByText('Mild').click(); + await allergiesPage.page.getByText(/ace inhibitors/i).click(); + await allergiesPage.page.getByText(/mental status change/i).click(); + await allergiesPage.page.getByText(/mild/i).click(); await allergiesPage.page.locator('#comments').fill('Test comment'); }); @@ -36,15 +38,14 @@ test('Record an allergy to a drug', async ({ page, api }) => { }); await test.step('And I should see the newly recorded drug allergen in the list', async () => { - const rows = allergiesPage.allergyTable().locator('tr'); - const allergenCell = rows.locator('td:first-child'); - const severityCell = rows.locator('td:nth-child(2)'); - const reactionCell = rows.locator('td:nth-child(3)'); - const commentCell = rows.locator('td:nth-child(4)'); - await expect(allergenCell).toHaveText('ACE inhibitors'); - await expect(reactionCell).toHaveText('Mental status change'); - await expect(severityCell).toHaveText('low'); - await expect(commentCell).toHaveText('Test comment'); + await expect(headerRow).toContainText(/allergen/i); + await expect(headerRow).toContainText(/severity/i); + await expect(headerRow).toContainText(/reaction/i); + await expect(headerRow).toContainText(/onset date and comments/i); + await expect(dataRow).toContainText(/ace inhibitors/i); + await expect(dataRow).toContainText(/low/i); + await expect(dataRow).toContainText(/mental status change/i); + await expect(dataRow).toContainText(/test comment/i); }); }); diff --git a/e2e/specs/environmental-allergies.spec.ts b/e2e/specs/environmental-allergies.spec.ts index 1cc653eabc..b2fd96c1b7 100644 --- a/e2e/specs/environmental-allergies.spec.ts +++ b/e2e/specs/environmental-allergies.spec.ts @@ -1,7 +1,7 @@ -import { test } from '../core'; -import { PatientAllergiesPage } from '../pages'; import { expect } from '@playwright/test'; import { generateRandomPatient, deletePatient, Patient } from '../commands'; +import { test } from '../core'; +import { PatientAllergiesPage } from '../pages'; let patient: Patient; @@ -11,6 +11,8 @@ test.beforeEach(async ({ api }) => { test('Record an allergy to an environmental factors', async ({ page, api }) => { const allergiesPage = new PatientAllergiesPage(page); + const headerRow = allergiesPage.allergiesTable().locator('thead > tr'); + const dataRow = allergiesPage.allergiesTable().locator('tbody > tr'); await test.step('When I visit the Allergies page', async () => { await allergiesPage.goTo(patient.uuid); @@ -22,9 +24,9 @@ test('Record an allergy to an environmental factors', async ({ page, api }) => { await test.step('And I record an allergy to an environmental factor', async () => { await allergiesPage.page.getByRole('tab', { name: /environmental/i }).click(); - await allergiesPage.page.getByText('Dust').click(); - await allergiesPage.page.getByText('Mental status change').click(); - await allergiesPage.page.getByText('Mild').click(); + await allergiesPage.page.getByText(/dust/i).click(); + await allergiesPage.page.getByText(/mental status change/i).click(); + await allergiesPage.page.getByText(/mild/i).click(); await allergiesPage.page.locator('#comments').fill('Test comment'); }); @@ -37,15 +39,14 @@ test('Record an allergy to an environmental factors', async ({ page, api }) => { }); await test.step('And I should see the newly recorded environmental allergy in the list', async () => { - const rows = allergiesPage.allergyTable().locator('tr'); - const allergenCell = rows.locator('td:first-child'); - const severityCell = rows.locator('td:nth-child(2)'); - const reactionCell = rows.locator('td:nth-child(3)'); - const commentCell = rows.locator('td:nth-child(4)'); - await expect(allergenCell).toHaveText('Dust'); - await expect(reactionCell).toHaveText('Mental status change'); - await expect(severityCell).toHaveText('low'); - await expect(commentCell).toHaveText('Test comment'); + await expect(headerRow).toContainText(/allergen/i); + await expect(headerRow).toContainText(/severity/i); + await expect(headerRow).toContainText(/reaction/i); + await expect(headerRow).toContainText(/onset date and comments/i); + await expect(dataRow).toContainText(/dust/i); + await expect(dataRow).toContainText(/low/i); + await expect(dataRow).toContainText(/mental status change/i); + await expect(dataRow).toContainText(/test comment/i); }); }); diff --git a/e2e/specs/food-allergies.spec.ts b/e2e/specs/food-allergies.spec.ts index 4bac565f5b..593e3d797e 100644 --- a/e2e/specs/food-allergies.spec.ts +++ b/e2e/specs/food-allergies.spec.ts @@ -1,7 +1,7 @@ -import { test } from '../core'; -import { PatientAllergiesPage } from '../pages'; import { expect } from '@playwright/test'; import { generateRandomPatient, deletePatient, Patient } from '../commands'; +import { test } from '../core'; +import { PatientAllergiesPage } from '../pages'; let patient: Patient; @@ -11,6 +11,8 @@ test.beforeEach(async ({ api }) => { test('Record an allergy to a food item', async ({ page, api }) => { const allergiesPage = new PatientAllergiesPage(page); + const headerRow = allergiesPage.allergiesTable().locator('thead > tr'); + const dataRow = allergiesPage.allergiesTable().locator('tbody > tr'); await test.step('When I visit the Allergies page', async () => { await allergiesPage.goTo(patient.uuid); @@ -22,9 +24,9 @@ test('Record an allergy to a food item', async ({ page, api }) => { await test.step('And then I record an allergy to a food item', async () => { await allergiesPage.page.getByRole('tab', { name: /food/i }).click(); - await allergiesPage.page.getByText('Eggs').click(); - await allergiesPage.page.getByText('Mental status change').click(); - await allergiesPage.page.getByText('Mild').click(); + await allergiesPage.page.getByText(/eggs/i).click(); + await allergiesPage.page.getByText(/mental status change/i).click(); + await allergiesPage.page.getByText(/mild/i).click(); await allergiesPage.page.locator('#comments').fill('Test comment'); }); @@ -37,15 +39,14 @@ test('Record an allergy to a food item', async ({ page, api }) => { }); await test.step('And I should see the newly recorded food allergy in the list', async () => { - const rows = await allergiesPage.allergyTable().locator('tr'); - const allergenCell = rows.locator('td:first-child'); - const severityCell = rows.locator('td:nth-child(2)'); - const reactionCell = rows.locator('td:nth-child(3)'); - const commentCell = rows.locator('td:nth-child(4)'); - await expect(allergenCell).toHaveText('Eggs'); - await expect(reactionCell).toHaveText('Mental status change'); - await expect(severityCell).toHaveText('low'); - await expect(commentCell).toHaveText('Test comment'); + await expect(headerRow).toContainText(/allergen/i); + await expect(headerRow).toContainText(/severity/i); + await expect(headerRow).toContainText(/reaction/i); + await expect(headerRow).toContainText(/onset date and comments/i); + await expect(dataRow).toContainText(/eggs/i); + await expect(dataRow).toContainText(/low/i); + await expect(dataRow).toContainText(/mental status change/i); + await expect(dataRow).toContainText(/test comment/i); }); }); diff --git a/e2e/specs/program-enrollment.spec.ts b/e2e/specs/program-enrollment.spec.ts index 935efd0f3a..bbbda29269 100644 --- a/e2e/specs/program-enrollment.spec.ts +++ b/e2e/specs/program-enrollment.spec.ts @@ -1,7 +1,7 @@ -import { test } from '../core'; -import { ProgramsPage } from '../pages'; import { expect } from '@playwright/test'; import { generateRandomPatient, deletePatient, Patient } from '../commands'; +import { test } from '../core'; +import { ProgramsPage } from '../pages'; let patient: Patient; @@ -11,11 +11,8 @@ test.beforeEach(async ({ api }) => { test('Add and edit a program enrollment', async ({ page, api }) => { const programsPage = new ProgramsPage(page); - const row = programsPage.programsTable().locator('tr'); - const programCell = row.locator('td:first-child'); - const locationCell = row.locator('td:nth-child(2)'); - const enrollmentDateCell = row.locator('td:nth-child(3)'); - const completionDateCell = row.locator('td:nth-child(4)'); + const headerRow = programsPage.programsTable().locator('thead > tr'); + const dataRow = programsPage.programsTable().locator('tbody > tr'); await test.step('When I visit the Programs page', async () => { await programsPage.goTo(patient.uuid); @@ -42,14 +39,18 @@ test('Add and edit a program enrollment', async ({ page, api }) => { }); await test.step('Then I should see newly recorded program enrollment in the list', async () => { - await expect(programCell).toHaveText(/hiv care and treatment/i); - await expect(enrollmentDateCell.getByText(/04-Jul-2023/i)).toBeVisible(); - await expect(completionDateCell.getByText(/completed on 05-Jul-2023/i)).toBeVisible(); - await expect(locationCell).toHaveText(/Outpatient Clinic/); + await expect(headerRow).toContainText(/active programs/i); + await expect(headerRow).toContainText(/location/i); + await expect(headerRow).toContainText(/date enrolled/i); + await expect(headerRow).toContainText(/status/i); + await expect(dataRow).toContainText(/hiv care and treatment/i); + await expect(dataRow).toContainText(/04-Jul-2023/i); + await expect(dataRow).toContainText(/completed on 05-Jul-2023/i); + await expect(dataRow).toContainText(/outpatient clinic/i); }); await test.step('When I click the `Edit` button', async () => { - await programsPage.editButton().click(); + await programsPage.editProgramButton().click(); }); await test.step('And I edit the program enrollment', async () => { @@ -68,10 +69,10 @@ test('Add and edit a program enrollment', async ({ page, api }) => { }); await test.step('Then I should see the updated program enrollment in the list', async () => { - await expect(programCell).toHaveText(/hiv care and treatment/i); - await expect(enrollmentDateCell.getByText(/03-Jul-2023/i)).toBeVisible(); - await expect(completionDateCell.getByText(/04-Jul-2023/i)).toBeVisible(); - await expect(locationCell).toHaveText(/community outreach/i); + await expect(dataRow).toContainText(/hiv care and treatment/i); + await expect(dataRow).toContainText(/03-Jul-2023/i); + await expect(dataRow).toContainText(/completed on 04-Jul-2023/i); + await expect(dataRow).toContainText(/community outreach/i); }); }); diff --git a/e2e/specs/vitals.spec.ts b/e2e/specs/vitals.spec.ts index a4930e5449..254c76cf9b 100644 --- a/e2e/specs/vitals.spec.ts +++ b/e2e/specs/vitals.spec.ts @@ -1,8 +1,8 @@ -import { test } from '../core'; -import { BiometricsAndVitalsPage } from '../pages'; import { expect } from '@playwright/test'; -import { generateRandomPatient, deletePatient, Patient, startVisit, endVisit } from '../commands'; import { Visit } from '@openmrs/esm-framework'; +import { test } from '../core'; +import { generateRandomPatient, deletePatient, Patient, startVisit, endVisit } from '../commands'; +import { BiometricsAndVitalsPage } from '../pages'; let patient: Patient; let visit: Visit; @@ -14,6 +14,8 @@ test.beforeEach(async ({ api }) => { test('Record vital signs', async ({ page, api }) => { const vitalsPage = new BiometricsAndVitalsPage(page); + const headerRow = vitalsPage.vitalsTable().locator('thead > tr'); + const dataRow = vitalsPage.vitalsTable().locator('tbody > tr'); await test.step('When I visit the vitals and biometrics page', async () => { await vitalsPage.goTo(patient.uuid); @@ -42,14 +44,11 @@ test('Record vital signs', async ({ page, api }) => { }); await test.step('And I should see the newly recorded vital signs on the page', async () => { - const headerRow = vitalsPage.vitalsTable().locator('thead > tr'); await expect(headerRow).toContainText(/temp/i); await expect(headerRow).toContainText(/bp/i); await expect(headerRow).toContainText(/pulse/i); await expect(headerRow).toContainText(/r. rate/i); await expect(headerRow).toContainText(/SPO2/i); - - const dataRow = vitalsPage.vitalsTable().locator('tbody > tr'); await expect(dataRow).toContainText('37'); await expect(dataRow).toContainText('120 / 100'); await expect(dataRow).toContainText('65'); diff --git a/packages/esm-patient-allergies-app/src/allergies/allergies-detailed-summary.component.tsx b/packages/esm-patient-allergies-app/src/allergies/allergies-detailed-summary.component.tsx index 32000b5ecb..8d3b31e2c7 100644 --- a/packages/esm-patient-allergies-app/src/allergies/allergies-detailed-summary.component.tsx +++ b/packages/esm-patient-allergies-app/src/allergies/allergies-detailed-summary.component.tsx @@ -88,17 +88,10 @@ const AllergiesDetailedSummary: React.FC = ({ pat {t('add', 'Add')} - + {({ rows, headers, getHeaderProps, getTableProps }) => ( - +
{headers.map((header) => ( @@ -114,7 +107,7 @@ const AllergiesDetailedSummary: React.FC = ({ pat ))} - + {rows.map((row) => ( {row.cells.map((cell) => ( diff --git a/packages/esm-patient-allergies-app/src/allergies/allergies-overview.component.tsx b/packages/esm-patient-allergies-app/src/allergies/allergies-overview.component.tsx index bf81ed6916..c5bbfc430a 100644 --- a/packages/esm-patient-allergies-app/src/allergies/allergies-overview.component.tsx +++ b/packages/esm-patient-allergies-app/src/allergies/allergies-overview.component.tsx @@ -86,7 +86,7 @@ const AllergiesOverview: React.FC = ({ patient }) => { {({ rows, headers, getHeaderProps, getTableProps }) => ( -
+
{headers.map((header) => ( diff --git a/packages/esm-patient-forms-app/src/forms/forms-table.component.tsx b/packages/esm-patient-forms-app/src/forms/forms-table.component.tsx index f90f124a83..fcba77d3a7 100644 --- a/packages/esm-patient-forms-app/src/forms/forms-table.component.tsx +++ b/packages/esm-patient-forms-app/src/forms/forms-table.component.tsx @@ -55,7 +55,7 @@ const FormsTable = ({ tableHeaders, tableRows, isTablet, handleSearch, handleFor {rows.length > 0 && ( -
+
{headers.map((header) => ( diff --git a/packages/esm-patient-lists-app/src/workspaces/patient-lists.workspace.tsx b/packages/esm-patient-lists-app/src/workspaces/patient-lists.workspace.tsx index afb9be9a0e..8eef02b9e9 100644 --- a/packages/esm-patient-lists-app/src/workspaces/patient-lists.workspace.tsx +++ b/packages/esm-patient-lists-app/src/workspaces/patient-lists.workspace.tsx @@ -107,7 +107,7 @@ function PatientListsWorkspace() { {rows.length > 0 ? ( -
+
{headers.map((header) => ( diff --git a/packages/esm-patient-programs-app/src/programs/programs-detailed-summary.component.tsx b/packages/esm-patient-programs-app/src/programs/programs-detailed-summary.component.tsx index 44e5f4ff16..9de77413ce 100644 --- a/packages/esm-patient-programs-app/src/programs/programs-detailed-summary.component.tsx +++ b/packages/esm-patient-programs-app/src/programs/programs-detailed-summary.component.tsx @@ -115,17 +115,10 @@ const ProgramsDetailedSummary: React.FC = ({ patie title={t('fullyEnrolled', 'Enrolled in all programs')} /> ) : null} - + {({ rows, headers, getHeaderProps, getTableProps }) => ( -
+
{headers.map((header) => ( @@ -142,7 +135,7 @@ const ProgramsDetailedSummary: React.FC = ({ patie - + {rows.map((row, i) => ( {row.cells.map((cell) => ( @@ -182,8 +175,6 @@ function ProgramEditButton({ programEnrollmentId }: ProgramEditButtonProps) { hasIconOnly tooltipPosition="left" size={isTablet ? 'lg' : 'sm'} - // TODO: Remove in favor of the aria-label above - data-testid="edit-program-button" /> ); } diff --git a/packages/esm-patient-programs-app/src/programs/programs-overview.component.tsx b/packages/esm-patient-programs-app/src/programs/programs-overview.component.tsx index d757c73ae6..741c4658d0 100644 --- a/packages/esm-patient-programs-app/src/programs/programs-overview.component.tsx +++ b/packages/esm-patient-programs-app/src/programs/programs-overview.component.tsx @@ -126,7 +126,7 @@ const ProgramsOverview: React.FC = ({ basePath, patientUu {({ rows, headers, getHeaderProps, getTableProps }) => ( -
+
{headers.map((header) => ( diff --git a/packages/esm-patient-vitals-app/src/biometrics/biometrics-base.component.tsx b/packages/esm-patient-vitals-app/src/biometrics/biometrics-base.component.tsx index 350b596400..257cb80777 100644 --- a/packages/esm-patient-vitals-app/src/biometrics/biometrics-base.component.tsx +++ b/packages/esm-patient-vitals-app/src/biometrics/biometrics-base.component.tsx @@ -74,7 +74,7 @@ const BiometricsBase: React.FC = ({ patientUuid, pageSize, if (isError) return ; if (biometrics?.length) { return ( -
+
{isValidating ? : null} diff --git a/packages/esm-patient-vitals-app/src/biometrics/paginated-biometrics.component.tsx b/packages/esm-patient-vitals-app/src/biometrics/paginated-biometrics.component.tsx index 5fff6b8b2b..8d0ab8220b 100644 --- a/packages/esm-patient-vitals-app/src/biometrics/paginated-biometrics.component.tsx +++ b/packages/esm-patient-vitals-app/src/biometrics/paginated-biometrics.component.tsx @@ -33,16 +33,10 @@ const PaginatedBiometrics: React.FC = ({ return (
- + {({ rows, headers, getHeaderProps, getTableProps }) => ( -
+
{headers.map((header) => ( diff --git a/packages/esm-patient-vitals-app/src/vitals/paginated-vitals.component.tsx b/packages/esm-patient-vitals-app/src/vitals/paginated-vitals.component.tsx index 560ee5ea9e..ae84308329 100644 --- a/packages/esm-patient-vitals-app/src/vitals/paginated-vitals.component.tsx +++ b/packages/esm-patient-vitals-app/src/vitals/paginated-vitals.component.tsx @@ -74,10 +74,10 @@ const PaginatedVitals: React.FC = ({ return (
- + {({ rows, headers, getTableProps }) => ( -
+
{headers.map((header) => ( diff --git a/packages/esm-patient-vitals-app/src/vitals/vitals-overview.component.tsx b/packages/esm-patient-vitals-app/src/vitals/vitals-overview.component.tsx index d488cc6cac..ad14c85374 100644 --- a/packages/esm-patient-vitals-app/src/vitals/vitals-overview.component.tsx +++ b/packages/esm-patient-vitals-app/src/vitals/vitals-overview.component.tsx @@ -145,7 +145,7 @@ const VitalsOverview: React.FC = ({ patientUuid, pageSize, if (isError) return ; if (vitals?.length) { return ( -
+
{isValidating ? : null}