mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 05:29:38 -04:00
Merge branch 'main' of https://github.com/GSA/notifications-admin into 1544-data-viz-total-message-allowance
# Conflicts: # .ds.baseline # package-lock.json # poetry.lock
This commit is contained in:
@@ -19,10 +19,9 @@ def test_non_logged_in_user_can_see_homepage(
|
||||
"Reach people where they are with government-powered text messages"
|
||||
)
|
||||
|
||||
assert page.select_one("a.usa-button.usa-button--big")["href"] == url_for(
|
||||
"main.sign_in",
|
||||
)
|
||||
|
||||
assert page.select_one(
|
||||
"a.usa-button.login-button.login-button--primary.margin-right-2"
|
||||
).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) == (
|
||||
|
||||
@@ -3,7 +3,6 @@ import uuid
|
||||
import pytest
|
||||
from flask import url_for
|
||||
|
||||
from app.main.views.sign_in import _reformat_keystring
|
||||
from app.models.user import User
|
||||
from tests.conftest import SERVICE_ONE_ID, normalize_spaces
|
||||
|
||||
@@ -20,25 +19,12 @@ def test_render_sign_in_template_for_new_user(client_request):
|
||||
# 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 == "Sign in with Login.gov"
|
||||
assert page.select("main a")[1].text == "Create Login.gov account"
|
||||
|
||||
# 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)
|
||||
|
||||
|
||||
def test_reformat_keystring():
|
||||
orig = "-----BEGIN PRIVATE KEY----- blah blah blah -----END PRIVATE KEY-----"
|
||||
expected = """-----BEGIN PRIVATE KEY-----
|
||||
blah
|
||||
blah
|
||||
blah
|
||||
-----END PRIVATE KEY-----
|
||||
"""
|
||||
reformatted = _reformat_keystring(orig)
|
||||
assert reformatted == expected
|
||||
|
||||
|
||||
def test_sign_in_explains_session_timeout(client_request):
|
||||
client_request.logout()
|
||||
page = client_request.get("main.sign_in", next="/foo")
|
||||
|
||||
Reference in New Issue
Block a user