Skip to content

Commit

Permalink
Fix transak e2e test: wait longer before clicking "Buy now"
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaw3d committed Oct 21, 2024
1 parent 1cc4cb6 commit 4753833
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions playwright/tests/extension.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ test.describe('The extension popup should load', () => {
)
.click()
await expect(page.frameLocator('iframe')!.getByAltText('Powered by Transak')).toBeVisible()
// Wait for conversion to be loaded otherwise clicking "Buy now" early reloads the iframe
await expect(page.frameLocator('iframe')!.locator('#transak-calculator-source:disabled')).toHaveValue(
/\d/,
)
await page.frameLocator('iframe')!.getByText('Buy now').click()
await expect(page.frameLocator('iframe')!.getByText(/email/i).first()).toBeVisible()
})
Expand Down
4 changes: 4 additions & 0 deletions playwright/tests/fiat.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ test.describe('Fiat on-ramp', () => {
)
.click()
await expect(page.frameLocator('iframe')!.getByAltText('Powered by Transak')).toBeVisible()
// Wait for conversion to be loaded otherwise clicking "Buy now" early reloads the iframe
await expect(page.frameLocator('iframe')!.locator('#transak-calculator-source:disabled')).toHaveValue(
/\d/,
)
await page.frameLocator('iframe')!.getByText('Buy now').click()
await expect(page.frameLocator('iframe')!.getByText(/email/i).first()).toBeVisible()
})
Expand Down

0 comments on commit 4753833

Please sign in to comment.