From 41aafdea00e90b1f6f86adcad482198276bab13a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Thu, 6 Apr 2023 03:10:45 +0900 Subject: [PATCH] test(#10336): stabilize `MkError` stories --- .github/workflows/storybook.yml | 4 ++- .../components/global/MkError.stories.impl.ts | 34 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 packages/frontend/src/components/global/MkError.stories.impl.ts diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index eda28c5f7..186000ccd 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -5,7 +5,9 @@ on: branches: - master - develop - pull_request_target: + pull_request: + branches: + - "!l10n_develop" jobs: build: diff --git a/packages/frontend/src/components/global/MkError.stories.impl.ts b/packages/frontend/src/components/global/MkError.stories.impl.ts new file mode 100644 index 000000000..60ac5c91a --- /dev/null +++ b/packages/frontend/src/components/global/MkError.stories.impl.ts @@ -0,0 +1,34 @@ +/* eslint-disable @typescript-eslint/explicit-function-return-type */ +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, + }; + }, + }, + template: '', + }; + }, + async play({ canvasElement }) { + await expect(canvasElement.firstElementChild).not.toBeNull(); + await waitFor(async () => expect(canvasElement.firstElementChild?.classList).not.toContain('_transition_zoom-enter-active')); + }, + parameters: { + layout: 'centered', + }, +} satisfies StoryObj;