From be62293e4a0a8282d23bd212633f722ea52e37b5 Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Wed, 2 Oct 2019 10:39:30 +0200 Subject: [PATCH] TT#56376 selenium: test configure buttons on the dashboard ctr_billing, peering and reseller will access their pages by clicking on the buttons on the dashboard to confirm those are working Change-Id: Iad9314d675d42f10b874b3d9351ff9c37d93d7f4 --- t/selenium/controller_billing.t | 8 +++++++- t/selenium/controller_peering.t | 3 +-- t/selenium/controller_reseller.t | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/t/selenium/controller_billing.t b/t/selenium/controller_billing.t index a50d63b2ea..6740bcf4d9 100644 --- a/t/selenium/controller_billing.t +++ b/t/selenium/controller_billing.t @@ -24,7 +24,10 @@ my $run_ok = 0; $c->login_ok(); $c->create_reseller_contract($contractid); $c->create_reseller($resellername, $contractid); -$c->create_billing_profile($billingname, $resellername); + +diag('Go to Billing Profile Page'); +$d->find_element('//*[@class="brand"]')->click(); +$d->find_element('//*[@id="content"]//div[contains(text(), "Billing")]/../../div/a')->click(); diag('Trying to create a empty billing profile'); $d->find_element('Create Billing Profile', 'link_text')->click(); @@ -34,7 +37,10 @@ diag('Check if Errors show up'); ok($d->find_element_by_xpath('//form//div//span[contains(text(), "Reseller field is required")]')); ok($d->find_element_by_xpath('//form//div//span[contains(text(), "Handle field is required")]')); ok($d->find_element_by_xpath('//form//div//span[contains(text(), "Name field is required")]')); + +diag('Create a legit Billing Profile'); $d->find_element('//*[@id="mod_close"]')->click(); +$c->create_billing_profile($billingname, $resellername); diag('Search for Billing profile'); $d->fill_element('//*[@id="billing_profile_table_filter"]//input', 'xpath', 'thisshouldnotexist'); diff --git a/t/selenium/controller_peering.t b/t/selenium/controller_peering.t index 761ca6f855..324dd40b49 100644 --- a/t/selenium/controller_peering.t +++ b/t/selenium/controller_peering.t @@ -20,8 +20,7 @@ my $run_ok = 0; $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(); +$d->find_element('//*[@id="content"]//div[contains(text(), "Peerings")]/../../div/a')->click(); diag("Create a empty Peering Group"); $d->find_element('//*[@id="masthead"]//h2[contains(text(),"SIP Peering Groups")]'); diff --git a/t/selenium/controller_reseller.t b/t/selenium/controller_reseller.t index 0bef0d816e..80a23f0916 100644 --- a/t/selenium/controller_reseller.t +++ b/t/selenium/controller_reseller.t @@ -22,8 +22,8 @@ $c->login_ok(); $c->create_reseller_contract($contractid); diag('Go to reseller page'); -$d->find_element('//*[@id="main-nav"]//*[contains(text(),"Settings")]')->click(); -$d->find_element('Resellers', 'link_text')->click(); +$d->find_element('//*[@class="brand"]')->click(); +$d->find_element('//*[@id="content"]//div[contains(text(), "Resellers")]/../../div/a')->click(); diag('Try to create a empty reseller'); $d->find_element('Create Reseller', 'link_text')->click();