Skip to content

Commit

Permalink
Fix flaky test from #4995
Browse files Browse the repository at this point in the history
  • Loading branch information
obulat committed Sep 27, 2024
1 parent 3fe95ae commit 730e335
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/test/playwright/e2e/attribution.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ const copyAttribution = async (
) => {
const formatPattern = new RegExp(formatTitle[formatId], "i")

// Ensure the page is fully hydrated before interacting with it.
const copyButton = getCopyButton(page)
await expect(copyButton).toBeEnabled()

await page.getByRole("tab", { name: formatPattern }).click()

await expect(
page.getByRole("tabpanel", { name: formatPattern })
).toBeVisible()

const copyButton = getCopyButton(page)
await expect(copyButton).toHaveAttribute("id", `copyattr-${formatId}`)
await copyButton.click()

Expand Down

0 comments on commit 730e335

Please sign in to comment.