test(e2e): align specs with current page structure
join-flow:
- Form now requires Community Guidelines agreement; tests check the
checkbox before expecting submit to enable.
- Contribution input is a numeric field with preset chip buttons, not a
USelect with $0/mo options — fill the input directly.
- Success state lives in SignupFlowOverlay ("Welcome to Ghost Guild!");
no .success-box exists. Match by heading instead.
- Inline .error-box renders OUTSIDE <form>, so duplicate-email assertion
uses .signup-flow-overlay .error-box (which is the user-facing error).
member-profile:
- "How you appear to other members" copy was retired; replace with the
stable "Show in Member Directory" structural label.
- Add waitForLoadState('networkidle') after goto for ClientOnly auth
hydration so "Edit Profile" reliably appears within timeout.
board:
- Add waitForLoadState('networkidle') after goto so the action-bar's
"+ New Post" click handler is bound before the test clicks.
- Submit button is named exactly "Post" — disambiguate from "+ New Post"
buttons with { exact: true }.
- Delete is a two-step in-card confirm (Delete → Confirm), not a native
browser dialog; drop the page.once('dialog') listener.
admin-board-channels:
- Channel name placeholder is "e.g., coop-formation" (no leading #).
- Slack Channel ID input only appears in the Edit modal (v-if="editingId"),
not on Create — Slack channel is auto-created server-side. Drop the
slack ID fill from the Create step.
- Add waitForLoadState('networkidle') before opening the modal.
This commit is contained in:
parent
3f42307c64
commit
bb0dbfe53e
4 changed files with 32 additions and 18 deletions
|
|
@ -68,8 +68,12 @@ test.describe('Join page — member signup flow', () => {
|
|||
await page.locator('#join-name').fill('Test User')
|
||||
await expect(page.locator('.form-submit')).toBeDisabled()
|
||||
|
||||
// Fill email too — now all fields are populated and button should be enabled
|
||||
// Fill email — agreement still unchecked, so still disabled
|
||||
await page.locator('#join-email').fill('incomplete-test@example.com')
|
||||
await expect(page.locator('.form-submit')).toBeDisabled()
|
||||
|
||||
// Check the Community Guidelines agreement — now all required fields satisfied
|
||||
await page.getByRole('checkbox', { name: /Community Guidelines/ }).check()
|
||||
await expect(page.locator('.form-submit')).toBeEnabled()
|
||||
})
|
||||
|
||||
|
|
@ -83,8 +87,9 @@ test.describe('Join page — member signup flow', () => {
|
|||
await page.locator('#join-name').fill('E2E Test User')
|
||||
await page.locator('#join-email').fill(uniqueEmail)
|
||||
await page.locator('#circle-community').check({ force: true })
|
||||
await page.locator('#join-contribution').click()
|
||||
await page.getByRole('option', { name: '$0/mo' }).click()
|
||||
// Contribution is now a numeric input with preset chips, not a select
|
||||
await page.locator('#join-contribution').fill('0')
|
||||
await page.getByRole('checkbox', { name: /Community Guidelines/ }).check()
|
||||
|
||||
await expect(page.locator('.form-submit')).toBeEnabled()
|
||||
|
||||
|
|
@ -93,8 +98,10 @@ test.describe('Join page — member signup flow', () => {
|
|||
|
||||
await page.locator('.form-submit').click()
|
||||
|
||||
// Free tier creates subscription then shows confirmation (step 3)
|
||||
await expect(page.locator('.success-box')).toBeVisible({ timeout: 15000 })
|
||||
// Free tier flips the SignupFlowOverlay into its success state
|
||||
await expect(
|
||||
page.getByRole('heading', { name: 'Welcome to Ghost Guild!' })
|
||||
).toBeVisible({ timeout: 15000 })
|
||||
})
|
||||
|
||||
test('duplicate email shows error', async ({ page }) => {
|
||||
|
|
@ -109,12 +116,13 @@ test.describe('Join page — member signup flow', () => {
|
|||
await page.locator('#join-name').fill('Dup Test User')
|
||||
await page.locator('#join-email').fill(duplicateEmail)
|
||||
await page.locator('#circle-community').check({ force: true })
|
||||
await page.locator('#join-contribution').click()
|
||||
await page.getByRole('option', { name: '$0/mo' }).click()
|
||||
await page.locator('#join-contribution').fill('0')
|
||||
await page.getByRole('checkbox', { name: /Community Guidelines/ }).check()
|
||||
await page.locator('.form-submit').click()
|
||||
|
||||
// Should show an error about the email already existing
|
||||
await expect(page.locator('.error-box')).toBeVisible({ timeout: 10000 })
|
||||
await expect(page.locator('.error-box')).toContainText(/already/i)
|
||||
// Helcim 409 puts SignupFlowOverlay into its error state
|
||||
const overlayError = page.locator('.signup-flow-overlay .error-box')
|
||||
await expect(overlayError).toBeVisible({ timeout: 10000 })
|
||||
await expect(overlayError).toContainText(/already/i)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue