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

check links on EOL banner #16990

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all 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
10 changes: 10 additions & 0 deletions tests/foreman/ui/test_eol_banner.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from airgun.session import Session
from navmazing import NavigationTriesExceeded
import pytest
import requests

from robottelo.utils.datafactory import gen_string

Expand All @@ -28,6 +29,11 @@ def set_eol_date(target_sat, eol_date):
target_sat.restart_services()


def check_links(session):
for link in [session.eol_banner.lifecycle_link(), session.eol_banner.helper_link()]:
assert requests.get(link, verify=False).status_code == 200, f'Failed to reach {link}'


@pytest.mark.upgrade
@pytest.mark.run_in_one_thread
@pytest.mark.tier2
Expand All @@ -45,6 +51,8 @@ def test_positive_eol_banner_e2e(session, target_sat, test_name):
5. Check non-admin users can't see error banner
6. Dismiss banner

:verifies: SAT-29427

:expectedresults: Banner shows up when it should
"""
# non-admin user
Expand Down Expand Up @@ -74,6 +82,7 @@ def test_positive_eol_banner_e2e(session, target_sat, test_name):
banner = adminsession.eol_banner.read()
assert message_date in banner["name"]
assert adminsession.eol_banner.is_warning()
check_links(adminsession)
adminsession.eol_banner.dismiss()
with pytest.raises(NavigationTriesExceeded) as error:
adminsession.eol_banner.read()
Expand All @@ -94,6 +103,7 @@ def test_positive_eol_banner_e2e(session, target_sat, test_name):
banner = adminsession.eol_banner.read()
assert eol_date in banner["name"]
assert adminsession.eol_banner.is_danger()
check_links(adminsession)
adminsession.eol_banner.dismiss()
with pytest.raises(NavigationTriesExceeded) as error:
adminsession.eol_banner.read()
Expand Down
Loading