diff --git a/t/lib/Selenium/Collection/Common.pm b/t/lib/Selenium/Collection/Common.pm index 175270f2c8..7d598a2531 100644 --- a/t/lib/Selenium/Collection/Common.pm +++ b/t/lib/Selenium/Collection/Common.pm @@ -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 diff --git a/t/selenium/controller_admin.t b/t/selenium/controller_admin.t index 74919bc715..ed0a8af515 100644 --- a/t/selenium/controller_admin.t +++ b/t/selenium/controller_admin.t @@ -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); diff --git a/t/selenium/controller_billing.t b/t/selenium/controller_billing.t index 889b1a5032..975b319772 100644 --- a/t/selenium/controller_billing.t +++ b/t/selenium/controller_billing.t @@ -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(); diff --git a/t/selenium/controller_domain.t b/t/selenium/controller_domain.t index afebb2e9be..611db775aa 100644 --- a/t/selenium/controller_domain.t +++ b/t/selenium/controller_domain.t @@ -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"); diff --git a/t/selenium/controller_peering.t b/t/selenium/controller_peering.t index 45a81df9da..bf3a034a4d 100644 --- a/t/selenium/controller_peering.t +++ b/t/selenium/controller_peering.t @@ -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(); diff --git a/t/selenium/controller_reseller.t b/t/selenium/controller_reseller.t index 838f47769a..ff80492d8f 100644 --- a/t/selenium/controller_reseller.t +++ b/t/selenium/controller_reseller.t @@ -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); diff --git a/t/selenium/controller_rw_ruleset.t b/t/selenium/controller_rw_ruleset.t index c99182e54e..5fc253aa24 100644 --- a/t/selenium/controller_rw_ruleset.t +++ b/t/selenium/controller_rw_ruleset.t @@ -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');