From d48699fe3f5678e9cc83bab2629b07814808d17b Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Thu, 12 Dec 2019 12:02:01 +0100 Subject: [PATCH] TT#68016 selenium: add test: check if security bans are working controller_other.t: - go to security bans page - refresh both ip and users ban list - check if list got refreshed successfully Change-Id: Id87bf9834cf4a6762e7e9fe92904181ac561d438 --- t/selenium/controller_other.t | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/t/selenium/controller_other.t b/t/selenium/controller_other.t index 96f989130a..aba55b3710 100644 --- a/t/selenium/controller_other.t +++ b/t/selenium/controller_other.t @@ -267,6 +267,19 @@ is($d->get_text_safe('//*[@id="content"]//div[contains(@class, "alert")]'), 'Con $d->fill_element('//*[@id="contact_table_filter"]/label/input', 'xpath', $resellername); ok($d->find_element_by_css('#contact_table tr > td.dataTables_empty', 'css'), 'Contact has been deleted'); +diag("Go to 'Security Bans' page"); +$d->find_element('//*[@id="main-nav"]//*[contains(text(),"Settings")]')->click(); +$d->find_element('Security Bans', 'link_text')->click(); + +diag("Try to refresh Banned IPs"); +$d->find_element('//*[@id="toggle-accordions"]')->click(); +$d->find_element('Refresh banned IPs data', 'link_text')->click(); +ok($d->find_element_by_xpath('//*[@id="banned_ips_table_processing"][@style="display: none;"]'), "Processing is done"); + +diag("Try to refresh banned users"); +$d->find_element('Refresh banned users data', 'link_text')->click(); +ok($d->find_element_by_xpath('//*[@id="banned_users_table_processing"][@style="display: none;"]'), "Processing is done"); + diag("Go to homepage"); $d->find_element('//*[@id="main-nav"]/li[1]/a')->click();