From 41d9e4aa6083ce381e2326976e679e5931c0b9f2 Mon Sep 17 00:00:00 2001 From: Josselin TILLAY Date: Mon, 18 Dec 2023 09:42:04 +0100 Subject: [PATCH] :green_heart: CI - fix unit tests --- Storybook/.ondevice/storybook.requires.js | 2 +- .../{DatePicker => DateSelector}/DateField.stories.tsx | 10 +++++++--- src/components/icons/IconProps.ts | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) rename Storybook/components/{DatePicker => DateSelector}/DateField.stories.tsx (75%) diff --git a/Storybook/.ondevice/storybook.requires.js b/Storybook/.ondevice/storybook.requires.js index 05fde568..8ff8de09 100644 --- a/Storybook/.ondevice/storybook.requires.js +++ b/Storybook/.ondevice/storybook.requires.js @@ -54,7 +54,7 @@ const getStories = () => { "./components/BottomSheet/BottomSheet.stories.tsx": require("../components/BottomSheet/BottomSheet.stories.tsx"), "./components/Button/Button.stories.tsx": require("../components/Button/Button.stories.tsx"), "./components/Card/Card.stories.tsx": require("../components/Card/Card.stories.tsx"), - "./components/DatePicker/DateField.stories.tsx": require("../components/DatePicker/DateField.stories.tsx"), + "./components/DateSelector/DateField.stories.tsx": require("../components/DateSelector/DateField.stories.tsx"), "./components/Dialog/Dialog.stories.tsx": require("../components/Dialog/Dialog.stories.tsx"), "./components/Divider/Divider.stories.tsx": require("../components/Divider/Divider.stories.tsx"), "./components/DropDown/DropDown.stories.tsx": require("../components/DropDown/DropDown.stories.tsx"), diff --git a/Storybook/components/DatePicker/DateField.stories.tsx b/Storybook/components/DateSelector/DateField.stories.tsx similarity index 75% rename from Storybook/components/DatePicker/DateField.stories.tsx rename to Storybook/components/DateSelector/DateField.stories.tsx index 47dc9112..64c0f40f 100644 --- a/Storybook/components/DatePicker/DateField.stories.tsx +++ b/Storybook/components/DateSelector/DateField.stories.tsx @@ -2,14 +2,18 @@ import React, { useState } from 'react'; import { ComponentMeta } from '@storybook/react'; import { StyleSheet, View } from 'react-native'; import { DateField } from '../../../src'; -import { DateFieldProps } from '../../../src/components/datePicker/DateField'; +import { DateFieldProps } from '../../../src/components/dateSelector/DateField'; export default { title: 'components/DateField', component: DateField, argTypes: { - placeholder: { control: { type: 'text' }, defaultValue: '01' }, - hasError: { control: { type: 'boolean' }, defaultValue: false }, + placeholder: { control: { type: 'text' } }, + hasError: { control: { type: 'boolean' } }, + }, + args: { + placeholder: '01', + hasError: false, }, decorators: [ (Story) => { diff --git a/src/components/icons/IconProps.ts b/src/components/icons/IconProps.ts index ba527219..bca8327c 100644 --- a/src/components/icons/IconProps.ts +++ b/src/components/icons/IconProps.ts @@ -110,4 +110,4 @@ export type IconName = | 'rainy' | 'snow' | 'thunderstorms' - | 'fail' + | 'fail';