From d783bb65eccef8c44ca13a6e983733e240032093 Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Wed, 17 Jul 2019 09:52:02 +0200 Subject: [PATCH] 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 --- t/lib/Selenium/Collection/Common.pm | 2 +- t/selenium/controller_customer.t | 3 ++- t/selenium/controller_emergency.t | 4 ---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/t/lib/Selenium/Collection/Common.pm b/t/lib/Selenium/Collection/Common.pm index 5e90c4f7f0..9f11fa2f80 100644 --- a/t/lib/Selenium/Collection/Common.pm +++ b/t/lib/Selenium/Collection/Common.pm @@ -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"); } diff --git a/t/selenium/controller_customer.t b/t/selenium/controller_customer.t index b110b45010..275783e813 100644 --- a/t/selenium/controller_customer.t +++ b/t/selenium/controller_customer.t @@ -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"); diff --git a/t/selenium/controller_emergency.t b/t/selenium/controller_emergency.t index 38c60ddcff..0d52639795 100644 --- a/t/selenium/controller_emergency.t +++ b/t/selenium/controller_emergency.t @@ -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();