Skip to content

Commit

Permalink
Update the lab E2E test to check the value cell instead of row
Browse files Browse the repository at this point in the history
  • Loading branch information
jayasanka-sack committed Jun 28, 2024
1 parent da9cab5 commit c642623
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions e2e/specs/results-viewer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,15 @@ test('Record and edit test results', async ({ page }) => {
for (const { resultsPageReference, value } of completeBloodCountData) {
await test.step(resultsPageReference, async () => {
const row = page.locator(`tr:has-text("${resultsPageReference}")`);
await expect(row).toContainText(value);
const valueCell = row.locator('td:nth-child(2)');
await expect(valueCell).toContainText(value);
});
}
for (const { resultsPageReference, value } of chemistryResultsData) {
await test.step(resultsPageReference, async () => {
const row = page.locator(`tr:has-text("${resultsPageReference}")`);
await expect(row).toContainText(value);
const valueCell = row.locator('td:nth-child(2)');
await expect(valueCell).toContainText(value);
});
}
});
Expand Down Expand Up @@ -346,13 +348,15 @@ test('Record and edit test results', async ({ page }) => {
for (const { resultsPageReference, updatedValue } of completeBloodCountData) {
await test.step(resultsPageReference, async () => {
const row = page.locator(`tr:has-text("${resultsPageReference}")`);
await expect(row).toContainText(updatedValue);
const valueCell = row.locator('td:nth-child(2)');
await expect(valueCell).toContainText(updatedValue);
});
}
for (const { resultsPageReference, updatedValue } of chemistryResultsData) {
await test.step(resultsPageReference, async () => {
const row = page.locator(`tr:has-text("${resultsPageReference}")`);
await expect(row).toContainText(updatedValue);
const valueCell = row.locator('td:nth-child(2)');
await expect(valueCell).toContainText(updatedValue);
});
}
});
Expand Down

0 comments on commit c642623

Please sign in to comment.