fix msw paths to fix chromatic

This commit is contained in:
Gauthier Roebroeck 2025-10-20 16:56:36 +08:00
parent 8dacf906fa
commit aeab4c4627
10 changed files with 22 additions and 20 deletions

View file

@ -30,7 +30,7 @@ export const Default: Story = {
export const Loading: Story = { export const Loading: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', async () => await delay(5_000))], handlers: [http.all('*/actuator/info', async () => await delay(5_000))],
}, },
}, },
} }
@ -38,7 +38,7 @@ export const Loading: Story = {
export const Error: Story = { export const Error: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', response401Unauthorized)], handlers: [http.all('*/actuator/info', response401Unauthorized)],
}, },
}, },
} }

View file

@ -43,7 +43,7 @@ export const OutdatedVersion: Story = {
export const Loading: Story = { export const Loading: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', async () => await delay(5_000))], handlers: [http.all('*/api/v1/releases', async () => await delay(5_000))],
}, },
}, },
} }
@ -51,7 +51,7 @@ export const Loading: Story = {
export const Error: Story = { export const Error: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', response401Unauthorized)], handlers: [http.all('*/api/v1/releases', response401Unauthorized)],
}, },
}, },
} }

View file

@ -35,7 +35,7 @@ export const PresetPath: Story = {
export const Loading: Story = { export const Loading: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', async () => await delay(2_000))], handlers: [http.all('*/api/v1/filesystem', async () => await delay(2_000))],
}, },
}, },
} }
@ -43,7 +43,7 @@ export const Loading: Story = {
export const Error: Story = { export const Error: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', response401Unauthorized)], handlers: [http.all('*/api/v1/filesystem', response401Unauthorized)],
}, },
}, },
} }

View file

@ -45,7 +45,7 @@ export const NoResults: Story = {
export const Loading: Story = { export const Loading: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', async () => await delay(2_000))], handlers: [http.all('*/api/v1/series/list', async () => await delay(2_000))],
}, },
}, },
} }
@ -56,7 +56,7 @@ export const Error: Story = {
}, },
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', response401Unauthorized)], handlers: [http.all('*/api/v1/series/list', response401Unauthorized)],
}, },
}, },
} }

View file

@ -32,7 +32,7 @@ export const Default: Story = {
export const Loading: Story = { export const Loading: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', async () => await delay(5_000))], handlers: [http.all('*/api/v1/history', async () => await delay(5_000))],
}, },
}, },
} }
@ -52,7 +52,7 @@ export const NoData: Story = {
export const Error: Story = { export const Error: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', response401Unauthorized)], handlers: [http.all('*/api/v1/history', response401Unauthorized)],
}, },
}, },
} }

View file

@ -38,7 +38,9 @@ export const ForMe: Story = {
export const Loading: Story = { export const Loading: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', async () => await delay(5_000))], handlers: [
http.all('*/api/v2/users/authentication-activity', async () => await delay(5_000)),
],
}, },
}, },
} }
@ -58,7 +60,7 @@ export const NoData: Story = {
export const Error: Story = { export const Error: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', response401Unauthorized)], handlers: [http.all('*/api/v2/users/authentication-activity', response401Unauthorized)],
}, },
}, },
} }

View file

@ -55,7 +55,7 @@ export const NoUnread: Story = {
export const Loading: Story = { export const Loading: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', async () => await delay(5_000))], handlers: [http.all('*/api/v1/announcements', async () => await delay(5_000))],
}, },
}, },
} }
@ -63,7 +63,7 @@ export const Loading: Story = {
export const Error: Story = { export const Error: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', response401Unauthorized)], handlers: [http.all('*/api/v1/announcements', response401Unauthorized)],
}, },
}, },
} }

View file

@ -41,7 +41,7 @@ export const SaveFail: Story = {
export const Loading: Story = { export const Loading: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', async () => await delay(5_000))], handlers: [http.all('*/api/v1/settings', async () => await delay(5_000))],
}, },
}, },
} }
@ -49,7 +49,7 @@ export const Loading: Story = {
export const Error: Story = { export const Error: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', response401Unauthorized)], handlers: [http.all('*/api/v1/settings', response401Unauthorized)],
}, },
}, },
} }

View file

@ -44,7 +44,7 @@ export const Outdated: Story = {
export const Loading: Story = { export const Loading: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', async () => await delay(5_000))], handlers: [http.all('*/api/v1/releases', async () => await delay(5_000))],
}, },
}, },
} }
@ -52,7 +52,7 @@ export const Loading: Story = {
export const Error: Story = { export const Error: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', response401Unauthorized)], handlers: [http.all('*/api/v1/releases', response401Unauthorized)],
}, },
}, },
} }

View file

@ -35,7 +35,7 @@ export const Default: Story = {
export const Loading: Story = { export const Loading: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', async () => await delay(5_000))], handlers: [http.all('*/api/*', async () => await delay(5_000))],
}, },
}, },
} }
@ -43,7 +43,7 @@ export const Loading: Story = {
export const Error: Story = { export const Error: Story = {
parameters: { parameters: {
msw: { msw: {
handlers: [http.all('*', response401Unauthorized)], handlers: [http.all('*/api/*', response401Unauthorized)],
}, },
}, },
} }