From 6190c50184eb3db7a91f27c90bc3e0ddffee9acc Mon Sep 17 00:00:00 2001 From: Pallav Gupta Date: Tue, 15 Oct 2019 01:12:59 -0500 Subject: [PATCH] Fix users integration test The aim of this PS is to fix existing skipped test_users integration test. This PS also resolves Partial-Bug: #1774697 Change-Id: I8da7c09d712a12369d2ab757e22f44e1bb5f0960 --- .../test/integration_tests/pages/identity/userspage.py | 2 +- openstack_dashboard/test/integration_tests/regions/forms.py | 4 +++- .../test/integration_tests/tests/test_users.py | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openstack_dashboard/test/integration_tests/pages/identity/userspage.py b/openstack_dashboard/test/integration_tests/pages/identity/userspage.py index 1f35bcf712..695f99309c 100644 --- a/openstack_dashboard/test/integration_tests/pages/identity/userspage.py +++ b/openstack_dashboard/test/integration_tests/pages/identity/userspage.py @@ -34,7 +34,7 @@ class UsersTable(tables.TableRegion): class UsersPage(basepage.BaseNavigationPage): - USERS_TABLE_NAME_COLUMN = 'name' + USERS_TABLE_NAME_COLUMN = 'User Name' def __init__(self, driver, conf): super(UsersPage, self).__init__(driver, conf) diff --git a/openstack_dashboard/test/integration_tests/regions/forms.py b/openstack_dashboard/test/integration_tests/regions/forms.py index b017a7d533..1545e091bd 100644 --- a/openstack_dashboard/test/integration_tests/regions/forms.py +++ b/openstack_dashboard/test/integration_tests/regions/forms.py @@ -258,7 +258,9 @@ class ThemableSelectFormFieldRegion(BaseFormFieldRegion): @text.setter def text(self, text): if text != self.text: - self.src_elem.click() + js_cmd = ("$('select[name=\"%s\"]').closest(\"div\")." + "find(\".btn\").click();" % (self.name)) + self.driver.execute_script(js_cmd) for option in self.options: if self.strict_options_match: match = text == str(option.text.strip()) diff --git a/openstack_dashboard/test/integration_tests/tests/test_users.py b/openstack_dashboard/test/integration_tests/tests/test_users.py index 55267e6ba8..ee2de6e1f4 100644 --- a/openstack_dashboard/test/integration_tests/tests/test_users.py +++ b/openstack_dashboard/test/integration_tests/tests/test_users.py @@ -10,7 +10,6 @@ # License for the specific language governing permissions and limitations # under the License. -from openstack_dashboard.test.integration_tests import decorators from openstack_dashboard.test.integration_tests import helpers from openstack_dashboard.test.integration_tests.regions import messages @@ -19,7 +18,6 @@ class TestUser(helpers.AdminTestCase): USER_NAME = helpers.gen_random_resource_name("user") - @decorators.skip_because(bugs=['1774697']) def test_create_delete_user(self): users_page = self.home_pg.go_to_identity_userspage() password = self.TEST_PASSWORD