diff --git a/playwright/tests/extension.spec.ts b/playwright/tests/extension.spec.ts index 8d13cdc4de..6bd438f69f 100644 --- a/playwright/tests/extension.spec.ts +++ b/playwright/tests/extension.spec.ts @@ -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() }) diff --git a/playwright/tests/fiat.spec.ts b/playwright/tests/fiat.spec.ts index 25a431fb70..54dd29cc15 100644 --- a/playwright/tests/fiat.spec.ts +++ b/playwright/tests/fiat.spec.ts @@ -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() })