Fix failing tests

This includes a fix for the commit hash test, which was not referencing the Flask app in a valid way.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
Carlo Costino
2024-03-19 15:53:38 -04:00
parent b4986e4170
commit 4b1db40cbd
3 changed files with 21 additions and 7 deletions

View File

@@ -24,8 +24,11 @@ def test_render_sign_in_template_for_new_user(client_request):
# TODO: Fix this test to be less brittle! If the Login.gov link is enabled,
# then these indices need to be 1 instead of 0.
# Currently it's not enabled for the test or production environments.
assert page.select("main a")[0].text == "Forgot your password?"
assert page.select("main a")[0]["href"] == url_for("main.forgot_password")
assert page.select("main a")[1].text == "Forgot your password?"
assert page.select("main a")[1]["href"] == url_for("main.forgot_password")
# TODO: We'll have to adjust this depending on whether Login.gov is
# enabled or not; fix this in the future.
assert "Sign in again" not in normalize_spaces(page.text)