diff --git a/next-ui/src/components/apikey/GenerateDialog.stories.ts b/next-ui/src/components/apikey/GenerateDialog.stories.ts index e6eb3b2f..1664ed3f 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 2f76f2cf..33e767e8 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 7927b2f6..453e1590 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 bd390810..3d6ef96c 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 a9007e7c..10837fa5 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 b45b656f..e8862909 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 dfc403b5..13d566aa 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 }) => {