Skip to content

Commit

Permalink
check links on EOL banner
Browse files Browse the repository at this point in the history
  • Loading branch information
pondrejk committed Nov 22, 2024
1 parent 6a91dd9 commit 178d73d
Showing 1 changed file with 10 additions and 0 deletions.
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

0 comments on commit 178d73d

Please sign in to comment.