Skip to content

Commit

Permalink
LPD-45145 Add timeout for flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
veroglez authored and brianchandotcom committed Jan 1, 2025
1 parent 5b2871f commit 67cee50
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -750,9 +750,15 @@ test(

await page.goto(`/web${site.friendlyUrlPath}${layout.friendlyUrlPath}`);

// Wait a second for the page to load to get the buttons

await page.waitForTimeout(1000);

const buttons = page.getByText('Go Somewhere');

// Click first button and assert error

await page.getByText('Go Somewhere').first().click();
await buttons.first().click();

await waitForAlert(
page,
Expand All @@ -768,7 +774,7 @@ test(

// Click second button and assert success

await page.getByText('Go Somewhere').last().click();
await buttons.last().click();

await expect(
page.getByRole('heading', {name: String(secondObjectEntry.id)})
Expand Down

0 comments on commit 67cee50

Please sign in to comment.