From c6d5f4b27840ca5dc2580c9ca3768e96980ba2d3 Mon Sep 17 00:00:00 2001 From: Youssef Date: Mon, 24 Jan 2022 23:05:11 +0100 Subject: [PATCH] fix: update testIds in the feature form --- .../CreateFeature/CreateFeature/CreateFeature.tsx | 2 ++ .../feature/CreateFeature/FeatureForm/FeatureForm.tsx | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/feature/CreateFeature/CreateFeature/CreateFeature.tsx b/frontend/src/component/feature/CreateFeature/CreateFeature/CreateFeature.tsx index c30dd74e1c..455f0f6b1a 100644 --- a/frontend/src/component/feature/CreateFeature/CreateFeature/CreateFeature.tsx +++ b/frontend/src/component/feature/CreateFeature/CreateFeature/CreateFeature.tsx @@ -7,6 +7,7 @@ import useToast from '../../../../hooks/useToast'; import useFeatureApi from '../../../../hooks/api/actions/useFeatureApi/useFeatureApi'; import { CREATE_FEATURE } from '../../../providers/AccessProvider/permissions'; import PermissionButton from '../../../common/PermissionButton/PermissionButton'; +import { CF_CREATE_BTN_ID } from '../../../../testIds'; const CreateFeature = () => { /* @ts-ignore */ @@ -92,6 +93,7 @@ const CreateFeature = () => { permission={CREATE_FEATURE} projectId={project} type="submit" + data-test={CF_CREATE_BTN_ID} > Create toggle diff --git a/frontend/src/component/feature/CreateFeature/FeatureForm/FeatureForm.tsx b/frontend/src/component/feature/CreateFeature/FeatureForm/FeatureForm.tsx index 4e2d327b26..44630d11d8 100644 --- a/frontend/src/component/feature/CreateFeature/FeatureForm/FeatureForm.tsx +++ b/frontend/src/component/feature/CreateFeature/FeatureForm/FeatureForm.tsx @@ -3,7 +3,11 @@ import Input from '../../../common/Input/Input'; import { Button } from '@material-ui/core'; import { useStyles } from './FeatureForm.styles'; import FeatureTypeSelect from '../../FeatureView2/FeatureSettings/FeatureSettingsMetadata/FeatureTypeSelect/FeatureTypeSelect'; -import { CF_DESC_ID, CF_TYPE_ID } from '../../../../testIds'; +import { + CF_DESC_ID, + CF_NAME_ID, + CF_TYPE_ID, +} from '../../../../testIds'; import useFeatureTypes from '../../../../hooks/api/getters/useFeatureTypes/useFeatureTypes'; import { KeyboardArrowDownOutlined } from '@material-ui/icons'; import useUser from '../../../../hooks/api/getters/useUser/useUser'; @@ -89,6 +93,9 @@ const FeatureForm: React.FC = ({ onFocus={() => clearErrors()} value={name} onChange={e => setName(trim(e.target.value))} + inputProps={{ + 'data-test': CF_NAME_ID, + }} />