From 43afe74e9c8a68cff3ab2d59365c2ad74a09efb9 Mon Sep 17 00:00:00 2001 From: uknmr Date: Sat, 14 Dec 2024 17:44:48 +0900 Subject: [PATCH] =?UTF-8?q?docs(Input):=20type=20=E3=81=AE=20Story=20?= =?UTF-8?q?=E3=81=AB=E3=83=A9=E3=83=99=E3=83=AB=E3=81=A8=E3=83=91=E3=82=BF?= =?UTF-8?q?=E3=83=BC=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DatePicker/stories/DatePicker.stories.tsx | 1 + .../DatePicker/stories/VRTDatePicker.stories.tsx | 2 +- .../src/components/Input/stories/Input.stories.tsx | 13 +++++++++---- .../stories/VRTWarekiPicker.stories.tsx | 9 +-------- .../WarekiPicker/stories/WarekiPicker.stories.tsx | 1 + packages/smarthr-ui/test-runner-jest.config.js | 5 ----- 6 files changed, 13 insertions(+), 18 deletions(-) diff --git a/packages/smarthr-ui/src/components/DatePicker/stories/DatePicker.stories.tsx b/packages/smarthr-ui/src/components/DatePicker/stories/DatePicker.stories.tsx index d8de5351b9..3c642b934d 100644 --- a/packages/smarthr-ui/src/components/DatePicker/stories/DatePicker.stories.tsx +++ b/packages/smarthr-ui/src/components/DatePicker/stories/DatePicker.stories.tsx @@ -20,6 +20,7 @@ export default { parameters: { chromatic: { disableSnapshot: true }, }, + tags: ['skip-test-runner'], } satisfies Meta export const Playground: StoryObj = { diff --git a/packages/smarthr-ui/src/components/DatePicker/stories/VRTDatePicker.stories.tsx b/packages/smarthr-ui/src/components/DatePicker/stories/VRTDatePicker.stories.tsx index 35edfac03b..b860a25e29 100644 --- a/packages/smarthr-ui/src/components/DatePicker/stories/VRTDatePicker.stories.tsx +++ b/packages/smarthr-ui/src/components/DatePicker/stories/VRTDatePicker.stories.tsx @@ -55,7 +55,7 @@ export default { parameters: { chromatic: { disableSnapshot: false }, }, - tags: ['!autodocs'], + tags: ['!autodocs', 'skip-test-runner'], } satisfies Meta export const VRT = {} diff --git a/packages/smarthr-ui/src/components/Input/stories/Input.stories.tsx b/packages/smarthr-ui/src/components/Input/stories/Input.stories.tsx index 27dfd73f91..43d3476e78 100644 --- a/packages/smarthr-ui/src/components/Input/stories/Input.stories.tsx +++ b/packages/smarthr-ui/src/components/Input/stories/Input.stories.tsx @@ -49,10 +49,15 @@ export const Type: StoryObj = { name: 'type', render: (args) => ( - {[undefined, 'text', 'number', 'password'].map((type) => ( - // eslint-disable-next-line smarthr/a11y-input-in-form-control - - ))} + {[undefined, 'text', 'number', 'password', 'date', 'datetime-local', 'time', 'month'].map( + (type) => ( + + ), + )} ), } diff --git a/packages/smarthr-ui/src/components/WarekiPicker/stories/VRTWarekiPicker.stories.tsx b/packages/smarthr-ui/src/components/WarekiPicker/stories/VRTWarekiPicker.stories.tsx index 40fb8a3462..dda5bd4caa 100644 --- a/packages/smarthr-ui/src/components/WarekiPicker/stories/VRTWarekiPicker.stories.tsx +++ b/packages/smarthr-ui/src/components/WarekiPicker/stories/VRTWarekiPicker.stories.tsx @@ -17,7 +17,6 @@ export default { const value = '2024/11/06' const placeholder = '日付を入力してください' const width = '100%' - const showAlternative = (_: Date | null) =>
alt
const formatDate = (date: Date | null) => dayjs(date).format('YYYY年MM月DD') const matrics = [ @@ -35,12 +34,6 @@ export default { - export const VRT = {} diff --git a/packages/smarthr-ui/src/components/WarekiPicker/stories/WarekiPicker.stories.tsx b/packages/smarthr-ui/src/components/WarekiPicker/stories/WarekiPicker.stories.tsx index 2dfed8113c..fe104cb5e8 100644 --- a/packages/smarthr-ui/src/components/WarekiPicker/stories/WarekiPicker.stories.tsx +++ b/packages/smarthr-ui/src/components/WarekiPicker/stories/WarekiPicker.stories.tsx @@ -20,6 +20,7 @@ export default { parameters: { chromatic: { disableSnapshot: true }, }, + tags: ['skip-test-runner'], } satisfies Meta export const Playground: StoryObj = { diff --git a/packages/smarthr-ui/test-runner-jest.config.js b/packages/smarthr-ui/test-runner-jest.config.js index 02e2c726ab..87ac7b79e0 100644 --- a/packages/smarthr-ui/test-runner-jest.config.js +++ b/packages/smarthr-ui/test-runner-jest.config.js @@ -32,11 +32,6 @@ module.exports = { 'ComboBox.stories.tsx', 'FieldSet.stories.tsx', 'Switch.stories.tsx', - /** - * error: "Form elements must have labels" - * error: "Elements must only use allowed ARIA attributes" - */ - 'DatePicker.stories.tsx', 'FormControl.stories.tsx', // DatePicker を含むために除外 /** * error: "ARIA attributes must conform to valid values"