From 6be4f878e484fc783a35561a32a30544ce10455f Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Tue, 11 Jun 2024 16:22:38 -0700 Subject: [PATCH] fixed end2end --- app/main/views/index.py | 3 --- tests/app/main/views/test_index.py | 3 +-- tests/end_to_end/test_landing_and_sign_in_pages.py | 4 +++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/main/views/index.py b/app/main/views/index.py index 7c6c6a68c..ec489d5ac 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -11,8 +11,6 @@ from app.main.views.sub_navigation_dictionaries import features_nav, using_notif from app.utils.user import user_is_logged_in from notifications_utils.url_safe_token import generate_token -login_dot_gov_url = os.getenv("LOGIN_DOT_GOV_INITIAL_SIGNIN_URL") - @main.route("/") def index(): @@ -32,7 +30,6 @@ def index(): "views/signedout.html", sms_rate=CURRENT_SMS_RATE, counts=status_api_client.get_count_of_live_services_and_organizations(), - login_dot_gov_url=login_dot_gov_url, initial_signin_url=url, ) diff --git a/tests/app/main/views/test_index.py b/tests/app/main/views/test_index.py index cc29c963c..1e08cd606 100644 --- a/tests/app/main/views/test_index.py +++ b/tests/app/main/views/test_index.py @@ -21,8 +21,7 @@ def test_non_logged_in_user_can_see_homepage( assert page.select_one( "a.usa-button.login-button.login-button--primary.margin-right-2" - )["href"] - + ).text == "Sign in with \n" assert page.select_one("meta[name=description]") is not None # This area is hidden for the pilot # assert normalize_spaces(page.select_one('#whos-using-notify').text) == ( diff --git a/tests/end_to_end/test_landing_and_sign_in_pages.py b/tests/end_to_end/test_landing_and_sign_in_pages.py index df4ec486c..4cdabe61c 100644 --- a/tests/end_to_end/test_landing_and_sign_in_pages.py +++ b/tests/end_to_end/test_landing_and_sign_in_pages.py @@ -31,7 +31,9 @@ def test_landing_page(end_to_end_context): expect(benefits_studio_email).to_be_visible() # Check to make sure the sign-in button and email links are correct. - expect(sign_in_button).to_have_attribute("href") + href_value = sign_in_button.get_attribute('href') + assert href_value is not None, "The sign-in button does not have an href attribute" + # expect(sign_in_button).to_have_attribute("href") expect(benefits_studio_email).to_have_attribute( "href", "mailto:tts-benefits-studio@gsa.gov" )