diff --git a/next-ui/src/components/apikey/GenerateDialog.stories.ts b/next-ui/src/components/apikey/GenerateDialog.stories.ts index e6eb3b2f5..1664ed3fa 100644 --- a/next-ui/src/components/apikey/GenerateDialog.stories.ts +++ b/next-ui/src/components/apikey/GenerateDialog.stories.ts @@ -45,7 +45,7 @@ export const Created: Story = { export const Loading: Story = { parameters: { msw: { - handlers: [http.all('*', async () => await delay(5_000))], + handlers: [http.all('*/api/*', async () => await delay(5_000))], }, }, play: async ({ userEvent }) => { diff --git a/next-ui/src/components/import/books/TransientBooksTable.stories.ts b/next-ui/src/components/import/books/TransientBooksTable.stories.ts index 2f76f2cf4..33e767e88 100644 --- a/next-ui/src/components/import/books/TransientBooksTable.stories.ts +++ b/next-ui/src/components/import/books/TransientBooksTable.stories.ts @@ -41,7 +41,7 @@ export const Loading: Story = { }, parameters: { msw: { - handlers: [http.all('*', async () => await delay(2_000))], + handlers: [http.all('*/api/*', async () => await delay(2_000))], }, }, } diff --git a/next-ui/src/components/import/readlist/Table.stories.ts b/next-ui/src/components/import/readlist/Table.stories.ts index 7927b2f67..453e15903 100644 --- a/next-ui/src/components/import/readlist/Table.stories.ts +++ b/next-ui/src/components/import/readlist/Table.stories.ts @@ -87,7 +87,7 @@ export const Loading: Story = { }, parameters: { msw: { - handlers: [http.all('*', async () => await delay(2_000))], + handlers: [http.all('*/v1/readlists', async () => await delay(2_000))], }, }, } diff --git a/next-ui/src/pages/claim.stories.ts b/next-ui/src/pages/claim.stories.ts index bd3908109..3d6ef96cc 100644 --- a/next-ui/src/pages/claim.stories.ts +++ b/next-ui/src/pages/claim.stories.ts @@ -59,7 +59,10 @@ export const Invalid: Story = { export const Loading: Story = { parameters: { msw: { - handlers: [...meta.parameters.msw.handlers, http.post('*', async () => await delay(5_000))], + handlers: [ + ...meta.parameters.msw.handlers, + http.post('*/api/*', async () => await delay(5_000)), + ], }, }, play: async ({ canvas, userEvent }) => { @@ -85,7 +88,7 @@ export const Loading: Story = { export const Error: Story = { parameters: { msw: { - handlers: [...meta.parameters.msw.handlers, http.post('*', response502BadGateway)], + handlers: [...meta.parameters.msw.handlers, http.post('*/api/*', response502BadGateway)], }, }, play: async ({ canvas, userEvent }) => { diff --git a/next-ui/src/pages/import/books.stories.ts b/next-ui/src/pages/import/books.stories.ts index a9007e7cd..10837fa59 100644 --- a/next-ui/src/pages/import/books.stories.ts +++ b/next-ui/src/pages/import/books.stories.ts @@ -29,7 +29,7 @@ export const Default: Story = { export const Loading: Story = { parameters: { msw: { - handlers: [http.all('*', async () => await delay(2_000))], + handlers: [http.all('*/api/*', async () => await delay(2_000))], }, }, } diff --git a/next-ui/src/pages/import/readlist.stories.ts b/next-ui/src/pages/import/readlist.stories.ts index b45b656f0..e8862909f 100644 --- a/next-ui/src/pages/import/readlist.stories.ts +++ b/next-ui/src/pages/import/readlist.stories.ts @@ -32,7 +32,7 @@ export const Default: Story = { export const Loading: Story = { parameters: { msw: { - handlers: [http.all('*', async () => await delay(2_000))], + handlers: [http.all('*/api/*', async () => await delay(2_000))], }, }, } diff --git a/next-ui/src/pages/login.stories.ts b/next-ui/src/pages/login.stories.ts index dfc403b5c..13d566aaf 100644 --- a/next-ui/src/pages/login.stories.ts +++ b/next-ui/src/pages/login.stories.ts @@ -55,7 +55,7 @@ export const Invalid: Story = { export const Loading: Story = { parameters: { msw: { - handlers: [http.all('*', async () => await delay(5_000))], + handlers: [http.all('*/api/*', async () => await delay(5_000))], }, }, play: async ({ canvas, userEvent }) => { @@ -76,7 +76,7 @@ export const Loading: Story = { export const Error: Story = { parameters: { msw: { - handlers: [http.post('*', response502BadGateway)], + handlers: [http.post('*/api/*', response502BadGateway)], }, }, play: async ({ canvas, userEvent }) => {