mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-29 07:20:43 +00:00
30 lines
915 B
TypeScript
30 lines
915 B
TypeScript
import { test, expect } from '@playwright/test'
|
|
import { signIn } from './session'
|
|
|
|
// `signIn` is the ONE way a spec here gets a reader.
|
|
|
|
test.describe('Billing Flow', () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await signIn(page)
|
|
})
|
|
|
|
test('/account/billing is Settings → Billing', async ({ page }) => {
|
|
await page.goto('/account/billing')
|
|
// The account has one home (components/account/Forward.tsx). Assert the
|
|
// forward, not the page it leaves behind: the replace fires on hydration.
|
|
await page.waitForURL(/\/settings\/organization\/billing$/, { timeout: 15_000 })
|
|
})
|
|
});
|
|
|
|
test.describe('Billing Plans', () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await signIn(page)
|
|
})
|
|
|
|
test('should show pricing page', async ({ page }) => {
|
|
await page.goto('/pricing');
|
|
|
|
await expect(page.getByText(/pricing|plan|free/i).first()).toBeVisible({ timeout: 10000 });
|
|
});
|
|
});
|