Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e9ee3c6f2a |
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
wrapperVersion=3.3.4
|
wrapperVersion=3.3.4
|
||||||
distributionType=only-script
|
distributionType=only-script
|
||||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.15/apache-maven-3.9.15-bin.zip
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.14/apache-maven-3.9.14-bin.zip
|
||||||
|
|||||||
+5
-5
@@ -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.13</version>
|
<version>3.5.11</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tngtech.archunit</groupId>
|
<groupId>com.tngtech.archunit</groupId>
|
||||||
<artifactId>archunit-junit5</artifactId>
|
<artifactId>archunit-junit5</artifactId>
|
||||||
<version>1.4.2</version>
|
<version>1.4.1</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.puppycrawl.tools</groupId>
|
<groupId>com.puppycrawl.tools</groupId>
|
||||||
<artifactId>checkstyle</artifactId>
|
<artifactId>checkstyle</artifactId>
|
||||||
<version>13.4.0</version>
|
<version>13.3.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<configuration>
|
<configuration>
|
||||||
@@ -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.3</version>
|
<version>4.9.8.2</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<effort>Max</effort>
|
<effort>Max</effort>
|
||||||
<threshold>Low</threshold>
|
<threshold>Low</threshold>
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.openapitools</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||||
<version>7.21.0</version>
|
<version>7.20.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
|||||||
Generated
+1653
-830
File diff suppressed because it is too large
Load Diff
@@ -38,15 +38,15 @@
|
|||||||
"@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.61.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": "^29.0.0",
|
"jsdom": "^28.1.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.61.0",
|
"oxlint": "~1.60.0",
|
||||||
"prettier": "3.8.3",
|
"prettier": "3.8.1",
|
||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
"vite": "^8.0.0",
|
"vite": "^8.0.0",
|
||||||
"vite-plugin-vue-devtools": "^8.0.6",
|
"vite-plugin-vue-devtools": "^8.0.6",
|
||||||
|
|||||||
@@ -2,12 +2,11 @@ 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<typeof api.PATCH>(),
|
PATCH: vi.fn(),
|
||||||
DELETE: vi.fn<typeof api.DELETE>(),
|
DELETE: vi.fn(),
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
@@ -32,7 +31,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<(eventToken: string) => void>()
|
const removeEventMock = vi.fn()
|
||||||
|
|
||||||
vi.mock('../../composables/useEventStorage', () => ({
|
vi.mock('../../composables/useEventStorage', () => ({
|
||||||
isValidStoredEvent: (e: unknown) => {
|
isValidStoredEvent: (e: unknown) => {
|
||||||
|
|||||||
@@ -3,20 +3,19 @@ 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<typeof api.POST>(),
|
POST: vi.fn(),
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
vi.mock('@/composables/useEventStorage', () => ({
|
vi.mock('@/composables/useEventStorage', () => ({
|
||||||
useEventStorage: vi.fn<() => unknown>(() => ({
|
useEventStorage: vi.fn(() => ({
|
||||||
saveCreatedEvent: vi.fn<() => void>(),
|
saveCreatedEvent: vi.fn(),
|
||||||
getStoredEvents: vi.fn<() => unknown[]>(() => []),
|
getStoredEvents: vi.fn(() => []),
|
||||||
getOrganizerToken: vi.fn<() => string | undefined>(),
|
getOrganizerToken: vi.fn(),
|
||||||
saveRsvp: vi.fn<() => void>(),
|
saveRsvp: vi.fn(),
|
||||||
getRsvp: vi.fn<() => unknown>(),
|
getRsvp: vi.fn(),
|
||||||
})),
|
})),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
@@ -155,19 +154,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<(...args: unknown[]) => void>()
|
const mockSave = vi.fn()
|
||||||
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<() => StoredEvent[]>(() => []),
|
getStoredEvents: vi.fn(() => []),
|
||||||
getOrganizerToken: vi.fn<() => string | undefined>(),
|
getOrganizerToken: vi.fn(),
|
||||||
saveRsvp: vi.fn<() => void>(),
|
saveRsvp: vi.fn(),
|
||||||
getRsvp: vi.fn<() => { rsvpToken: string; rsvpName: string } | undefined>(),
|
getRsvp: vi.fn(),
|
||||||
removeRsvp: vi.fn<() => void>(),
|
removeRsvp: vi.fn(),
|
||||||
saveWatch: vi.fn<() => void>(),
|
saveWatch: vi.fn(),
|
||||||
isStored: vi.fn<() => boolean>(() => false),
|
isStored: vi.fn(() => false),
|
||||||
removeEvent: vi.fn<() => void>(),
|
removeEvent: vi.fn(),
|
||||||
})
|
})
|
||||||
|
|
||||||
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<typeof api.GET>(),
|
GET: vi.fn(),
|
||||||
POST: vi.fn<typeof api.POST>(),
|
POST: vi.fn(),
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const mockSaveRsvp = vi.fn<(...args: unknown[]) => void>()
|
const mockSaveRsvp = vi.fn()
|
||||||
const mockGetRsvp = vi.fn<(eventToken: string) => { rsvpToken: string; rsvpName: string } | undefined>()
|
const mockGetRsvp = vi.fn()
|
||||||
const mockGetOrganizerToken = vi.fn<(eventToken: string) => string | undefined>()
|
const mockGetOrganizerToken = vi.fn()
|
||||||
const mockSaveWatch = vi.fn<(...args: unknown[]) => void>()
|
const mockSaveWatch = vi.fn()
|
||||||
const mockIsStored = vi.fn<(eventToken: string) => boolean>()
|
const mockIsStored = vi.fn()
|
||||||
const mockRemoveEvent = vi.fn<(eventToken: string) => void>()
|
const mockRemoveEvent = vi.fn()
|
||||||
|
|
||||||
vi.mock('@/composables/useEventStorage', () => ({
|
vi.mock('@/composables/useEventStorage', () => ({
|
||||||
useEventStorage: vi.fn<() => unknown>(() => ({
|
useEventStorage: vi.fn(() => ({
|
||||||
saveCreatedEvent: vi.fn<() => void>(),
|
saveCreatedEvent: vi.fn(),
|
||||||
getStoredEvents: vi.fn<() => unknown[]>(() => []),
|
getStoredEvents: vi.fn(() => []),
|
||||||
getOrganizerToken: mockGetOrganizerToken,
|
getOrganizerToken: mockGetOrganizerToken,
|
||||||
saveRsvp: mockSaveRsvp,
|
saveRsvp: mockSaveRsvp,
|
||||||
getRsvp: mockGetRsvp,
|
getRsvp: mockGetRsvp,
|
||||||
removeRsvp: vi.fn<() => void>(),
|
removeRsvp: vi.fn(),
|
||||||
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<(text: string) => Promise<void>>().mockResolvedValue(undefined)
|
const writeTextMock = vi.fn().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<(text: string) => Promise<void>>().mockRejectedValue(new Error('Not allowed')) },
|
clipboard: { writeText: vi.fn().mockRejectedValue(new Error('Not allowed')) },
|
||||||
})
|
})
|
||||||
|
|
||||||
const wrapper = await mountWithToken('fail-test')
|
const wrapper = await mountWithToken('fail-test')
|
||||||
|
|||||||
Reference in New Issue
Block a user