Skip to content

Commit

Permalink
fix: update tests for new modal (#54284)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmaxed committed Apr 3, 2024
1 parent 733d0b7 commit 5013ba0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions e2e/exam-results-modal.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test.describe('Exam results modal', () => {
await expect(viewButton).toBeVisible();
await viewButton.click();

await expect(page.getByRole('dialog')).toHaveCount(2);
await expect(page.getByRole('dialog')).toHaveCount(1);

await expect(
page.getByRole('heading', {
Expand All @@ -36,7 +36,7 @@ test.describe('Exam results modal', () => {
await expect(viewButton).toBeVisible();
await viewButton.click();

await expect(page.getByRole('dialog')).toHaveCount(2);
await expect(page.getByRole('dialog')).toHaveCount(1);

// There are 2 close buttons on the page, and the x button is the first
const closeButton = page.getByRole('button', { name: 'Close' }).first();
Expand All @@ -52,7 +52,7 @@ test.describe('Exam results modal', () => {
await expect(viewButton).toBeVisible();
await viewButton.click();

await expect(page.getByRole('dialog')).toHaveCount(2);
await expect(page.getByRole('dialog')).toHaveCount(1);

// There are 2 close buttons on the page, and the close button is the last
const closeButton = page.getByRole('button', { name: 'Close' }).last();
Expand Down

0 comments on commit 5013ba0

Please sign in to comment.