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
|
|
@ -11,6 +11,7 @@ test.describe('Admin board channels page', () => {
|
|||
|
||||
test('create, edit, and delete a channel', async ({ adminPage }) => {
|
||||
await adminPage.goto('/admin/board-channels')
|
||||
await adminPage.waitForLoadState('networkidle')
|
||||
await expect(adminPage.getByRole('heading', { name: 'Board Channels' })).toBeVisible({
|
||||
timeout: 15000,
|
||||
})
|
||||
|
|
@ -18,14 +19,14 @@ test.describe('Admin board channels page', () => {
|
|||
const suffix = Date.now().toString().slice(-6)
|
||||
const channelName = `e2e-channel-${suffix}`
|
||||
const editedName = `e2e-channel-${suffix}-edited`
|
||||
const slackId = `C${suffix}XYZ`
|
||||
|
||||
// --- Create ---
|
||||
// Create flow only takes a name; the Slack channel ID is auto-assigned on
|
||||
// creation and only becomes editable in the Edit modal.
|
||||
await adminPage.getByRole('button', { name: '+ New Channel' }).click()
|
||||
await expect(adminPage.getByRole('heading', { name: 'New Channel' })).toBeVisible()
|
||||
|
||||
await adminPage.locator('input[placeholder="e.g., #coop-formation"]').fill(channelName)
|
||||
await adminPage.locator('input[placeholder="C0123456789"]').fill(slackId)
|
||||
await adminPage.locator('input[placeholder="e.g., coop-formation"]').fill(channelName)
|
||||
|
||||
// Select the first available cooperative tag if any are present
|
||||
const firstTagCheckbox = adminPage.locator('.tag-select input[type="checkbox"]').first()
|
||||
|
|
@ -44,7 +45,7 @@ test.describe('Admin board channels page', () => {
|
|||
await row.getByRole('button', { name: 'Edit' }).click()
|
||||
|
||||
await expect(adminPage.getByRole('heading', { name: 'Edit Channel' })).toBeVisible()
|
||||
const nameInput = adminPage.locator('input[placeholder="e.g., #coop-formation"]')
|
||||
const nameInput = adminPage.locator('input[placeholder="e.g., coop-formation"]')
|
||||
await nameInput.fill(editedName)
|
||||
await adminPage.getByRole('button', { name: 'Save Changes' }).click()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue