fix(e2e): repair failing suite — a11y fixes and stale assertions
Three product a11y defects: drop role="radiogroup" from the /join PWYC <ul> (it stripped the list role; native radios already group), use --parch-text on the active contribution chip (was --text-bright, 1.17:1 on --parch), and label the New tag pool USelect on event create. Three stale tests: real event-type filter labels, updated location placeholder, and click the label instead of the hidden 0×0 radio.
This commit is contained in:
parent
fee5959818
commit
039a6802e3
6 changed files with 7 additions and 7 deletions
|
|
@ -261,7 +261,7 @@ const onCadenceChange = (newCadence) => {
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-color: var(--candle);
|
border-color: var(--candle);
|
||||||
background: var(--parch);
|
background: var(--parch);
|
||||||
color: var(--text-bright);
|
color: var(--parch-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.contribution-guidance {
|
.contribution-guidance {
|
||||||
|
|
|
||||||
|
|
@ -350,6 +350,7 @@
|
||||||
<label>New tag pool</label>
|
<label>New tag pool</label>
|
||||||
<USelect
|
<USelect
|
||||||
v-model="newTagPool"
|
v-model="newTagPool"
|
||||||
|
aria-label="New tag pool"
|
||||||
:items="[
|
:items="[
|
||||||
{ label: 'Cooperative', value: 'cooperative' },
|
{ label: 'Cooperative', value: 'cooperative' },
|
||||||
{ label: 'Craft', value: 'craft' },
|
{ label: 'Craft', value: 'craft' },
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,6 @@
|
||||||
|
|
||||||
<ul
|
<ul
|
||||||
class="pwyc-list"
|
class="pwyc-list"
|
||||||
role="radiogroup"
|
|
||||||
aria-label="Contribution amount"
|
aria-label="Contribution amount"
|
||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ test.describe('Admin events CRUD', () => {
|
||||||
.fill('e2e test event description')
|
.fill('e2e test event description')
|
||||||
|
|
||||||
await adminPage
|
await adminPage
|
||||||
.getByPlaceholder('e.g., https://zoom.us/j/123... or #channel-name')
|
.getByPlaceholder('e.g., https://zoom.us/j/123..., #channel-name, or TBD')
|
||||||
.fill('https://example.com/zoom')
|
.fill('https://example.com/zoom')
|
||||||
|
|
||||||
const startInput = adminPage.getByPlaceholder(
|
const startInput = adminPage.getByPlaceholder(
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ test.describe('Events list page', () => {
|
||||||
const filterBar = page.locator('.filter-bar')
|
const filterBar = page.locator('.filter-bar')
|
||||||
await expect(filterBar).toBeVisible()
|
await expect(filterBar).toBeVisible()
|
||||||
|
|
||||||
for (const label of ['All', 'Workshops', 'Community', 'Social', 'Showcase']) {
|
for (const label of ['All', 'Talk / Presentation', 'Workshop', 'Community Meetup', 'Co-working Session', 'Peer Session', 'Skills Share', 'Info Session']) {
|
||||||
await expect(filterBar.locator('button', { hasText: label })).toBeVisible()
|
await expect(filterBar.locator('button', { hasText: label })).toBeVisible()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -36,7 +36,7 @@ test.describe('Events list page', () => {
|
||||||
// Wait for Vue hydration — the "All" filter should have the active class once reactive
|
// Wait for Vue hydration — the "All" filter should have the active class once reactive
|
||||||
const allBtn = page.locator('.filter-btn', { hasText: 'All' })
|
const allBtn = page.locator('.filter-btn', { hasText: 'All' })
|
||||||
await expect(allBtn).toHaveClass(/active/, { timeout: 10000 })
|
await expect(allBtn).toHaveClass(/active/, { timeout: 10000 })
|
||||||
const workshopsBtn = page.locator('.filter-bar button', { hasText: 'Workshops' })
|
const workshopsBtn = page.locator('.filter-bar button', { hasText: 'Workshop' })
|
||||||
await workshopsBtn.click()
|
await workshopsBtn.click()
|
||||||
await expect(workshopsBtn).toHaveClass(/active/, { timeout: 5000 })
|
await expect(workshopsBtn).toHaveClass(/active/, { timeout: 5000 })
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ test.describe('Join page — member signup flow', () => {
|
||||||
await page.locator('#join-name').fill('E2E Test User')
|
await page.locator('#join-name').fill('E2E Test User')
|
||||||
await page.locator('#join-email').fill(uniqueEmail)
|
await page.locator('#join-email').fill(uniqueEmail)
|
||||||
// Pick the $0 preset
|
// Pick the $0 preset
|
||||||
await page.locator('#pwyc-0').check({ force: true })
|
await page.locator('label[for="pwyc-0"]').click()
|
||||||
await page.getByRole('checkbox', { name: /Community Guidelines/ }).check()
|
await page.getByRole('checkbox', { name: /Community Guidelines/ }).check()
|
||||||
|
|
||||||
await expect(page.locator('.submit-btn')).toBeEnabled()
|
await expect(page.locator('.submit-btn')).toBeEnabled()
|
||||||
|
|
@ -191,7 +191,7 @@ test.describe('Join page — member signup flow', () => {
|
||||||
|
|
||||||
await page.locator('#join-name').fill('Dup Test User')
|
await page.locator('#join-name').fill('Dup Test User')
|
||||||
await page.locator('#join-email').fill(duplicateEmail)
|
await page.locator('#join-email').fill(duplicateEmail)
|
||||||
await page.locator('#pwyc-0').check({ force: true })
|
await page.locator('label[for="pwyc-0"]').click()
|
||||||
await page.getByRole('checkbox', { name: /Community Guidelines/ }).check()
|
await page.getByRole('checkbox', { name: /Community Guidelines/ }).check()
|
||||||
await page.locator('.submit-btn').click()
|
await page.locator('.submit-btn').click()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue