TT#56376 selenium: improved formatting

just making code look cleaner

Change-Id: Ice2eaa1d14923a5552c3e41080b28958e37e5c9f
changes/01/29601/3
Nico Schedel 7 years ago
parent f3c8ed8d7f
commit ff6c0849f1

@ -14,6 +14,7 @@ sub login_ok {
my ($self, $login, $pwd) = @_;
$login = 'administrator' unless $login;
$pwd = 'administrator' unless $pwd;
diag("Loading login page (logout first)");
my $uri = $ENV{CATALYST_SERVER} || 'http://localhost:3000';
$self->driver->get("$uri/logout"); # make sure we are logged out

@ -25,7 +25,6 @@ my $resellername = ("reseller" . int(rand(100000)) . "test");
my $contractid = ("contract" . int(rand(100000)) . "test");
$c->login_ok();
$c->create_reseller_contract($contractid);
$c->create_reseller($resellername, $contractid);

@ -19,8 +19,9 @@ my $c = Selenium::Collection::Common->new(
driver => $d
);
my $billingname = ("billing" . int(rand(100000)) . "test");
$c->login_ok();
my $billingname = ("billing" . int(rand(100000)) . "test"); #create string for checking later
diag("Go to Billing page");
$d->find_element('//*[@id="main-nav"]//*[contains(text(),"Settings")]')->click();

@ -18,10 +18,9 @@ my $c = Selenium::Collection::Common->new(
driver => $d
);
diag('Logging in');
$c->login_ok();
my $domainstring = ("domain" . int(rand(100000)) . ".example.org");
my $domainstring = ("domain" . int(rand(100000)) . ".example.org"); #create string for checking later
$c->login_ok();
$c->create_domain($domainstring);
diag("Check if entry exists and if the search works");

@ -19,11 +19,11 @@ my $c = Selenium::Collection::Common->new(
driver => $d
);
$c->login_ok();
my $groupname = ("group" . int(rand(100000)) . "test"); #create strings for checking later
my $groupname = ("group" . int(rand(100000)) . "test");
my $servername = ("peering" . int(rand(100000)) . "server");
$c->login_ok();
diag("Go to Peerings page");
$d->find_element('//*[@id="main-nav"]//*[contains(text(),"Settings")]')->click();
$d->find_element("Peerings", 'link_text')->click();

@ -19,10 +19,10 @@ my $c = Selenium::Collection::Common->new(
driver => $d
);
$c->login_ok();
my $resellername = ("reseller" . int(rand(100000)) . "test");
my $contractid = ("contract" . int(rand(100000)) . "test");
$c->login_ok();
$c->create_reseller_contract($contractid);
$c->create_reseller($resellername, $contractid);

@ -19,16 +19,14 @@ my $c = Selenium::Collection::Common->new(
driver => $d
);
$c->login_ok();
my $resellername = ("reseller" . int(rand(100000)) . "test");
my $contractid = ("contract" . int(rand(100000)) . "test");
my $rulesetname = ("rule" . int(rand(100000)) . "test");
my $domainstring = ("domain" . int(rand(100000)) . ".example.org");
$c->login_ok();
$c->create_reseller_contract($contractid);
$c->create_reseller($resellername, $contractid);
$c->create_rw_ruleset($resellername, $rulesetname);
diag('Search for our new Rewrite Rule Set');

Loading…
Cancel
Save