Add organizer kebab menu, bottom bar, and iCal download integration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 21:40:40 +01:00
parent 7817ad182b
commit 92372b6a59
2 changed files with 172 additions and 33 deletions

View File

@@ -77,6 +77,13 @@ beforeEach(() => {
mockIsStored.mockReturnValue(false)
mockSaveWatch.mockClear()
mockRemoveEvent.mockClear()
// Provide Teleport target for kebab menu
if (!document.getElementById('header-actions')) {
const target = document.createElement('div')
target.id = 'header-actions'
document.body.appendChild(target)
}
})
describe('EventDetailView', () => {
@@ -197,8 +204,8 @@ describe('EventDetailView', () => {
const wrapper = await mountWithToken()
await flushPromises()
expect(wrapper.find('.rsvp-bar__cta').exists()).toBe(true)
expect(wrapper.find('.rsvp-bar__cta').text()).toBe("I'm attending!")
expect(wrapper.find('.bar-cta').exists()).toBe(true)
expect(wrapper.find('.bar-cta').text()).toBe("I'm attending!")
wrapper.unmount()
})
@@ -210,7 +217,6 @@ describe('EventDetailView', () => {
await flushPromises()
expect(wrapper.find('.rsvp-bar').exists()).toBe(false)
expect(wrapper.find('.rsvp-bar__cta').exists()).toBe(false)
wrapper.unmount()
})
@@ -223,7 +229,7 @@ describe('EventDetailView', () => {
expect(wrapper.find('.rsvp-bar__status').exists()).toBe(true)
expect(wrapper.find('.rsvp-bar__text').text()).toBe("You're attending!")
expect(wrapper.find('.rsvp-bar__cta').exists()).toBe(false)
expect(wrapper.find('.bar-cta').exists()).toBe(false)
wrapper.unmount()
})
@@ -236,7 +242,7 @@ describe('EventDetailView', () => {
expect(document.body.querySelector('[role="dialog"]')).toBeNull()
await wrapper.find('.rsvp-bar__cta-inner').trigger('click')
await wrapper.find('.bar-cta-btn').trigger('click')
await flushPromises()
expect(document.body.querySelector('[role="dialog"]')).not.toBeNull()
@@ -249,7 +255,7 @@ describe('EventDetailView', () => {
const wrapper = await mountWithToken()
await flushPromises()
await wrapper.find('.rsvp-bar__cta-inner').trigger('click')
await wrapper.find('.bar-cta-btn').trigger('click')
await flushPromises()
// Form is inside Teleport — find via document.body
@@ -274,7 +280,7 @@ describe('EventDetailView', () => {
await flushPromises()
// Open sheet
await wrapper.find('.rsvp-bar__cta-inner').trigger('click')
await wrapper.find('.bar-cta-btn').trigger('click')
await flushPromises()
// Fill name via Teleported input
@@ -305,7 +311,7 @@ describe('EventDetailView', () => {
// Verify UI switched to status
expect(wrapper.find('.rsvp-bar__text').text()).toBe("You're attending!")
expect(wrapper.find('.rsvp-bar__cta').exists()).toBe(false)
expect(wrapper.find('.bar-cta').exists()).toBe(false)
// Verify attendee count incremented
expect(wrapper.text()).toContain('13')
@@ -360,7 +366,7 @@ describe('EventDetailView', () => {
const wrapper = await mountWithToken()
await flushPromises()
await wrapper.find('.rsvp-bar__cta-inner').trigger('click')
await wrapper.find('.bar-cta-btn').trigger('click')
await flushPromises()
const input = document.body.querySelector('#rsvp-name')! as HTMLInputElement