URL: https://github.com/freeipa/freeipa/pull/2006
Author: Rezney
 Title: #2006: [Backport][ipa-4-6] ui_tests: fixes for issues with sending key 
and focus on element
Action: opened

PR body:
"""
This PR was opened automatically because PR #1999 was pushed to master and 
backport to ipa-4-6 is required.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/2006/head:pr2006
git checkout pr2006
From 1dd005ce24827f1032b6403e20395c33a502a7e2 Mon Sep 17 00:00:00 2001
From: Michal Reznik <mrez...@redhat.com>
Date: Thu, 7 Jun 2018 12:25:49 +0200
Subject: [PATCH] ui_tests: fixes for issues with sending key and focus on
 element

Fixes 2 issues in WebUI tests. One issue is that we are unable to
confirm a dialog by "Enter" keyboard - "actions.click()" helps
here to get focus on the page.

Second issue is probbaly related to screen resolution as we cannot
click to some of the action buttons (buttons which are having issue
varies).

https://pagure.io/freeipa/issue/7583
---
 ipatests/test_webui/test_service.py | 1 +
 ipatests/test_webui/ui_driver.py    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/ipatests/test_webui/test_service.py b/ipatests/test_webui/test_service.py
index 621ebe60cd..74cca36be4 100644
--- a/ipatests/test_webui/test_service.py
+++ b/ipatests/test_webui/test_service.py
@@ -592,6 +592,7 @@ def test_add_service_using_enter(self):
         pkey = self.get_service_pkey('smtp')
         self.add_service('smtp', confirm=False)
         actions = ActionChains(self.driver)
+        actions.click()
         actions.send_keys(Keys.ENTER).perform()
         self.wait(1)
         assert self.has_record(pkey)
diff --git a/ipatests/test_webui/ui_driver.py b/ipatests/test_webui/ui_driver.py
index 570e186a3e..503d139e2e 100644
--- a/ipatests/test_webui/ui_driver.py
+++ b/ipatests/test_webui/ui_driver.py
@@ -1689,6 +1689,7 @@ def action_list_action(self, name, confirm=True, confirm_btn="ok",
         expand.click()
         action_link = self.find("li[data-name=%s] a" % name, By.CSS_SELECTOR,
                                 context, strict=True)
+        self.move_to_element_in_page(action_link)
         action_link.click()
         if confirm:
             self.wait(0.5)  # wait for dialog
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/freeipa-devel@lists.fedorahosted.org/message/4VSYHHWD5W37WZ5INNZRB7UOM4AYEWBA/

Reply via email to