diff --git a/inc/Local/Module/Build.pm b/inc/Local/Module/Build.pm index 0f39e0e7d0..eba4cf01ed 100644 --- a/inc/Local/Module/Build.pm +++ b/inc/Local/Module/Build.pm @@ -71,6 +71,7 @@ sub _test_preconditions { $ENV{NGCP_PANEL_CUSTOM_DSN} = $mysqld->dsn(); my $dump_files = join(' ', @{ $opt{'mysql-dump'} }); system("cat $dump_files | mysql -uroot --host=127.0.0.1 --port=$opt{'mysqld-port'}"); + system(qq/echo "GRANT ALL PRIVILEGES ON *.* TO 'sipwise'\@'localhost' WITH GRANT OPTION;" | mysql -uroot --host=127.0.0.1 --port=$opt{'mysqld-port'}/); } unless ($opt{webdriver} eq "external") { diff --git a/t/controller_billing_selenium.t b/t/controller_billing_selenium.t index a5f9c43b3e..c436623dd8 100644 --- a/t/controller_billing_selenium.t +++ b/t/controller_billing_selenium.t @@ -10,7 +10,7 @@ $d->set_window_size(800,1280) if ($browsername ne "htmlunit"); my $uri = $ENV{CATALYST_SERVER} || 'http://localhost:3000'; $d->get_ok("$uri/logout"); #make sure we are logged out $d->get_ok("$uri/login"); -$d->set_implicit_wait_timeout(2500); +$d->set_implicit_wait_timeout(10000); diag("Do Admin Login"); $d->find(link_text => 'Admin')->click; @@ -19,7 +19,7 @@ $d->find(name => 'username')->send_keys('administrator'); $d->find(name => 'password')->send_keys('administrator'); $d->findclick_ok(name => 'submit'); -$d->title_is('Dashboard'); +$d->find_ok(xpath => '//*[@id="masthead"]//h2[contains(text(),"Dashboard")]'); diag("Go to Billing page"); $d->findclick_ok(xpath => '//*[@id="main-nav"]//*[contains(text(),"Settings")]'); @@ -27,7 +27,7 @@ $d->find_ok(xpath => '//a[contains(@href,"/domain")]'); $d->findclick_ok(link_text => "Billing"); diag("Create a billing profile"); -$d->title_is("Billing Profiles"); +$d->find_ok(xpath => '//*[@id="masthead"]//h2[contains(text(),"Billing Profiles")]'); $d->findclick_ok(link_text => 'Create Billing Profile'); $d->find(id => 'name')->send_keys('mytestprofile'); $d->fill_element_ok(['name', 'handle', 'mytestprofile']); @@ -60,7 +60,7 @@ $edit_link = $d->find_child_element($row, '(./td//a)[contains(text(),"Fees")]'); ok($edit_link); $d->move_to(element => $row); $edit_link->click; -$d->title_like(qr/Billing Fees/); +$d->find_ok(xpath => '//*[@id="masthead"]//h2[contains(text(),"Billing Fees")]'); diag("Create a billing fee"); $d->findclick_ok(link_text => 'Create Fee Entry'); @@ -91,7 +91,7 @@ TODO: { diag("Click Edit Zones"); $d->findclick_ok(link_text => "Edit Zones"); -$d->title_like(qr/Billing Zones/); +$d->find_ok(xpath => '//*[@id="masthead"]//h2[contains(text(),"Billing Zones")]'); diag("Delete testingzone"); $d->fill_element_ok([xpath => '//div[contains(@class, "dataTables_filter")]//input', 'testingdetail']); @@ -114,7 +114,7 @@ $edit_link = $d->find_child_element($row, '(./td//a)[contains(text(),"Peaktimes" ok($edit_link); $d->move_to(element => $row); $edit_link->click; -$d->title_like(qr/times for mytestprofile/); +$d->find_ok(xpath => '//*[@id="masthead"]//h2[contains(text(),"times for mytestprofile")]'); diag("Edit Wednesday"); $row = $d->find(xpath => '//table//td[contains(text(),"Wednesday")]'); diff --git a/t/controller_domain_selenium.t b/t/controller_domain_selenium.t index afdec0d96e..4aeae51df9 100644 --- a/t/controller_domain_selenium.t +++ b/t/controller_domain_selenium.t @@ -10,7 +10,7 @@ $d->set_window_size(800,1280) if ($browsername ne "htmlunit"); my $uri = $ENV{CATALYST_SERVER} || 'http://localhost:3000'; $d->get_ok("$uri/logout"); #make sure we are logged out $d->get_ok("$uri/login"); -$d->set_implicit_wait_timeout(1000); +$d->set_implicit_wait_timeout(10000); diag("Do Admin Login"); $d->find(link_text => 'Admin')->click; @@ -19,14 +19,14 @@ $d->find(name => 'username')->send_keys('administrator'); $d->find(name => 'password')->send_keys('administrator'); $d->findclick_ok(name => 'submit'); -$d->title_is('Dashboard'); +$d->find_ok(xpath => '//*[@id="masthead"]//h2[contains(text(),"Dashboard")]'); diag("Go to Domains page"); $d->findclick_ok(xpath => '//*[@id="main-nav"]//*[contains(text(),"Settings")]'); $d->find_ok(xpath => '//a[contains(@href,"/domain")]'); $d->findclick_ok(link_text => "Domains"); -$d->title_is("Domains"); +$d->find_ok(xpath => '//*[@id="masthead"]//h2[contains(text(),"Domains")]'); SKIP: { sleep 1; diag("Open Preferences of first Domain"); diff --git a/t/controller_peering_selenium.t b/t/controller_peering_selenium.t index 0fdb1914c4..109ba7c33b 100644 --- a/t/controller_peering_selenium.t +++ b/t/controller_peering_selenium.t @@ -10,7 +10,7 @@ $d->set_window_size(800,1280) if ($browsername ne "htmlunit"); my $uri = $ENV{CATALYST_SERVER} || 'http://localhost:3000'; $d->get_ok("$uri/logout"); #make sure we are logged out $d->get_ok("$uri/login"); -$d->set_implicit_wait_timeout(1000); +$d->set_implicit_wait_timeout(10000); diag("Do Admin Login"); $d->find(link_text => 'Admin')->click; @@ -19,14 +19,14 @@ $d->find(name => 'username')->send_keys('administrator'); $d->find(name => 'password')->send_keys('administrator'); $d->findclick_ok(name => 'submit'); -$d->title_is('Dashboard'); +$d->find_ok(xpath => '//*[@id="masthead"]//h2[contains(text(),"Dashboard")]'); diag("Go to Peerings page"); $d->findclick_ok(xpath => '//*[@id="main-nav"]//*[contains(text(),"Settings")]'); $d->findclick_ok(link_text => "Peerings"); diag("Create a Peering Group"); -$d->title_is("SIP Peering Groups"); +$d->find_ok(xpath => '//*[@id="masthead"]//h2[contains(text(),"SIP Peering Groups")]'); my $peerings_uri = $d->get_location; $d->findclick_ok(link_text => 'Create Peering Group'); diff --git a/t/controller_reseller_selenium.t b/t/controller_reseller_selenium.t index 942e6aeb63..8bdfb6cefe 100644 --- a/t/controller_reseller_selenium.t +++ b/t/controller_reseller_selenium.t @@ -11,7 +11,7 @@ $d->set_window_size(800,1280) if ($browsername ne "htmlunit"); my $uri = $ENV{CATALYST_SERVER} || 'http://localhost:3000'; $d->get_ok("$uri/logout"); #make sure we are logged out $d->get_ok("$uri/login"); -$d->set_implicit_wait_timeout(1000); +$d->set_implicit_wait_timeout(10000); diag("Do Admin Login"); $d->find(link_text => 'Admin')->click; @@ -21,7 +21,7 @@ $d->find(name => 'password')->send_keys('administrator'); $d->findclick_ok(name => 'submit'); diag("Go to reseller list"); -$d->title_is('Dashboard'); +$d->find_ok(xpath => '//*[@id="masthead"]//h2[contains(text(),"Dashboard")]'); $d->findclick_ok(xpath => '//a[@class="btn" and contains(@href,"/reseller")]'); diag("Search nonexisting reseller");