File tree Expand file tree Collapse file tree 3 files changed +49
-7
lines changed Expand file tree Collapse file tree 3 files changed +49
-7
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ export const EditorToggle: FC<EditorToggleProps> = ({
5555            { t ( 'Configure via:' ) } 
5656          </ label > 
5757          < Radio 
58+             data-test = { `${ EditorType . CUSTOM }  -view-input` } 
5859            id = { EditorType . CUSTOM } 
5960            isChecked = { type  ===  EditorType . CUSTOM } 
6061            label = { t ( 'Form view' ) } 
@@ -84,19 +85,42 @@ export const EditorToggle: FC<EditorToggleProps> = ({
8485            </ Alert > 
8586          ) } 
8687          < ActionGroup  className = "pf-v5-c-form" > 
87-             < Button  type = "submit"  onClick = { onSubmit }  variant = "primary" > 
88+             < Button 
89+               id = { isUpdate  ? 'update-resource-button'  : 'create-resource-button' } 
90+               data-test-id = { isUpdate  ? 'update-resource-button'  : 'create-resource-button' } 
91+               type = "submit" 
92+               onClick = { onSubmit } 
93+               variant = "primary" 
94+             > 
8895              { isUpdate  ? t ( 'Update' )  : t ( 'Create' ) } 
8996            </ Button > 
9097            { updated  &&  ( 
91-               < Button  type = "submit"  onClick = { onReload }  variant = "secondary" > 
98+               < Button 
99+                 id = "reload-resource-button" 
100+                 data-test-id = "reload-resource-button" 
101+                 type = "submit" 
102+                 onClick = { onReload } 
103+                 variant = "secondary" 
104+               > 
92105                { t ( 'Reload' ) } 
93106              </ Button > 
94107            ) } 
95-             < Button  onClick = { onCancel }  variant = "secondary" > 
108+             < Button 
109+               id = "cancel-resource-button" 
110+               data-test-id = "cancel-resource-button" 
111+               onClick = { onCancel } 
112+               variant = "secondary" 
113+             > 
96114              { t ( 'Cancel' ) } 
97115            </ Button > 
98116            { isUpdate  &&  ( 
99-               < Button  type = "submit"  onClick = { onDelete }  variant = "danger" > 
117+               < Button 
118+                 id = "delete-resource-button" 
119+                 data-test-id = "delete-resource-button" 
120+                 type = "submit" 
121+                 onClick = { onDelete } 
122+                 variant = "danger" 
123+               > 
100124                { t ( 'Delete' ) } 
101125              </ Button > 
102126            ) } 
Original file line number Diff line number Diff line change @@ -47,14 +47,20 @@ export const FlowCollectorStatus: FC<FlowCollectorStatusProps> = () => {
4747                        < FlexItem > 
4848                          < Button 
4949                            id = "edit-flow-collector" 
50+                             data-test-id = "edit-flow-collector" 
5051                            variant = "primary" 
5152                            onClick = { ( )  =>  navigate ( flowCollectorEditPath ) } 
5253                          > 
5354                            { t ( 'Edit FlowCollector' ) } 
5455                          </ Button > 
5556                        </ FlexItem > 
5657                        < FlexItem > 
57-                           < Button  id = "open-network-traffic"  variant = "link"  onClick = { ( )  =>  navigate ( netflowTrafficPath ) } > 
58+                           < Button 
59+                             id = "open-network-traffic" 
60+                             data-test-id = "open-network-traffic" 
61+                             variant = "link" 
62+                             onClick = { ( )  =>  navigate ( netflowTrafficPath ) } 
63+                           > 
5864                            { t ( 'Open Network Traffic page' ) } 
5965                          </ Button > 
6066                        </ FlexItem > 
Original file line number Diff line number Diff line change @@ -105,10 +105,22 @@ export const ResourceForm: FC<ResourceFormProps> = ({ uiSchema }) => {
105105              onClose = { ( )  =>  setOpen ( false ) } 
106106              footer = { 
107107                < div  className = "footer" > 
108-                   < Button  data-test = "time-range-cancel"  key = "cancel"  variant = "link"  onClick = { ( )  =>  setOpen ( false ) } > 
108+                   < Button 
109+                     id = "cancel-delete-popup-button" 
110+                     data-test-id = "cancel-delete-popup-button" 
111+                     key = "cancel" 
112+                     variant = "link" 
113+                     onClick = { ( )  =>  setOpen ( false ) } 
114+                   > 
109115                    { t ( 'Cancel' ) } 
110116                  </ Button > 
111-                   < Button  key = "confirm"  variant = "danger"  onClick = { ( )  =>  ctx . onSubmit ( data ,  true ) } > 
117+                   < Button 
118+                     id = "confirm-delete-popup-button" 
119+                     data-test-id = "confirm-delete-popup-button" 
120+                     key = "confirm" 
121+                     variant = "danger" 
122+                     onClick = { ( )  =>  ctx . onSubmit ( data ,  true ) } 
123+                   > 
112124                    { t ( 'Delete' ) } 
113125                  </ Button > 
114126                </ div > 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments