Skip to content

Commit e9f538a

Browse files
authored
fix(e2e): Patch flaky billing tests (#6681)
1 parent a50cfc8 commit e9f538a

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.changeset/chilly-kids-fly.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

integration/tests/pricing-table.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,9 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
291291
await u.po.checkout.fillTestCard();
292292
await u.po.checkout.clickPayOrSubscribe();
293293

294-
await expect(u.po.checkout.root.getByText(/Trial.*successfully.*started/i)).toBeVisible();
294+
await expect(u.po.checkout.root.getByText(/Trial.*successfully.*started/i)).toBeVisible({
295+
timeout: 15_000,
296+
});
295297
await u.po.checkout.confirmAndContinue();
296298

297299
await u.po.page.goToRelative('/pricing-table');
@@ -419,6 +421,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
419421
await u.po.checkout.clickPayOrSubscribe();
420422
await u.po.checkout.confirmAndContinue();
421423

424+
await u.po.page.waitForAppUrl('/');
422425
await u.po.page.goToRelative('/user');
423426
await u.po.userProfile.waitForMounted();
424427
await u.po.userProfile.switchToBillingTab();
@@ -440,7 +443,8 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
440443
await u.po.checkout.waitForMounted();
441444
await u.po.checkout.root.getByRole('button', { name: /^pay\s\$/i }).waitFor({ state: 'visible' });
442445
await u.po.checkout.clickPayOrSubscribe();
443-
446+
await u.po.checkout.confirmAndContinue();
447+
await u.po.page.waitForAppUrl('/');
444448
await u.po.page.goToRelative('/user');
445449
await u.po.userProfile.waitForMounted();
446450
await u.po.userProfile.switchToBillingTab();
@@ -482,7 +486,9 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
482486
await u.po.checkout.waitForMounted();
483487
await u.po.checkout.fillTestCard();
484488
await u.po.checkout.clickPayOrSubscribe();
485-
await expect(u.po.page.getByText('Payment was successful!')).toBeVisible();
489+
await expect(u.po.page.getByText('Payment was successful!')).toBeVisible({
490+
timeout: 15_000,
491+
});
486492

487493
await u.po.checkout.confirmAndContinue();
488494
await u.po.pricingTable.startCheckout({ planSlug: 'free_user', shouldSwitch: true });

0 commit comments

Comments
 (0)