mirror of
https://github.com/gotson/komga.git
synced 2025-12-27 02:46:04 +01:00
fine tune msw handlers
This commit is contained in:
parent
58a489ac28
commit
ad077c54d0
7 changed files with 12 additions and 9 deletions
|
|
@ -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 }) => {
|
||||
|
|
|
|||
|
|
@ -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))],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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))],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 }) => {
|
||||
|
|
|
|||
|
|
@ -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))],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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))],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 }) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue