horizon/openstack_dashboard/test/integration_tests/tests/test_users.py
panneer.smn 15574cad5c Integration test fixes
* fixed 37 tests in total
* restructured and renamed test modules as per horizon
* fixed page navigation & updated method calls
* fixed css selector and xpaths as per horizon
* Removed decorators.skip for working tests
* included decorators.skip for non - working tests
* updated description for tests as per horizon navigation
* removed *update flavor info* and *update flavor access* test, as feature unavailable on horizon
* updated table column name references in page modules
* updated bind table action names as per horizon
* included help page navigation checkpoint
* fixed rc file download drop down selection
* updated page titles in test modules
* included calls as required for spinner disappearance
* updated form fields as per test needs
* updated default ipv4 and subnet for router interfaces
* included string conversion as required for comparisons
* updated cirros image name in horizon.conf

Change-Id: I9fdc810b37443b616bbb82956d1c90a0fa5ebd6b
2018-06-21 10:59:31 +03:00

37 lines
1.6 KiB
Python

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# 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
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
users_page.create_user(self.USER_NAME, password=password,
project='admin', role='admin')
self.assertTrue(users_page.find_message_and_dismiss(messages.SUCCESS))
self.assertFalse(users_page.find_message_and_dismiss(messages.ERROR))
self.assertTrue(users_page.is_user_present(self.USER_NAME))
users_page.delete_user(self.USER_NAME)
self.assertTrue(users_page.find_message_and_dismiss(messages.SUCCESS))
self.assertFalse(users_page.find_message_and_dismiss(messages.ERROR))
self.assertFalse(users_page.is_user_present(self.USER_NAME))