@@ -99,16 +99,15 @@ $Selenium->RunTest(
99
99
100
100
# Input fields and submit.
101
101
my $TransitionActionModule = " Kernel::System::ProcessManagement::TransitionAction::TicketArticleCreate" ;
102
- my $TransitionActionKey = " Key " . $RandomID ;
102
+ my $TransitionActionKey = " Body " ;
103
103
my $TransitionActionValue = " Value" . $RandomID ;
104
104
105
105
$Selenium -> find_element( " #Name" , ' css' )-> send_keys($TransitionActionRandom );
106
106
$Selenium -> InputFieldValueSet(
107
107
Element => ' #Module' ,
108
108
Value => $TransitionActionModule ,
109
109
);
110
- $Selenium -> find_element(" .//*[\@ id='ConfigKey[1]']" )-> send_keys($TransitionActionKey );
111
- $Selenium -> find_element(" .//*[\@ id='ConfigValue[1]']" )-> send_keys($TransitionActionValue );
110
+ $Selenium -> find_element(" .//*[\@ id='ConfigValue[5]']" )-> send_keys($TransitionActionValue );
112
111
$Selenium -> find_element( " #Submit" , ' css' )-> click();
113
112
114
113
# Switch back to main window.
@@ -216,6 +215,11 @@ $Selenium->RunTest(
216
215
" ConfigValue stored value" ,
217
216
);
218
217
218
+ # Remove all except one rows
219
+ while ( scalar @{ $Selenium -> find_elements( " .RemoveButton" , ' css' ) } > 2 ) {
220
+ $Selenium -> find_element( " .RemoveButton" , ' css' )-> click();
221
+ }
222
+
219
223
# Try to remove only possible Config Parameters.
220
224
$Selenium -> find_element( " .RemoveButton" , ' css' )-> click();
221
225
@@ -226,16 +230,18 @@ $Selenium->RunTest(
226
230
" Unable to remove only field - JS is success"
227
231
);
228
232
233
+ $Selenium -> find_element(" .//*[\@ id='ConfigValue[13]']" )-> send_keys($TransitionActionValue );
234
+
229
235
# Add new Config key and value.
230
236
$Selenium -> find_element( " #ConfigAdd" , ' css' )-> click();
231
237
232
238
# Verify newly added fields.
233
239
$Self -> True(
234
- $Selenium -> find_element(" .//*[\@ id='ConfigKey[2 ]']" ),
240
+ $Selenium -> find_element(" .//*[\@ id='ConfigKey[14 ]']" ),
235
241
" New Config key field is added - JS is success"
236
242
);
237
243
$Self -> True(
238
- $Selenium -> find_element(" .//*[\@ id='ConfigValue[2 ]']" ),
244
+ $Selenium -> find_element(" .//*[\@ id='ConfigValue[14 ]']" ),
239
245
" New Config value field is added - JS is success"
240
246
);
241
247
@@ -250,14 +256,15 @@ $Selenium->RunTest(
250
256
" New Config key and value fields are removed - JS is success"
251
257
);
252
258
259
+ $DB::single = 1;
253
260
# Edit test TransactionAction values.
254
261
my $TransitionActionKeyEdit = $TransitionActionKey . " edit" ;
255
262
my $TransitionActionValueEdit = $TransitionActionValue . " edit" ;
256
263
$Selenium -> find_element( " #Name" , ' css' )-> send_keys(" edit" );
257
- $Selenium -> find_element(" .//*[\@ id='ConfigKey[1 ]']" )-> clear();
258
- $Selenium -> find_element(" .//*[\@ id='ConfigKey[1 ]']" )-> send_keys($TransitionActionKeyEdit );
259
- $Selenium -> find_element(" .//*[\@ id='ConfigValue[1 ]']" )-> clear();
260
- $Selenium -> find_element(" .//*[\@ id='ConfigValue[1 ]']" )-> send_keys($TransitionActionValueEdit );
264
+ $Selenium -> find_element(" .//*[\@ id='ConfigKey[13 ]']" )-> clear();
265
+ $Selenium -> find_element(" .//*[\@ id='ConfigKey[13 ]']" )-> send_keys($TransitionActionKeyEdit );
266
+ $Selenium -> find_element(" .//*[\@ id='ConfigValue[13 ]']" )-> clear();
267
+ $Selenium -> find_element(" .//*[\@ id='ConfigValue[13 ]']" )-> send_keys($TransitionActionValueEdit );
261
268
$Selenium -> find_element( " #Submit" , ' css' )-> click();
262
269
263
270
# Return to main window after the popup closed, as the popup sends commands to the main window.
0 commit comments