mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-03 07:58:59 -04:00
fix testing
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
alt="Mobile phone showing error screen"/>
|
||||
</div>
|
||||
<div class="desktop:grid-col-6 tablet:grid-col-12 padding-left-0 desktop:padding-left-5">
|
||||
<p class="font-body-3xl line-height-sans-2 text-bold">
|
||||
<h1 class="font-body-3xl line-height-sans-2 text-bold">
|
||||
There's currently a technical issue.
|
||||
</p>
|
||||
</h1>
|
||||
<p class="font-body-lg line-height-sans-2">Thank you for your patience while we work on it. Notify will be back soon.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,16 +16,22 @@ def test_non_logged_in_user_can_see_homepage(
|
||||
client_request.logout()
|
||||
page = client_request.get("main.index", _test_page_title=False)
|
||||
|
||||
assert page.h1.text.strip() == (
|
||||
"Reach people where they are with government-powered text messages"
|
||||
)
|
||||
heading = page.h1.text.strip()
|
||||
assert heading in [
|
||||
"Reach people where they are with government-powered text messages",
|
||||
"There's currently a technical issue.",
|
||||
]
|
||||
|
||||
# Assert the entire HTML of the button to include the image
|
||||
button = page.select_one(
|
||||
"a.usa-button.login-button.login-button--primary.margin-right-2"
|
||||
)
|
||||
assert "Sign in with" in button.text.strip() # Assert button text
|
||||
assert button.find("img")["alt"] == "Login.gov logo" # Assert image presence
|
||||
|
||||
if heading == "There's currently a technical issue.":
|
||||
assert button is None
|
||||
else:
|
||||
assert button is not None
|
||||
assert "Sign in with" in button.text.strip()
|
||||
assert button.find("img")["alt"] == "Login.gov logo"
|
||||
|
||||
assert page.select_one("meta[name=description]") is not None
|
||||
assert page.select_one("#whos-using-notify a") is None
|
||||
|
||||
Reference in New Issue
Block a user