TT#56376 selenium: remove unnecessary search queues

just going through all scripts to remove unnecessary search queues. should
make scripts a bit quicker. also contains some test fixes

Change-Id: I4ec861cff9de4c0266f62545ee470178ffeaa598
changes/27/33727/3
Nico Schedel 6 years ago
parent f546d7ced9
commit c8404cf0c1

@ -154,9 +154,6 @@ $d->find_element('//*[@id="save"]')->click();
is($d->get_text_safe('//*[@id="content"]//div[contains(@class, "alert")]'), 'Billing fee successfully changed!', "Correct Alert was shown");
diag('Check Billing Fee Details');
$d->fill_element('//*[@id="billing_fee_table_filter"]/label/input', 'xpath', 'thisshouldnotexist');
ok($d->find_element_by_css('#billing_fee_table tr > td.dataTables_empty'), 'Garbage text was not found');
$d->fill_element('//*[@id="billing_fee_table_filter"]/label/input', 'xpath', $zonedetailname);
ok($d->wait_for_text('//*[@id="billing_fee_table"]/tbody/tr/td[2]', '.*'), 'Source Pattern is correct');
ok($d->wait_for_text('//*[@id="billing_fee_table"]/tbody/tr/td[3]', '.+'), 'Destination Pattern is correct');
ok($d->wait_for_text('//*[@id="billing_fee_table"]/tbody/tr/td[4]', 'Regular expression - longest pattern'), 'Match Mode is correct');
@ -284,14 +281,12 @@ $d->fill_element('#end', 'css', "2019-01-01 23:59:59");
$d->find_element('#save', 'css')->click();
diag("Check if created date definition is correct");
$d->fill_element('//div[contains(@class, "dataTables_filter")]//input', 'xpath', 'thisshouldnotexist');
ok($d->find_element_by_css('#date_definition_table tr > td.dataTables_empty', 'css'), 'Garbage text was not found');
$d->fill_element('//div[contains(@class, "dataTables_filter")]//input', 'xpath', '2018-01-01 00:00:00');
is($d->get_text_safe('//*[@id="content"]//div[contains(@class, "alert")]'), 'Special offpeak entry successfully updated', "Correct Alert was shown");
ok($d->wait_for_text('//*[@id="date_definition_table"]/tbody/tr/td[2]', '2018-01-01 00:00:00'), 'Start Date definition is correct');
ok($d->wait_for_text('//*[@id="date_definition_table"]/tbody/tr/td[3]', '2019-01-01 23:59:59'), 'End Date definition is correct');
diag("Delete created date definition");
$d->scroll_to_element($d->find_element('//*[@id="date_definition_table_filter"]/label/input'));
$d->move_and_click('//*[@id="date_definition_table"]/tbody//tr//td//div//a[contains(text(),"Delete")]', 'xpath', '//div[contains(@class, "dataTables_filter")]//input');
ok($d->find_text("Are you sure?"), 'Delete dialog appears');
$d->find_element('#dataConfirmOK', 'css')->click();

@ -269,9 +269,6 @@ $d->find_element('//*[@id="save"]')->click();
diag("Check if information has changed");
is($d->get_text_safe('//*[@id="content"]//div[contains(@class, "alert")]'), 'Phonebook entry successfully updated', "Correct Alert was shown");
$d->find_element('//*[@id="customer_details"]//div//a[contains(text(),"Phonebook")]')->click();
$d->fill_element('//*[@id="phonebook_table_filter"]/label/input', 'xpath', 'thisshouldnotexist');
ok($d->find_element_by_css('#phonebook_table tr > td.dataTables_empty', 'css'), 'Garbage text was not found');
$d->fill_element('//*[@id="phonebook_table_filter"]/label/input', 'xpath', 'TesterTester');
ok($d->find_element_by_xpath('//*[@id="phonebook_table"]/tbody/tr[1]/td[contains(text(), "TesterTester")]'), "Name is correct");
ok($d->find_element_by_xpath('//*[@id="phonebook_table"]/tbody/tr[1]/td[contains(text(), "987654321")]'), "Number is correct");

