2023-04-05 18:10:45 +00:00
|
|
|
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
2023-04-13 03:20:39 +00:00
|
|
|
import { action } from '@storybook/addon-actions';
|
2023-04-05 18:10:45 +00:00
|
|
|
import { expect } from '@storybook/jest';
|
|
|
|
import { waitFor } from '@storybook/testing-library';
|
|
|
|
import { StoryObj } from '@storybook/vue3';
|
|
|
|
import MkError from './MkError.vue';
|
|
|
|
export const Default = {
|
|
|
|
render(args) {
|
|
|
|
return {
|
|
|
|
components: {
|
|
|
|
MkError,
|
|
|
|
},
|
|
|
|
setup() {
|
|
|
|
return {
|
|
|
|
args,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
props() {
|
|
|
|
return {
|
|
|
|
...this.args,
|
|
|
|
};
|
|
|
|
},
|
2023-04-13 03:20:39 +00:00
|
|
|
events() {
|
|
|
|
return {
|
|
|
|
retry: action('retry'),
|
|
|
|
};
|
|
|
|
},
|
2023-04-05 18:10:45 +00:00
|
|
|
},
|
2023-04-13 03:20:39 +00:00
|
|
|
template: '<MkError v-bind="props" v-on="events" />',
|
2023-04-05 18:10:45 +00:00
|
|
|
};
|
|
|
|
},
|
|
|
|
async play({ canvasElement }) {
|
|
|
|
await expect(canvasElement.firstElementChild).not.toBeNull();
|
|
|
|
await waitFor(async () => expect(canvasElement.firstElementChild?.classList).not.toContain('_transition_zoom-enter-active'));
|
|
|
|
},
|
2023-04-13 03:20:39 +00:00
|
|
|
args: {
|
|
|
|
},
|
2023-04-05 18:10:45 +00:00
|
|
|
parameters: {
|
|
|
|
layout: 'centered',
|
|
|
|
},
|
|
|
|
} satisfies StoryObj<typeof MkError>;
|