TT#56376 selenium: add more diagnostic text to test calls

controller_domain.t:
- All ok() calls should now have correct text to print.
- Minor formatting changes.

Change-Id: I0f74039ef32b488f19b29be726102150338bb775
changes/76/29076/1
Nico Schedel 7 years ago
parent 9bc296b507
commit 46f018560e

@ -41,7 +41,7 @@ diag("Open Preferences of first Domain");
my ($row, $edit_link);
$row = $d->find_element('//table[@id="Domain_table"]/tbody/tr[1]');
$edit_link = $d->find_element('(//table[@id="Domain_table"]/tbody/tr[1]/td//a)[contains(text(),"Preferences")]');
ok($edit_link);
ok($edit_link, 'Edit Link is here');
$d->move_action(element => $row);
$edit_link->click();
@ -52,30 +52,33 @@ $d->find_element("Access Restrictions", 'link_text')->click();
diag("Click edit for the preference concurrent_max");
sleep 1;
$row = $d->find_element('//table/tbody/tr/td[normalize-space(text()) = "concurrent_max"]');
ok($row);
ok($row, 'concurrent_max found');
$edit_link = $d->find_child_element($row, '(./../td//a)[2]');
ok($edit_link);
ok($edit_link, 'Found edit button');
$d->move_action(element => $row);
$edit_link->click();
diag("Try to change this to a value which is not a number");
my $formfield = $d->find_element('#concurrent_max', 'css');
ok($formfield);
ok($formfield, 'Input field found');
$formfield->clear();
$formfield->send_keys('thisisnonumber');
$d->find_element("#save", 'css')->click();
diag('Type 789 and click Save');
ok($d->find_text('Value must be an integer'), "Wrong value detected");
ok($d->find_text('Value must be an integer'), 'Wrong value detected');
$formfield = $d->find_element('#concurrent_max', 'css');
ok($formfield);
ok($formfield, 'Input field found');
$formfield->clear();
diag('Saving integer value into "concurrent_max"');
$formfield->send_keys('789');
$d->find_element('#save', 'css')->click();
diag('Check if Domain still exists');
diag('Deleting Domain');
$c->delete_domain($domainstring);
diag('Check if Domain still exists');
$d->fill_element('//*[@id="Domain_table_filter"]/label/input', 'xpath', $domainstring);
ok($d->find_element_by_css('#Domain_table tr > td.dataTables_empty', 'css'), 'Domain was deleted');

Loading…
Cancel
Save