@ -273,10 +273,6 @@ $d->fill_element('//*[@id="peering_servers_table_filter"]/label/input', 'xpath',
ok($d->find_element_by_css('#peering_servers_table tr > td.dataTables_empty', 'css'), 'Peering Server was deleted');
diag("Delete the Outbound Peering Rule");
$d->fill_element('#PeeringRules_table_filter input', 'css', 'thisshouldnotexist');
ok($d->find_element_by_css('#PeeringRules_table tr > td.dataTables_empty', 'css'), 'Garbage text was not found');
$d->fill_element('#PeeringRules_table_filter input', 'css', 'for very testing purposes');
ok($d->wait_for_text('//*[@id="PeeringRules_table"]/tbody/tr/td[5]', 'for very testing purposes'), "Outbound Peering Rule was found");
$d->move_and_click('//*[@id="PeeringRules_table"]/tbody/tr[1]//td//div//a[contains(text(), "Delete")]', 'xpath', '//*[@id="PeeringRules_table_filter"]//input');
ok($d->find_text("Are you sure?"), 'Delete dialog appears');
$d->find_element('#dataConfirmOK', 'css')->click();
@ -286,10 +282,7 @@ is($d->get_text_safe('//*[@id="content"]//div[contains(@class, "alert")]'), "Pee
ok($d->find_element_by_css('#PeeringRules_table tr > td.dataTables_empty', 'css'), 'Outbound peering rule was deleted');
diag("Delete the Inbound Peering Rule");
$d->fill_element('#InboundPeeringRules_table_filter input', 'css', 'thisshouldnotexist');
ok($d->find_element_by_css('#InboundPeeringRules_table tr > td.dataTables_empty', 'css'), 'Garbage text was not found');
$d->fill_element('#InboundPeeringRules_table_filter input', 'css', 'not found');
ok($d->wait_for_text('//*[@id="InboundPeeringRules_table"]/tbody/tr/td[6]', 'not found'), "Inbound Peering Rule was found");
$d->scroll_to_element($d->find_element('//*[@id="InboundPeeringRules_table_filter"]/label/input'));
$d->move_and_click('//*[@id="InboundPeeringRules_table"]/tbody/tr[1]//td//div//a[contains(text(), "Delete")]', 'xpath', '//*[@id="InboundPeeringRules_table_filter"]//input');
ok($d->find_text("Are you sure?"), 'Delete dialog appears');
$d->find_element('#dataConfirmOK', 'css')->click();
@ -301,7 +294,7 @@ ok($d->find_element_by_css('#InboundPeeringRules_table tr > td.dataTables_empty'
diag('Go back to "SIP Peering Groups".');
$d->get($peerings_uri);
diag('Trying to NOT delete Testinggroup');
diag('Trying to NOT delete Peering Group');
$d->fill_element('//*[@id="sip_peering_group_table_filter"]/label/input', 'xpath', 'thisshouldnotexist');
ok($d->find_element_by_css('#sip_peering_group_table tr > td.dataTables_empty', 'css'), 'Garbage text was not found');
$d->fill_element('//*[@id="sip_peering_group_table_filter"]/label/input', 'xpath', $groupname);
@ -310,16 +303,16 @@ $d->move_and_click('//*[@id="sip_peering_group_table"]/tbody/tr[1]//td//div//a[c
ok($d->find_text("Are you sure?"), 'Delete dialog appears');
$d->find_element('#dataConfirmCancel', 'css')->click();
diag('Checking if Testing Group has been deleted');
diag('Checking if Peering Group is still here');
$d->fill_element('//*[@id="sip_peering_group_table_filter"]/label/input', 'xpath', $groupname);
ok($d->wait_for_text('//*[@id="sip_peering_group_table"]/tbody/tr/td[3]', $groupname), 'Testinggroup is still here');
diag('Trying to delete Testinggroup');
diag('Trying to delete Peering Group');
$d->move_and_click('//*[@id="sip_peering_group_table"]/tbody/tr[1]//td//div//a[contains(text(), "Delete")]', 'xpath', '//*[@id="sip_peering_group_table_filter"]//input');
ok($d->find_text("Are you sure?"), 'Delete dialog appears');
$d->find_element('#dataConfirmOK', 'css')->click();
diag('Checking if Testing Group has been deleted');
diag('Checking if Peering Group has been deleted');
is($d->get_text_safe('//*[@id="content"]//div[contains(@class, "alert")]'), "Peering Group successfully deleted", "Correct Alert was shown");
$d->fill_element('//*[@id="sip_peering_group_table_filter"]/label/input', 'xpath', $groupname);
ok($d->find_element_by_css('#sip_peering_group_table tr > td.dataTables_empty', 'css'), 'Testing Group was deleted');

@ -128,15 +128,10 @@ $d->fill_element('//*[@id="name"]', 'xpath', 'newtestname');
$d->fill_element('//*[@id="number"]', 'xpath', '0987654321');
$d->find_element('//*[@id="save"]')->click();
diag("Searching Phonebook entry");
diag("Checking Phonebook entry details");
is($d->get_text_safe('//*[@id="content"]//div[contains(@class, "alert")]'), "Phonebook entry successfully updated", "Correct Alert was shown");
$d->scroll_to_element($d->find_element('//*[@id="reseller_details"]//div//div//a[contains(text(),"Phonebook")]'));
$d->find_element('//*[@id="reseller_details"]//div//div//a[contains(text(),"Phonebook")]')->click();
$d->fill_element('//*[@id="phonebook_table_filter"]/label/input', 'xpath', 'thisshouldnotexist');
ok($d->find_element_by_css('#phonebook_table tr > td.dataTables_empty', 'css'), 'Garbage text was not found');
$d->fill_element('//*[@id="phonebook_table_filter"]/label/input', 'xpath', 'newtestname');
diag("Checking Phonebook entry details");
ok($d->wait_for_text('//*[@id="phonebook_table"]/tbody/tr/td[2]', 'newtestname'), 'Name is correct');
ok($d->wait_for_text('//*[@id="phonebook_table"]/tbody/tr/td[3]', '0987654321'), 'Number is correct');
@ -189,7 +184,7 @@ $d->fill_element('//*[@id="body"]', 'xpath', 'No seriously, this is just for tes
$d->fill_element('//*[@id="attachment_name"]', 'xpath', '=)');
$d->find_element('//*[@id="save"]')->click();
diag('Searching new Template');
diag('Searching Template');
is($d->get_text_safe('//*[@id="content"]//div[contains(@class, "alert")]'), "Email template successfully updated", "Correct Alert was shown");
$d->fill_element('//*[@id="email_template_table_filter"]/label/input', 'xpath', 'thisshouldnotexist');
ok($d->find_element_by_css('#email_template_table tr > td.dataTables_empty', 'css'), 'Garbage text was not found');

@ -118,13 +118,8 @@ $d->fill_element('//*[@id="enddate_datetimepicker"]', 'xpath', '2020-07-01');
$d->fill_element('//*[@id="endtime_datetimepicker"]', 'xpath', '13:00:00');
$d->find_element('//*[@id="save"]')->click();
diag("Search for Event");
is($d->get_text_safe('//*[@id="content"]//div[contains(@class, "alert")]'), "Event entry successfully created", "Correct Alert was shown");
$d->fill_element('//*[@id="event_table_filter"]/label/input', 'xpath', 'thisshouldnotexist');
ok($d->find_element_by_css('#event_table tr > td.dataTables_empty', 'css'), 'Garbage text was not found');
$d->fill_element('//*[@id="event_table_filter"]/label/input', 'xpath', 'Very important event');
diag("Check Details");
is($d->get_text_safe('//*[@id="content"]//div[contains(@class, "alert")]'), "Event entry successfully created", "Correct Alert was shown");
ok($d->wait_for_text('//*[@id="event_table"]/tbody/tr[1]/td[2]', 'Very important event'), "Description is correct");
ok($d->wait_for_text('//*[@id="event_table"]/tbody/tr[1]/td[3]', 'every week on Monday from 2020-06-01 12:00:00 to 2020-07-01 13:00:00'), "Date/Time is correct");

Loading…
Cancel
Save