Compare commits
30 Commits
0.14.0
...
72c9fcd843
| Author | SHA1 | Date | |
|---|---|---|---|
| 72c9fcd843 | |||
| 8cda421054 | |||
| 8518adc1b0 | |||
| 4fa6c2ccdb | |||
| 91023795ce | |||
| 22bf8b78d0 | |||
| 059bcb7c10 | |||
| b46db52b4a | |||
| bb4170b0b6 | |||
| 5bd5da7561 | |||
| 6241a3db9c | |||
| e73b189056 | |||
| c33a983390 | |||
| de5e566796 | |||
| f8a5aa2eb6 | |||
| f518e02ce0 | |||
| d732c47139 | |||
| a8a577f4a9 | |||
| aacea71be8 | |||
| 09fb1f1346 | |||
| 7fa510d8d8 | |||
| a26d53b00e | |||
| 95a74f83f7 | |||
| 551ec8cafa | |||
| c37846df62 | |||
| 0408ce1f8e | |||
| 2a8c8ddffd | |||
| d13a5b2113 | |||
| 8fb1927917 | |||
| 1cda01d252 |
+2
-2
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>3.5.11</version>
|
<version>3.5.13</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.github.spotbugs</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>spotbugs-maven-plugin</artifactId>
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||||
<version>4.9.8.2</version>
|
<version>4.9.8.3</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<effort>Max</effort>
|
<effort>Max</effort>
|
||||||
<threshold>Low</threshold>
|
<threshold>Low</threshold>
|
||||||
|
|||||||
Generated
+656
-1470
File diff suppressed because it is too large
Load Diff
@@ -38,14 +38,14 @@
|
|||||||
"@vue/tsconfig": "^0.9.0",
|
"@vue/tsconfig": "^0.9.0",
|
||||||
"eslint": "^10.0.2",
|
"eslint": "^10.0.2",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-plugin-oxlint": "~1.55.0",
|
"eslint-plugin-oxlint": "~1.60.0",
|
||||||
"eslint-plugin-vue": "~10.8.0",
|
"eslint-plugin-vue": "~10.8.0",
|
||||||
"jiti": "^2.6.1",
|
"jiti": "^2.6.1",
|
||||||
"jsdom": "^28.1.0",
|
"jsdom": "^29.0.0",
|
||||||
"msw": "^2.12.10",
|
"msw": "^2.12.10",
|
||||||
"npm-run-all2": "^8.0.4",
|
"npm-run-all2": "^8.0.4",
|
||||||
"openapi-typescript": "^7.13.0",
|
"openapi-typescript": "^7.13.0",
|
||||||
"oxlint": "~1.55.0",
|
"oxlint": "~1.60.0",
|
||||||
"prettier": "3.8.1",
|
"prettier": "3.8.1",
|
||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
"vite": "^8.0.0",
|
"vite": "^8.0.0",
|
||||||
|
|||||||
@@ -2,11 +2,12 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
|
|||||||
import { mount, flushPromises } from '@vue/test-utils'
|
import { mount, flushPromises } from '@vue/test-utils'
|
||||||
import { createRouter, createMemoryHistory } from 'vue-router'
|
import { createRouter, createMemoryHistory } from 'vue-router'
|
||||||
import EventList from '../EventList.vue'
|
import EventList from '../EventList.vue'
|
||||||
|
import type { api } from '../../api/client'
|
||||||
|
|
||||||
vi.mock('../../api/client', () => ({
|
vi.mock('../../api/client', () => ({
|
||||||
api: {
|
api: {
|
||||||
PATCH: vi.fn(),
|
PATCH: vi.fn<typeof api.PATCH>(),
|
||||||
DELETE: vi.fn(),
|
DELETE: vi.fn<typeof api.DELETE>(),
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
@@ -31,7 +32,7 @@ const mockEvents = [
|
|||||||
{ eventToken: 'rsvp-1', title: 'Attending Event', dateTime: '2026-03-11T20:00:00', rsvpToken: 'rsvp-token', rsvpName: 'Max' },
|
{ eventToken: 'rsvp-1', title: 'Attending Event', dateTime: '2026-03-11T20:00:00', rsvpToken: 'rsvp-token', rsvpName: 'Max' },
|
||||||
]
|
]
|
||||||
|
|
||||||
const removeEventMock = vi.fn()
|
const removeEventMock = vi.fn<(eventToken: string) => void>()
|
||||||
|
|
||||||
vi.mock('../../composables/useEventStorage', () => ({
|
vi.mock('../../composables/useEventStorage', () => ({
|
||||||
isValidStoredEvent: (e: unknown) => {
|
isValidStoredEvent: (e: unknown) => {
|
||||||
|
|||||||
@@ -3,19 +3,20 @@ import { mount, flushPromises } from '@vue/test-utils'
|
|||||||
import { createRouter, createMemoryHistory } from 'vue-router'
|
import { createRouter, createMemoryHistory } from 'vue-router'
|
||||||
import EventCreateView from '../EventCreateView.vue'
|
import EventCreateView from '../EventCreateView.vue'
|
||||||
import { api } from '@/api/client'
|
import { api } from '@/api/client'
|
||||||
|
import type { StoredEvent } from '@/composables/useEventStorage'
|
||||||
vi.mock('@/api/client', () => ({
|
vi.mock('@/api/client', () => ({
|
||||||
api: {
|
api: {
|
||||||
POST: vi.fn(),
|
POST: vi.fn<typeof api.POST>(),
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
vi.mock('@/composables/useEventStorage', () => ({
|
vi.mock('@/composables/useEventStorage', () => ({
|
||||||
useEventStorage: vi.fn(() => ({
|
useEventStorage: vi.fn<() => unknown>(() => ({
|
||||||
saveCreatedEvent: vi.fn(),
|
saveCreatedEvent: vi.fn<() => void>(),
|
||||||
getStoredEvents: vi.fn(() => []),
|
getStoredEvents: vi.fn<() => unknown[]>(() => []),
|
||||||
getOrganizerToken: vi.fn(),
|
getOrganizerToken: vi.fn<() => string | undefined>(),
|
||||||
saveRsvp: vi.fn(),
|
saveRsvp: vi.fn<() => void>(),
|
||||||
getRsvp: vi.fn(),
|
getRsvp: vi.fn<() => unknown>(),
|
||||||
})),
|
})),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
@@ -154,19 +155,19 @@ describe('EventCreateView', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('submits successfully, saves to storage, and navigates to event page', async () => {
|
it('submits successfully, saves to storage, and navigates to event page', async () => {
|
||||||
const mockSave = vi.fn()
|
const mockSave = vi.fn<(...args: unknown[]) => void>()
|
||||||
vi.mocked(vi.importActual<typeof import('@/composables/useEventStorage')>)
|
vi.mocked(vi.importActual<typeof import('@/composables/useEventStorage')>)
|
||||||
const { useEventStorage } = await import('@/composables/useEventStorage')
|
const { useEventStorage } = await import('@/composables/useEventStorage')
|
||||||
vi.mocked(useEventStorage).mockReturnValue({
|
vi.mocked(useEventStorage).mockReturnValue({
|
||||||
saveCreatedEvent: mockSave,
|
saveCreatedEvent: mockSave,
|
||||||
getStoredEvents: vi.fn(() => []),
|
getStoredEvents: vi.fn<() => StoredEvent[]>(() => []),
|
||||||
getOrganizerToken: vi.fn(),
|
getOrganizerToken: vi.fn<() => string | undefined>(),
|
||||||
saveRsvp: vi.fn(),
|
saveRsvp: vi.fn<() => void>(),
|
||||||
getRsvp: vi.fn(),
|
getRsvp: vi.fn<() => { rsvpToken: string; rsvpName: string } | undefined>(),
|
||||||
removeRsvp: vi.fn(),
|
removeRsvp: vi.fn<() => void>(),
|
||||||
saveWatch: vi.fn(),
|
saveWatch: vi.fn<() => void>(),
|
||||||
isStored: vi.fn(() => false),
|
isStored: vi.fn<() => boolean>(() => false),
|
||||||
removeEvent: vi.fn(),
|
removeEvent: vi.fn<() => void>(),
|
||||||
})
|
})
|
||||||
|
|
||||||
vi.mocked(api.POST).mockResolvedValueOnce({
|
vi.mocked(api.POST).mockResolvedValueOnce({
|
||||||
|
|||||||
@@ -6,26 +6,26 @@ import { api } from '@/api/client'
|
|||||||
|
|
||||||
vi.mock('@/api/client', () => ({
|
vi.mock('@/api/client', () => ({
|
||||||
api: {
|
api: {
|
||||||
GET: vi.fn(),
|
GET: vi.fn<typeof api.GET>(),
|
||||||
POST: vi.fn(),
|
POST: vi.fn<typeof api.POST>(),
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const mockSaveRsvp = vi.fn()
|
const mockSaveRsvp = vi.fn<(...args: unknown[]) => void>()
|
||||||
const mockGetRsvp = vi.fn()
|
const mockGetRsvp = vi.fn<(eventToken: string) => { rsvpToken: string; rsvpName: string } | undefined>()
|
||||||
const mockGetOrganizerToken = vi.fn()
|
const mockGetOrganizerToken = vi.fn<(eventToken: string) => string | undefined>()
|
||||||
const mockSaveWatch = vi.fn()
|
const mockSaveWatch = vi.fn<(...args: unknown[]) => void>()
|
||||||
const mockIsStored = vi.fn()
|
const mockIsStored = vi.fn<(eventToken: string) => boolean>()
|
||||||
const mockRemoveEvent = vi.fn()
|
const mockRemoveEvent = vi.fn<(eventToken: string) => void>()
|
||||||
|
|
||||||
vi.mock('@/composables/useEventStorage', () => ({
|
vi.mock('@/composables/useEventStorage', () => ({
|
||||||
useEventStorage: vi.fn(() => ({
|
useEventStorage: vi.fn<() => unknown>(() => ({
|
||||||
saveCreatedEvent: vi.fn(),
|
saveCreatedEvent: vi.fn<() => void>(),
|
||||||
getStoredEvents: vi.fn(() => []),
|
getStoredEvents: vi.fn<() => unknown[]>(() => []),
|
||||||
getOrganizerToken: mockGetOrganizerToken,
|
getOrganizerToken: mockGetOrganizerToken,
|
||||||
saveRsvp: mockSaveRsvp,
|
saveRsvp: mockSaveRsvp,
|
||||||
getRsvp: mockGetRsvp,
|
getRsvp: mockGetRsvp,
|
||||||
removeRsvp: vi.fn(),
|
removeRsvp: vi.fn<() => void>(),
|
||||||
saveWatch: mockSaveWatch,
|
saveWatch: mockSaveWatch,
|
||||||
isStored: mockIsStored,
|
isStored: mockIsStored,
|
||||||
removeEvent: mockRemoveEvent,
|
removeEvent: mockRemoveEvent,
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ describe('EventStubView', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('copies link to clipboard and shows confirmation', async () => {
|
it('copies link to clipboard and shows confirmation', async () => {
|
||||||
const writeTextMock = vi.fn().mockResolvedValue(undefined)
|
const writeTextMock = vi.fn<(text: string) => Promise<void>>().mockResolvedValue(undefined)
|
||||||
Object.assign(navigator, {
|
Object.assign(navigator, {
|
||||||
clipboard: { writeText: writeTextMock },
|
clipboard: { writeText: writeTextMock },
|
||||||
})
|
})
|
||||||
@@ -63,7 +63,7 @@ describe('EventStubView', () => {
|
|||||||
|
|
||||||
it('shows failure message when clipboard is unavailable', async () => {
|
it('shows failure message when clipboard is unavailable', async () => {
|
||||||
Object.assign(navigator, {
|
Object.assign(navigator, {
|
||||||
clipboard: { writeText: vi.fn().mockRejectedValue(new Error('Not allowed')) },
|
clipboard: { writeText: vi.fn<(text: string) => Promise<void>>().mockRejectedValue(new Error('Not allowed')) },
|
||||||
})
|
})
|
||||||
|
|
||||||
const wrapper = await mountWithToken('fail-test')
|
const wrapper = await mountWithToken('fail-test')
|
||||||
|
|||||||
Reference in New Issue
Block a user