From 0e8b1f6950a8eac1a0fe48311e7b351c969abb39 Mon Sep 17 00:00:00 2001 From: Gerhard Jungwirth Date: Thu, 5 Dec 2013 18:05:53 +0100 Subject: [PATCH] MT#4871 selenium-tests: unskip tests, timer information they magically work now and add timer informating as discussed with alutay --- Build.PL | 1 + t/controller_billing_selenium.t | 13 ++++------- t/controller_customer_selenium.t | 2 +- t/controller_peering_selenium.t | 40 ++++++++++++++------------------ 4 files changed, 25 insertions(+), 31 deletions(-) diff --git a/Build.PL b/Build.PL index a92de0cffb..d3801b39e6 100644 --- a/Build.PL +++ b/Build.PL @@ -6,6 +6,7 @@ my $builder = Local::Module::Build->new( license => 'restrictive', dist_version_from => 'lib/NGCP/Panel.pm', tap_harness_args => { + timer => 1, formatter_class => 'TAP::Formatter::JUnit', merge => 1, }, diff --git a/t/controller_billing_selenium.t b/t/controller_billing_selenium.t index c436623dd8..d94696f73e 100644 --- a/t/controller_billing_selenium.t +++ b/t/controller_billing_selenium.t @@ -84,10 +84,8 @@ $d->move_to(element => $row); $d->findclick_ok(xpath => '//div[contains(@class,"dataTables_wrapper")]//td[contains(text(),"testingdetail")]/..//a[contains(@class,"btn-secondary") and contains(text(),"Delete")]'); $d->findtext_ok("Are you sure?"); $d->findclick_ok(id => 'dataConfirmOK'); -TODO: { - todo_skip "jenkins selenium problem, double loading of previous page", 1; - $d->findtext_ok("successfully deleted"); -} +diag('skip was here'); +$d->findtext_ok("successfully deleted"); diag("Click Edit Zones"); $d->findclick_ok(link_text => "Edit Zones"); @@ -130,10 +128,9 @@ $d->fill_element_ok([name => 'start', "03:14:15"]); $d->fill_element_ok([name => 'end', "13:37:00"]); $d->findclick_ok(name => 'add'); $d->findclick_ok(xpath => '//div[contains(@class,"modal")]//i[@class="icon-trash"]/..'); -TODO: { - todo_skip "jenkins selenium problem, double loading of previous page", 1; - $d->findclick_ok(id => 'mod_close'); -} + +diag('skip was here'); +$d->findclick_ok(id => 'mod_close'); diag("Create a Date Definition"); $d->findclick_ok(link_text => 'Create Special Off-Peak Date'); diff --git a/t/controller_customer_selenium.t b/t/controller_customer_selenium.t index 84b7ee07f1..0aa3612d6b 100644 --- a/t/controller_customer_selenium.t +++ b/t/controller_customer_selenium.t @@ -61,7 +61,7 @@ $d->find_ok(xpath => '//div[contains(@class,"accordion-body")]//table//td[contai diag("Edit Fraud Limits"); $d->findclick_ok(xpath => '//div[contains(@class,"accordion-heading")]//a[contains(text(),"Fraud Limits")]'); -sleep 2 if ($d->browser_name_in("phantomjs", "chrome")); # time to move +sleep 2 if ($d->browser_name_in("phantomjs", "chrome", "firefox")); # time to move $row = $d->find(xpath => '//div[contains(@class,"accordion-body")]//table//tr/td[contains(text(),"Monthly Settings")]'); ok($row); $edit_link = $d->find_child_element($row, './../td//a[text()[contains(.,"Edit")]]'); diff --git a/t/controller_peering_selenium.t b/t/controller_peering_selenium.t index 109ba7c33b..dce91cf012 100644 --- a/t/controller_peering_selenium.t +++ b/t/controller_peering_selenium.t @@ -98,20 +98,18 @@ diag("Go back to Servers/Rules"); $d->navigate_ok($server_rules_uri); my $delete_link; -TODO: { - todo_skip "Deleting fails with our jenkins selenium installation", 1; - diag("Delete mytestserver"); - sleep 1; #make sure, we are on the right page - $row = $d->find(xpath => '(//table/tbody/tr/td[contains(text(), "mytestserver")]/..)[1]'); - ok($row); - $delete_link = $d->find_child_element($row, '(./td//a)[contains(text(),"Delete")]'); - ok($delete_link); - $d->move_to(element => $row); - $delete_link->click; - $d->findtext_ok("Are you sure?"); - $d->findclick_ok(id => 'dataConfirmOK'); - $d->findtext_ok("successfully deleted"); # delete does not work -} +diag('skip was here'); +diag("Delete mytestserver"); +sleep 1; #make sure, we are on the right page +$row = $d->find(xpath => '(//table/tbody/tr/td[contains(text(), "mytestserver")]/..)[1]'); +ok($row); +$delete_link = $d->find_child_element($row, '(./td//a)[contains(text(),"Delete")]'); +ok($delete_link); +$d->move_to(element => $row); +$delete_link->click; +$d->findtext_ok("Are you sure?"); +$d->findclick_ok(id => 'dataConfirmOK'); +$d->findtext_ok("successfully deleted"); # delete does not work diag("Delete the previously created Peering Rule"); sleep 1; @@ -123,10 +121,9 @@ $d->move_to(element => $row); $delete_link->click; $d->findtext_ok("Are you sure?"); $d->findclick_ok(id => 'dataConfirmOK'); -TODO: { - todo_skip "Delete Rule seems to be executed twice, which gives the wrong message here (using jenkins selenium)", 1; - $d->findtext_ok("successfully deleted"); -} + +diag('skip was here'); +$d->findtext_ok("successfully deleted"); diag('Go back to "SIP Peering Groups".'); $d->navigate_ok($peerings_uri); @@ -140,10 +137,9 @@ $d->move_to(element => $row); $delete_link->click; $d->findtext_ok("Are you sure?"); $d->findclick_ok(id => 'dataConfirmOK'); -TODO: { - todo_skip "Same as above, jenkins selenium results in wrong message", 1; - $d->findtext_ok("successfully deleted"); -} + +diag('skip was here'); +$d->findtext_ok("successfully deleted"); done_testing; # vim: filetype=perl