import type { Meta, StoryObj } from '@storybook/vue3-vite' import BuildCommit from './BuildCommit.vue' import { http, delay } from 'msw' import { response401Unauthorized } from '@/mocks/api/handlers' const meta = { component: BuildCommit, render: (args: object) => ({ components: { BuildCommit }, setup() { return { args } }, template: '', }), parameters: { // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout }, args: {}, } satisfies Meta export default meta type Story = StoryObj export const Default: Story = { args: {}, } export const Loading: Story = { parameters: { msw: { handlers: [http.all('*/actuator/info', async () => await delay(5_000))], }, }, } export const Error: Story = { parameters: { msw: { handlers: [http.all('*/actuator/info', response401Unauthorized)], }, }, }