From 3acb571b2a3c316f7a4dcd72d059580b0b1ba99f Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Mon, 13 May 2019 09:19:59 +0200 Subject: [PATCH] TT#56376 selenium: backport better fraud limit checks Backport better fraud limit checks to prevent crash on checking fraud limit details. Change-Id: Ide5c8e7383ab45ff2c84354a5386d08742fe7698 --- t/selenium/controller_customer.t | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/t/selenium/controller_customer.t b/t/selenium/controller_customer.t index 1a53c76578..a283dfdfd9 100644 --- a/t/selenium/controller_customer.t +++ b/t/selenium/controller_customer.t @@ -122,15 +122,16 @@ $d->find_element('//*[@id="subscribers_table_filter"]/label/input')->send_keys($ ok($d->wait_for_text('//*[@id="subscribers_table"]/tbody/tr/td[2]', $username), 'Subscriber was found'); diag("Edit Fraud Limits"); -$d->find_element('//div[contains(@class,"accordion-heading")]//a[contains(text(),"Fraud Limits")]')->click(); -$d->scroll_to_element($d->find_element('//div[contains(@class,"accordion-heading")]//a[contains(text(),"Fraud Limits")]')); +$d->find_element('//*[@id="customer_details"]//div//a[contains(text(),"Fraud Limits")]')->click(); +$d->scroll_to_element($d->find_element('//*[@id="customer_details"]//div//a[contains(text(),"Fraud Limits")]')); $d->move_and_click('//*[@id="collapse_fraud"]//table//tr//td[text()[contains(.,"Monthly Settings")]]/../td//a[text()[contains(.,"Edit")]]', 'xpath'); - -diag("Do Edit Fraud Limits"); $d->fill_element('#fraud_interval_limit', 'css', "100"); $d->fill_element('#fraud_interval_notify', 'css', 'mymail@example.org'); $d->find_element('#save', 'css')->click(); -$d->find_element('//div[contains(@class,"accordion-body")]//table//td[contains(text(),"mymail@example.org")]'); + +diag("Check Fraud Limit details"); +ok($d->find_element_by_xpath('//*[@id="collapse_fraud"]//table//tr//td[contains(text(), "Monthly Settings")]/../td[contains(text(), "100")]'), "Limit is correct"); +ok($d->wait_for_text('//*[@id="collapse_fraud"]//table//tr//td[contains(text(), "Monthly Settings")]/../td[4]', 'mymail@example.org'), "Mail is correct"); diag("Create a new Phonebook entry"); $d->find_element('//*[@id="customer_details"]//div//div//a[contains(text(),"Phonebook")]')->click();