@@ -749,6 +749,15 @@ describe('InstanceForm', () => {
749
749
)
750
750
} )
751
751
752
+ expect ( screen . getByTestId ( BTN_SUBMIT ) ) . toBeDisabled ( )
753
+
754
+ await act ( ( ) => {
755
+ fireEvent . change (
756
+ screen . getByTestId ( 'sshUsername' ) ,
757
+ { target : { value : 'username' } }
758
+ )
759
+ } )
760
+
752
761
expect ( screen . getByTestId ( BTN_SUBMIT ) ) . not . toBeDisabled ( )
753
762
} )
754
763
@@ -783,6 +792,10 @@ describe('InstanceForm', () => {
783
792
screen . getByTestId ( 'sshHost' ) ,
784
793
{ target : { value : 'localhost' } }
785
794
)
795
+ fireEvent . change (
796
+ screen . getByTestId ( 'sshUsername' ) ,
797
+ { target : { value : 'username' } }
798
+ )
786
799
} )
787
800
788
801
expect ( screen . getByTestId ( BTN_SUBMIT ) ) . toBeDisabled ( )
@@ -827,6 +840,11 @@ describe('InstanceForm', () => {
827
840
{ target : { value : '1771' } }
828
841
)
829
842
843
+ fireEvent . change (
844
+ screen . getByTestId ( 'sshUsername' ) ,
845
+ { target : { value : 'username' } }
846
+ )
847
+
830
848
fireEvent . change (
831
849
screen . getByTestId ( 'sshPassword' ) ,
832
850
{ target : { value : '123' } }
@@ -841,6 +859,7 @@ describe('InstanceForm', () => {
841
859
expect . objectContaining ( {
842
860
sshHost : 'localhost' ,
843
861
sshPort : '1771' ,
862
+ sshUsername : 'username' ,
844
863
sshPassword : '123' ,
845
864
} )
846
865
)
@@ -879,6 +898,11 @@ describe('InstanceForm', () => {
879
898
{ target : { value : '1771' } }
880
899
)
881
900
901
+ fireEvent . change (
902
+ screen . getByTestId ( 'sshUsername' ) ,
903
+ { target : { value : 'username' } }
904
+ )
905
+
882
906
fireEvent . change (
883
907
screen . getByTestId ( 'sshPrivateKey' ) ,
884
908
{ target : { value : '123444' } }
@@ -898,6 +922,7 @@ describe('InstanceForm', () => {
898
922
expect . objectContaining ( {
899
923
sshHost : 'localhost' ,
900
924
sshPort : '1771' ,
925
+ sshUsername : 'username' ,
901
926
sshPrivateKey : '123444' ,
902
927
sshPassphrase : '123444' ,
903
928
} )
0 commit comments