MT#3435 quickfixes for tests

* mysql user sipwise@localhost
* selenium wait timeout 10 seconds
* dont use title (because it does not wait for the page to be loaded)
agranig/rest
Gerhard Jungwirth 12 years ago committed by Andreas Granig
parent 9353d44d32
commit 39698f4ce7

@ -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") {

@ -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")]');

@ -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");

@ -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');

@ -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");

Loading…
Cancel
Save