From 71803048a49aece25825b2c00df0cf9bb5f98413 Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Thu, 2 May 2019 10:33:16 +0200 Subject: [PATCH] TT#56376 selenium: generate more unique names for domains, customers, etc. Changed how names get generated, because it happens that we generate something like test9123 and later we create test9 that these two names will conflict each other when it comes to searching. Change-Id: I5109e69c9f5b1bd8bcf49be49af535f93a8edbf2 --- t/selenium/controller_billing.t | 2 +- t/selenium/controller_customer.t | 2 +- t/selenium/controller_domain.t | 2 +- t/selenium/controller_peering.t | 2 +- t/selenium/controller_reseller.t | 4 ++-- t/selenium/controller_rw_ruleset.t | 8 ++++---- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/t/selenium/controller_billing.t b/t/selenium/controller_billing.t index f8aecfb07b..889b1a5032 100644 --- a/t/selenium/controller_billing.t +++ b/t/selenium/controller_billing.t @@ -20,7 +20,7 @@ my $c = Selenium::Collection::Common->new( ); $c->login_ok(); -my $billingname = ("testprofile" . int(rand(10000))); #create string for checking later +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_customer.t b/t/selenium/controller_customer.t index cd847dd6f6..a01414ea3e 100644 --- a/t/selenium/controller_customer.t +++ b/t/selenium/controller_customer.t @@ -30,7 +30,7 @@ if(!$pbx){ $c->login_ok(); -my $domainstring = ("test" . int(rand(10000)) . ".example.org"); #create string for checking later +my $domainstring = ("domain" . int(rand(100000)) . ".example.org"); #create string for checking later $c->create_domain($domainstring); my @chars = ("A".."Z", "a".."z"); diff --git a/t/selenium/controller_domain.t b/t/selenium/controller_domain.t index e79c12d681..4f20171247 100644 --- a/t/selenium/controller_domain.t +++ b/t/selenium/controller_domain.t @@ -21,7 +21,7 @@ my $c = Selenium::Collection::Common->new( diag('Logging in'); $c->login_ok(); -my $domainstring = ("test" . int(rand(10000)) . ".example.org"); #create string for checking later +my $domainstring = ("domain" . int(rand(100000)) . ".example.org"); #create string for checking later $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 96840313a2..5f1bf98f8b 100644 --- a/t/selenium/controller_peering.t +++ b/t/selenium/controller_peering.t @@ -21,7 +21,7 @@ my $c = Selenium::Collection::Common->new( $c->login_ok(); -my $groupname = ("testinggroup" . int(rand(10000))); #create string for checking later +my $groupname = ("group" . int(rand(100000)) . "test"); #create string for checking later diag("Go to Peerings page"); $d->find_element('//*[@id="main-nav"]//*[contains(text(),"Settings")]')->click(); diff --git a/t/selenium/controller_reseller.t b/t/selenium/controller_reseller.t index 06eb8a39df..838f47769a 100644 --- a/t/selenium/controller_reseller.t +++ b/t/selenium/controller_reseller.t @@ -21,8 +21,8 @@ my $c = Selenium::Collection::Common->new( $c->login_ok(); -my $resellername = ("test" . int(rand(10000))); -my $contractid = ("test" . int(rand(10000))); +my $resellername = ("reseller" . int(rand(100000)) . "test"); +my $contractid = ("contract" . int(rand(100000)) . "test"); $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 c12a793a6c..c99182e54e 100644 --- a/t/selenium/controller_rw_ruleset.t +++ b/t/selenium/controller_rw_ruleset.t @@ -21,10 +21,10 @@ my $c = Selenium::Collection::Common->new( $c->login_ok(); -my $resellername = ("test" . int(rand(10000))); -my $contractid = ("test" . int(rand(10000))); -my $rulesetname = ("rule" . int(rand(10000))); -my $domainstring = ("test" . int(rand(10000)) . ".example.org"); +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->create_reseller_contract($contractid); $c->create_reseller($resellername, $contractid);