TT#56376 selenium: delete billing profile after test execution

controller_billing.t:
- Billing profile now gets deleted at the end.
- Check if billing profile is deleted.

Change-Id: Ia4dcbb8498f4482fe9b76568308314ceecb95d99
changes/06/29306/1
Nico Schedel 7 years ago
parent df4c47dadb
commit 4aa76b9560

@ -156,4 +156,20 @@ $d->find_element('//*[@id="date_definition_table"]/tbody//tr//td//div//a[contain
ok($d->find_text("Are you sure?"), 'Delete dialog appears');
$d->find_element('#dataConfirmOK', 'css')->click();
diag("Terminate our Billing Profile");
$d->find_element('//*[@id="main-nav"]//*[contains(text(),"Settings")]')->click();
$d->find_element("Billing", 'link_text')->click();
$d->fill_element('#billing_profile_table_filter label input', 'css', 'thisshouldnotexist');
ok($d->find_element_by_css('#billing_profile_table tr > td.dataTables_empty', 'css'), 'Garbage text was not found');
$d->fill_element('#billing_profile_table_filter label input', 'css', $billingname);
ok($d->wait_for_text('//*[@id="billing_profile_table"]/tbody/tr/td[2]', $billingname), 'Billing profile was found');
$d->move_action(element => $d->find_element('//*[@id="billing_profile_table"]/tbody/tr[1]//td//div//a[contains(text(), "Terminate")]'));
$d->find_element('//*[@id="billing_profile_table"]/tbody/tr[1]//td//div//a[contains(text(), "Terminate")]')->click();
ok($d->find_text("Are you sure?"), 'Delete dialog appears');
$d->find_element('#dataConfirmOK', 'css')->click();
diag("Check if Billing Profile has been removed");
$d->fill_element('#billing_profile_table_filter label input', 'css', $billingname);
ok($d->find_element_by_css('#billing_profile_table tr > td.dataTables_empty', 'css'), 'Billing Profile has been removed');
done_testing;
Loading…
Cancel
Save