Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No blank cvpage test #12775

Merged
merged 17 commits into from
Oct 27, 2023
Merged
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions tests/foreman/ui/test_contentview.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,34 @@ def test_positive_create_cv(session, target_sat):
with target_sat.ui_session() as session:
session.contentview_new.create(dict(name=cv))
assert session.contentview_new.search(cv)[0]['Name'] == cv


@pytest.mark.tier2
def test_no_blank_page_on_language_switch(session, target_sat, module_org):
"""Able to view the new CV UI when the language is set to something other
than English

:id: d8745aca-b199-4c7e-a970-b1f0f5c5d56c

:steps:
1. Change the Satellite system language to french or czech
sambible marked this conversation as resolved.
Show resolved Hide resolved
2. Attempt to view the CV UI, and perform basic action

:expectedresults: CV UI is visible, and isn't a blank page

:CaseLevel: System

:BZ: 2163538
sambible marked this conversation as resolved.
Show resolved Hide resolved

:CaseImportance: High
sambible marked this conversation as resolved.
Show resolved Hide resolved
"""
user_password = gen_string('alpha')
user = target_sat.api.User(
default_organization=module_org,
organization=[module_org],
password=user_password,
admin=True,
).create()
with target_sat.ui_session(user=user.login, password=user_password) as session:
session.user.update(user.login, {'user.language': 'Français'})
assert session.contentview_new.check_if_blank_in_french()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at check_if_blank_in_french, I don't think that asserts anything.
Can you add a different assertion to check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's simply asserting that the table exists - the bug in this case was that in different languages, i.e. french, the page wouldn't display at all. So in this case, simply asserting that the table exists is sufficient.