Skip to content

Commit

Permalink
Refactor "Should flag an incident" tests to use locators for element …
Browse files Browse the repository at this point in the history
…interactions and click (#3282)
  • Loading branch information
pdcp1 authored Dec 13, 2024
1 parent 7ec09d2 commit 4c00902
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions site/gatsby-site/playwright/e2e-full/cite.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ test.describe('Cite pages', () => {

await page.goto(url + '#' + _id);

await page.click(`[id="r${_id}"] [data-cy="expand-report-button"]`);
await page.click(`[id="r${_id}"] [data-cy="flag-button"]`);
await page.locator(`[id="r${_id}"] [data-cy="expand-report-button"]`).click();
await page.locator(`[id="r${_id}"] [data-cy="flag-button"]`).click();

const modal = page.locator('[data-cy="flag-report-3"]');
await expect(modal).toBeVisible();
Expand All @@ -120,7 +120,7 @@ test.describe('Cite pages', () => {

await expect(modal.locator('[data-cy="flag-toggle"]')).toBeDisabled();

await page.click('[aria-label="Close"]');
await page.locator('[aria-label="Close"]').click();

await expect(modal).not.toBeVisible();

Expand Down

0 comments on commit 4c00902

Please sign in to comment.