From e140d198eaf6982a966b2d0bf3edbd091142a894 Mon Sep 17 00:00:00 2001 From: Michal Reznik Date: Wed, 27 Jun 2018 15:36:32 +0200 Subject: [PATCH] ui_tests: stabilization fixes This patch aims to fix the following tests which seems to be quite unstable recently: test_user::test_actions - closing notification and moving to element to have screenshot of current place. test_user::certificates - add wait() / close_notification Also adds missing @screenshot decorator to test_user_misc method. Reviewed-By: Pavel Picka --- ipatests/test_webui/test_user.py | 5 +++++ ipatests/test_webui/ui_driver.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ipatests/test_webui/test_user.py b/ipatests/test_webui/test_user.py index 00995744d..052911153 100644 --- a/ipatests/test_webui/test_user.py +++ b/ipatests/test_webui/test_user.py @@ -237,6 +237,8 @@ class test_user(user_tasks): cert_widget_sel = "div.certificate-widget" self.add_record(user.ENTITY, user.DATA) + self.wait() + self.close_notifications() self.navigate_to_record(user.PKEY) # cert request @@ -539,6 +541,8 @@ class test_user(user_tasks): first_mail = self.create_email_addr(user.DATA.get('pkey')) self.add_record(user.ENTITY, user.DATA) + self.wait() + self.close_notifications() self.navigate_to_record(user.DATA.get('pkey')) # add a new mail (without save) and reset @@ -574,6 +578,7 @@ class test_user(user_tasks): # cleanup self.delete(user.ENTITY, [user.DATA]) + @screenshot def test_user_misc(self): """ Test various miscellaneous test cases under one roof to save init time diff --git a/ipatests/test_webui/ui_driver.py b/ipatests/test_webui/ui_driver.py index 88774c64f..76db402c6 100644 --- a/ipatests/test_webui/ui_driver.py +++ b/ipatests/test_webui/ui_driver.py @@ -1734,6 +1734,8 @@ class UI_driver(object): self.action_list_action('disable') self.wait_for_request(n=2) self.assert_no_error_dialog() + self.close_notifications() + self.move_to_element_in_page(title) self.assert_class(title, 'disabled') def delete_action(self, entity, pkey, action='delete', facet='search'):