diff --git a/tests/e2e/steps/pro-project.ts b/tests/e2e/steps/pro-project.ts index 516f20157..39244e487 100644 --- a/tests/e2e/steps/pro-project.ts +++ b/tests/e2e/steps/pro-project.ts @@ -7,6 +7,12 @@ type Metadata = { }; export async function enterCreditCard(page: Page) { + const dialog = page.locator('.modal').filter({ + hasText: 'Add payment method' + }); + await dialog.waitFor({ + state: 'visible' + }); await page.getByPlaceholder('cardholder').fill('Test User'); const stripe = page.frameLocator('[title="Secure payment input frame"]'); await stripe.locator('id=Field-numberInput').fill('4242424242424242'); @@ -14,6 +20,9 @@ export async function enterCreditCard(page: Page) { await stripe.locator('id=Field-cvcInput').fill('123'); await stripe.locator('id=Field-countryInput').selectOption('DE'); await page.getByRole('button', { name: 'Add', exact: true }).click(); + await dialog.waitFor({ + state: 'hidden' + }); } export async function createProProject(page: Page): Promise { @@ -25,16 +34,7 @@ export async function createProProject(page: Page): Promise { await page.getByRole('button', { name: 'get started' }).click(); await page.waitForURL('/console/create-organization**'); await page.getByRole('button', { name: 'add' }).first().click(); - const dialog = page.locator('.modal').filter({ - hasText: 'Add payment method' - }); - await dialog.waitFor({ - state: 'visible' - }); await enterCreditCard(page); - await dialog.waitFor({ - state: 'hidden' - }); // skip members await page.getByRole('button', { name: 'create organization' }).click(); await page.waitForURL('/console/organization-**');