{"action":"created","issue":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/4565","repository_url":"https://api.github.com/repos/SatelliteQE/robottelo","labels_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/4565/labels{/name}","comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/4565/comments","events_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/4565/events","html_url":"https://github.com/SatelliteQE/robottelo/pull/4565","id":221824266,"number":4565,"title":"Fix #4560 / Handle unicode locators if element not found","user":{"login":"svtkachenko","id":2845814,"avatar_url":"https://avatars3.githubusercontent.com/u/2845814?v=3","gravatar_id":"","url":"https://api.github.com/users/svtkachenko","html_url":"https://github.com/svtkachenko","followers_url":"https://api.github.com/users/svtkachenko/followers","following_url":"https://api.github.com/users/svtkachenko/following{/other_user}","gists_url":"https://api.github.com/users/svtkachenko/gists{/gist_id}","starred_url":"https://api.github.com/users/svtkachenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svtkachenko/subscriptions","organizations_url":"https://api.github.com/users/svtkachenko/orgs","repos_url":"https://api.github.com/users/svtkachenko/repos","events_url":"https://api.github.com/users/svtkachenko/events{/privacy}","received_events_url":"https://api.github.com/users/svtkachenko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-14T14:52:22Z","updated_at":"2017-04-14T14:52:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/4565","html_url":"https://github.com/SatelliteQE/robottelo/pull/4565","diff_url":"https://github.com/SatelliteQE/robottelo/pull/4565.diff","patch_url":"https://github.com/SatelliteQE/robottelo/pull/4565.patch"},"body":"Fixes #4560.\r\n\r\n`repr_text.encode('utf-8')` produced `str` object as target while unicode format expects `unicode` object.\r\n```python\r\nu'{0}: element {1} was not found while trying to click'\r\n.format(type(self).__name__, target)\r\n```\r\n\r\nTest results:\r\nIn test below usergroup name is substituted to locator. Also it generates various names, both `str` and `unicode` from the list: `STRING_TYPES = [u'alpha', u'numeric', u'alphanumeric', u'latin1', u'utf8', u'cjk', u'html']`\r\nIn the first case it goes to the branch were element is found. In the second case element was not found (I've used broken locator and `self.assertRaises(UINoSuchElementError)` to continue subtests. \r\n\r\nPython 3 / element found\r\n```python\r\nλ pytest -v tests/foreman/ui/test_usergroup.py -k 'test_positive_delete_empty'\r\n====== test session starts ======\r\nplatform linux -- Python 3.6.0, pytest-3.0.7, py-1.4.33, pluggy-0.4.0 -- /home/qui/code/venv/3/bin/python3\r\ncachedir: .cache\r\nrootdir: /home/qui/code/robottelo, inifile:\r\nplugins: xdist-1.15.0, services-1.1.14, cov-2.4.0\r\ncollected 7 items \r\n\r\ntests/foreman/ui/test_usergroup.py::UserGroupTestCase::test_positive_delete_empty PASSED\r\n\r\n====== 6 tests deselected =======\r\n====== 1 passed, 6 deselected in 152.25 seconds ======\r\n```\r\nPython 2 / element found\r\n```python\r\nλ pytest -v tests/foreman/ui/test_usergroup.py -k 'test_positive_delete_empty'                                             \r\n====== test session starts ======\r\nplatform linux2 -- Python 2.7.13, pytest-3.0.7, py-1.4.33, pluggy-0.4.0 -- /home/qui/code/venv/2/bin/python2\r\ncachedir: .cache\r\nrootdir: /home/qui/code/robottelo, inifile:\r\nplugins: xdist-1.15.0, services-1.1.14, cov-2.4.0\r\ncollected 7 items \r\n\r\ntests/foreman/ui/test_usergroup.py::UserGroupTestCase::test_positive_delete_empty PASSED\r\n\r\n====== 6 tests deselected =======\r\n====== 1 passed, 6 deselected in 148.17 seconds ======\r\n```\r\nPython 3 / element not found\r\n```python\r\nλ pytest -v tests/foreman/ui/test_usergroup.py -k 'test_positive_delete_empty'                                             \r\n====== test session starts ======\r\n\r\ntests/foreman/ui/test_usergroup.py::UserGroupTestCase::test_positive_delete_empty PASSED\r\n\r\n====== 6 tests deselected =======\r\n====== 1 passed, 6 deselected in 174.54 seconds ======\r\n```\r\nPython 2 / element not found\r\n```python 2\r\nλ pytest -v tests/foreman/ui/test_usergroup.py -k 'test_positive_delete_empty'                                             \r\n====== test session starts ======\r\n\r\ntests/foreman/ui/test_usergroup.py::UserGroupTestCase::test_positive_delete_empty PASSED\r\n\r\n====== 6 tests deselected =======\r\n====== 1 passed, 6 deselected in 180.81 seconds ======\r\n```"},"comment":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/comments/294167390","html_url":"https://github.com/SatelliteQE/robottelo/pull/4565#issuecomment-294167390","issue_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/4565","id":294167390,"user":{"login":"mention-bot","id":15710697,"avatar_url":"https://avatars2.githubusercontent.com/u/15710697?v=3","gravatar_id":"","url":"https://api.github.com/users/mention-bot","html_url":"https://github.com/mention-bot","followers_url":"https://api.github.com/users/mention-bot/followers","following_url":"https://api.github.com/users/mention-bot/following{/other_user}","gists_url":"https://api.github.com/users/mention-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/mention-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mention-bot/subscriptions","organizations_url":"https://api.github.com/users/mention-bot/orgs","repos_url":"https://api.github.com/users/mention-bot/repos","events_url":"https://api.github.com/users/mention-bot/events{/privacy}","received_events_url":"https://api.github.com/users/mention-bot/received_events","type":"User","site_admin":false},"created_at":"2017-04-14T14:52:24Z","updated_at":"2017-04-14T14:52:24Z","body":"@svtkachenko, thanks for your PR! By analyzing the history of the files in this pull request, we identified @renzon, @oshtaier and @kbidarkar to be potential reviewers."}}
{"actor":{"display_login":"mention-bot"}}