File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
redisinsight/ui/src/pages/rdi/pipeline-management/components/jobs-panel Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,12 @@ describe('JobsPanel', () => {
4343 expect ( render ( < JobsPanel { ...instance ( mockedProps ) } /> ) ) . toBeTruthy ( )
4444 } )
4545
46+ it ( 'should have default value' , ( ) => {
47+ render ( < JobsPanel { ...instance ( mockedProps ) } /> )
48+
49+ expect ( screen . getByTestId ( 'input-value' ) ) . toHaveValue ( '{\n}' )
50+ } )
51+
4652 it ( 'should call onClose' , ( ) => {
4753 const mockOnClose = jest . fn ( )
4854 render ( < JobsPanel { ...instance ( mockedProps ) } onClose = { mockOnClose } /> )
@@ -54,7 +60,7 @@ describe('JobsPanel', () => {
5460 it ( 'should render run btn with proper properties' , ( ) => {
5561 render ( < JobsPanel { ...instance ( mockedProps ) } /> )
5662
57- expect ( screen . getByTestId ( 'dry-run-btn' ) ) . toBeDisabled ( )
63+ expect ( screen . getByTestId ( 'dry-run-btn' ) ) . not . toBeDisabled ( )
5864
5965 // set invalid json value
6066 fireEvent . change ( screen . getByTestId ( 'input-value' ) , {
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ const DryRunJobPanel = (props: Props) => {
6262 const [ selectedTab , changeSelectedTab ] = useState < PipelineJobsTabs > (
6363 PipelineJobsTabs . Transformations ,
6464 )
65- const [ input , setInput ] = useState < string > ( '' )
65+ const [ input , setInput ] = useState < string > ( '{\n} ' )
6666 const [ isFormValid , setIsFormValid ] = useState < boolean > ( false )
6767 const [ targetOptions , setTargetOptions ] = useState < RiSelectOption [ ] > ( [ ] )
6868 const [ selectedTarget , setSelectedTarget ] = useState < string > ( )
@@ -224,7 +224,7 @@ const DryRunJobPanel = (props: Props) => {
224224 </ div >
225225 < div className = { styles . body } >
226226 < Text className = { styles . text } >
227- Add input data to test the transformation logic.
227+ Add input data in JSON format to test the transformation logic.
228228 </ Text >
229229 < div className = { styles . codeLabel } >
230230 < Text > Input</ Text >
You can’t perform that action at this time.
0 commit comments