TT#56376 selenium: minor cleanups

Common.pm:
- corrected one is() message

controller_customer.t:
- corrected some weird formatting

controller_emergency.t:
- removed unnecessary search query

Change-Id: Ia849c1cec5421dd860c11cd08ef6af2c7fc6b425
changes/93/31793/3
Nico Schedel 6 years ago
parent b110ac2ecc
commit d783bb65ec

@ -118,7 +118,7 @@ sub create_reseller_contract {
$self->driver->select_if_unselected('//*[@id="billing_profileidtable"]/tbody/tr[1]/td[4]/input');
$self->driver->fill_element('//*[@id="external_id"]', 'xpath', $resellerid);
$self->driver->find_element('//*[@id="save"]')->click();
ok($self->driver->find_element_by_xpath('//*[@id="content"]//div[contains(text(), "successfully created")]'), "Label 'Contract successfully created' was shown");
ok($self->driver->find_element_by_xpath('//*[@id="content"]//div[contains(text(), "successfully created")]'), "Correct Alert was shown");
}

@ -103,7 +103,8 @@ ok($d->find_element_by_xpath('//*[@id="Customer_table"]/tbody/tr[1]/td[contains(
ok($d->find_element_by_xpath('//*[@id="Customer_table"]/tbody/tr[1]/td[contains(text(), "' . $resellername . '")]'), 'Reseller is correct');
ok($d->wait_for_text('//*[@id="Customer_table"]/tbody/tr[1]/td[4]', $contactmail), 'Contact Email is correct');
ok($d->find_element_by_xpath('//*[@id="Customer_table"]/tbody/tr[1]/td[contains(text(), "' . $billingname . '")]'), 'Billing Profile is correct');
ok($d->find_element_by_xpath('//*[@id="Customer_table"]/tbody/tr[1]/td[contains(text(), "active")]'), 'Status is correct');$compstring = "Customer #" . $custnum . " successfully updated";
ok($d->find_element_by_xpath('//*[@id="Customer_table"]/tbody/tr[1]/td[contains(text(), "active")]'), 'Status is correct');
$compstring = "Customer #" . $custnum . " successfully updated";
is($d->get_text('//*[@id="content"]//div[contains(@class, "alert")]'), $compstring, "Correct Alert was shown");
diag("Open Details for our just created Customer");

@ -206,10 +206,6 @@ $d->fill_element('//*[@id="emergency_containers_table_filter"]/label/input', 'xp
ok($d->find_element_by_xpath('//*[@id="emergency_containers_table"]/tbody/tr[1]/td[contains(text(), ' . $containername . ')]'), 'Container is still here');
diag("Trying to delete Emergency Container");
$d->fill_element('//*[@id="emergency_containers_table_filter"]/label/input', 'xpath', 'thisshouldnotexist');
ok($d->find_element_by_css('#emergency_containers_table tr > td.dataTables_empty', 'css'), 'Garbage text was not found');
$d->fill_element('//*[@id="emergency_containers_table_filter"]/label/input', 'xpath', $containername);
ok($d->wait_for_text('//*[@id="emergency_containers_table"]/tbody/tr[1]/td[3]', $containername), 'Emergency mapping was found');
$d->move_and_click('//*[@id="emergency_containers_table"]/tbody/tr/td[4]/div/a[contains(text(), "Delete")]', 'xpath', '//*[@id="emergency_containers_table_filter"]/label/input');
$d->find_element('//*[@id="dataConfirmOK"]')->click();

Loading…
Cancel
Save