From 8f276626a9d573ff3b4dbd22e0d903e44977efad Mon Sep 17 00:00:00 2001 From: panteliselef Date: Sat, 11 Oct 2025 01:02:34 +0300 Subject: [PATCH 1/2] chore(e2e): Billing button e2e tests for Astro --- .changeset/thick-brooms-shave.md | 2 ++ integration/tests/pricing-table.test.ts | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) create mode 100644 .changeset/thick-brooms-shave.md diff --git a/.changeset/thick-brooms-shave.md b/.changeset/thick-brooms-shave.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/thick-brooms-shave.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/integration/tests/pricing-table.test.ts b/integration/tests/pricing-table.test.ts index 84852a9d6b3..c5614b838ce 100644 --- a/integration/tests/pricing-table.test.ts +++ b/integration/tests/pricing-table.test.ts @@ -32,8 +32,6 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl }); test('renders pricing details of a specific plan', async ({ page, context }) => { - test.skip(app.name.includes('astro'), 'Still working on it'); - const u = createTestUtils({ app, page, context }); await u.po.page.goToRelative('/billing/plan-details-btn'); @@ -82,7 +80,6 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl page, context, }) => { - test.skip(app.name.includes('astro'), 'Still working on it'); const u = createTestUtils({ app, page, context }); await u.po.signIn.goTo(); await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password }); @@ -97,7 +94,6 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl }); test('when signed in, clicking checkout button open checkout drawer', async ({ page, context }) => { - test.skip(app.name.includes('astro'), 'Still working on it'); const u = createTestUtils({ app, page, context }); await u.po.signIn.goTo(); await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password }); @@ -132,7 +128,6 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl }); test('opens subscription details drawer', async ({ page, context }) => { - test.skip(app.name.includes('astro'), 'Still working on it'); const u = createTestUtils({ app, page, context }); await u.po.signIn.goTo(); await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password }); From 9d062e673688d54638a70d49a7cb0a8d0bbbe17e Mon Sep 17 00:00:00 2001 From: panteliselef Date: Sat, 11 Oct 2025 01:20:01 +0300 Subject: [PATCH 2/2] fix --- integration/tests/pricing-table.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/integration/tests/pricing-table.test.ts b/integration/tests/pricing-table.test.ts index c5614b838ce..f3d080b2a1c 100644 --- a/integration/tests/pricing-table.test.ts +++ b/integration/tests/pricing-table.test.ts @@ -35,6 +35,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl const u = createTestUtils({ app, page, context }); await u.po.page.goToRelative('/billing/plan-details-btn'); + await u.po.page.waitForClerkJsLoaded(); await u.po.page.getByRole('button', { name: 'Plan details' }).click(); await u.po.planDetails.waitForMounted(); @@ -99,6 +100,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password }); await u.po.page.goToRelative('/billing/checkout-btn'); + await u.po.page.waitForClerkJsLoaded(); await u.po.page.getByRole('button', { name: 'Checkout Now' }).click(); await u.po.checkout.waitForMounted(); await u.po.page.getByText(/^Checkout$/).click(); @@ -133,6 +135,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password }); await u.po.page.goToRelative('/billing/subscription-details-btn'); + await u.po.page.waitForClerkJsLoaded(); await u.po.page.getByRole('button', { name: 'Subscription details' }).click(); await u.po.subscriptionDetails.waitForMounted();