mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 05:33:11 -04:00
fix testing
This commit is contained in:
@@ -7,9 +7,9 @@
|
|||||||
alt="Mobile phone showing error screen"/>
|
alt="Mobile phone showing error screen"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="desktop:grid-col-6 tablet:grid-col-12 padding-left-0 desktop:padding-left-5">
|
<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.
|
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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,16 +16,22 @@ def test_non_logged_in_user_can_see_homepage(
|
|||||||
client_request.logout()
|
client_request.logout()
|
||||||
page = client_request.get("main.index", _test_page_title=False)
|
page = client_request.get("main.index", _test_page_title=False)
|
||||||
|
|
||||||
assert page.h1.text.strip() == (
|
heading = page.h1.text.strip()
|
||||||
"Reach people where they are with government-powered text messages"
|
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(
|
button = page.select_one(
|
||||||
"a.usa-button.login-button.login-button--primary.margin-right-2"
|
"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("meta[name=description]") is not None
|
||||||
assert page.select_one("#whos-using-notify a") is None
|
assert page.select_one("#whos-using-notify a") is None
|
||||||
|
|||||||
Reference in New Issue
Block a user