From 2c884d7d909f9c53007e5dbf6a20de3b0bf64be2 Mon Sep 17 00:00:00 2001 From: dgaikwad Date: Tue, 21 Jul 2020 11:37:06 +0530 Subject: [PATCH] fixing test --- cfme/tests/automate/test_domain.py | 2 +- cfme/tests/automate/test_git_import.py | 2 +- cfme/tests/test_login.py | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cfme/tests/automate/test_domain.py b/cfme/tests/automate/test_domain.py index 362a5a1dd9..45195f559a 100644 --- a/cfme/tests/automate/test_domain.py +++ b/cfme/tests/automate/test_domain.py @@ -650,7 +650,7 @@ def test_existing_domain_child_override(appliance, custom_domain, import_data): ) datastore.import_domain_from(import_data.from_domain, import_data.to_domain) view = appliance.browser.create_view(FileImportSelectorView) - view.flash.assert_message("Error: Selected domain is locked") + view.flash.assert_message("Error: Cannot import into a locked domain.") custom_domain.unlock() datastore.import_domain_from(import_data.from_domain, import_data.to_domain) view.flash.assert_no_error() diff --git a/cfme/tests/automate/test_git_import.py b/cfme/tests/automate/test_git_import.py index a9e85a12ac..9dbab5129d 100644 --- a/cfme/tests/automate/test_git_import.py +++ b/cfme/tests/automate/test_git_import.py @@ -580,6 +580,6 @@ def test_git_refresh_with_renamed_yaml(appliance): import_type="git", url=GIT_REPO_URL ) with pytest.raises(AssertionError, match=( - "Error: import failed: Selected branch or tag does not contain a valid domain" + "Error: import failed: Import of domain failed" )): repo.import_domain_from(branch="origin/broken-yaml") diff --git a/cfme/tests/test_login.py b/cfme/tests/test_login.py index ba3865a406..a0c49315c0 100644 --- a/cfme/tests/test_login.py +++ b/cfme/tests/test_login.py @@ -49,11 +49,12 @@ def test_login(context, method, appliance): @pytest.mark.tier(2) @pytest.mark.sauce @pytest.mark.parametrize('context', [ViaUI]) -# BZ 1632718 is only relevant for Chrome browser -@pytest.mark.meta(blockers=[BZ(1632718)]) +@pytest.mark.meta(automates=[1632718]) def test_bad_password(context, request, appliance): - """ Tests logging in with a bad password. + """ Tests logging in with a bad password and 1632718 is only relevant for Chrome browser + Bugzilla: + 1632718 Polarion: assignee: dgaikwad casecomponent: WebUI @@ -67,7 +68,9 @@ def test_bad_password(context, request, appliance): user = appliance.collections.users.instantiate(credential=cred, name='Administrator') with appliance.context.use(context): - with pytest.raises(Exception, match="Login failed: Unauthorized"): + with pytest.raises( + Exception, match="Sorry, the username or password you entered is incorrect." + ): appliance.server.login(user) view = appliance.browser.create_view(LoginPage) assert view.password.read() == '' and view.username.read() == ''