Update E2E tests for kebab menu and add iCal download tests
All checks were successful
CI / backend-test (push) Successful in 59s
CI / frontend-test (push) Successful in 27s
CI / frontend-e2e (push) Successful in 1m38s
CI / build-and-publish (push) Has been skipped

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 21:40:51 +01:00
parent 92372b6a59
commit d0ed6790ef
3 changed files with 128 additions and 16 deletions

View File

@@ -56,7 +56,7 @@ test.describe('US1: Watch event from detail page', () => {
)
await page.goto(`/events/${fullEvent.eventToken}`)
const bookmark = page.locator('.rsvp-bar__bookmark-inner')
const bookmark = page.getByLabel(/watch.*this event/i)
await expect(bookmark).toBeVisible()
await expect(bookmark).toHaveAttribute('aria-label', 'Watch this event')
@@ -81,7 +81,7 @@ test.describe('US2: Un-watch event from detail page', () => {
await page.addInitScript(seedEvents([watchSeed()]))
await page.goto(`/events/${fullEvent.eventToken}`)
const bookmark = page.locator('.rsvp-bar__bookmark-inner')
const bookmark = page.getByLabel(/watch.*this event/i)
await expect(bookmark).toHaveAttribute('aria-label', 'Stop watching this event')
await bookmark.click()
@@ -105,7 +105,7 @@ test.describe('US3: Bookmark reflects attending status', () => {
await page.goto(`/events/${fullEvent.eventToken}`)
// Bookmark not shown for attendees — RsvpBar shows status state
const bookmark = page.locator('.rsvp-bar__bookmark-inner')
const bookmark = page.getByLabel(/watch.*this event/i)
await expect(bookmark).not.toBeVisible()
// Navigate to list via back link
@@ -132,7 +132,7 @@ test.describe('US4: RSVP cancellation preserves watch status', () => {
await page.getByRole('alertdialog').getByRole('button', { name: 'Cancel RSVP' }).click()
// Bookmark reappears in CTA state, filled because event is still stored
const bookmark = page.locator('.rsvp-bar__bookmark-inner')
const bookmark = page.getByLabel(/watch.*this event/i)
await expect(bookmark).toBeVisible()
await expect(bookmark).toHaveAttribute('aria-label', 'Stop watching this event')
@@ -151,7 +151,7 @@ test.describe('US5: No bookmark for attendees and organizers', () => {
await page.addInitScript(seedEvents([rsvpSeed()]))
await page.goto(`/events/${fullEvent.eventToken}`)
const bookmark = page.locator('.rsvp-bar__bookmark-inner')
const bookmark = page.getByLabel(/watch.*this event/i)
await expect(bookmark).not.toBeVisible()
})
@@ -162,7 +162,7 @@ test.describe('US5: No bookmark for attendees and organizers', () => {
await page.addInitScript(seedEvents([organizerSeed()]))
await page.goto(`/events/${fullEvent.eventToken}`)
const bookmark = page.locator('.rsvp-bar__bookmark-inner')
const bookmark = page.getByLabel(/watch.*this event/i)
await expect(bookmark).not.toBeVisible()
})
})
@@ -197,7 +197,7 @@ test.describe('US7: Watcher upgrades to attendee', () => {
await page.goto(`/events/${fullEvent.eventToken}`)
// Verify watching state — bookmark visible
const bookmark = page.locator('.rsvp-bar__bookmark-inner')
const bookmark = page.getByLabel(/watch.*this event/i)
await expect(bookmark).toBeVisible()
await expect(bookmark).toHaveAttribute('aria-label', 'Stop watching this event')