mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 03:53:13 -04:00
Merge branch 'main' of https://github.com/GSA/notifications-admin into 1484-dashboard-visualizations
This commit is contained in:
4
.github/actions/setup-project/action.yml
vendored
4
.github/actions/setup-project/action.yml
vendored
@@ -9,10 +9,10 @@ runs:
|
|||||||
sudo apt-get update \
|
sudo apt-get update \
|
||||||
&& sudo apt-get install -y --no-install-recommends \
|
&& sudo apt-get install -y --no-install-recommends \
|
||||||
libcurl4-openssl-dev
|
libcurl4-openssl-dev
|
||||||
- name: Set up Python 3.12
|
- name: Set up Python 3.12.3
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12.3"
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
shell: bash
|
shell: bash
|
||||||
run: pip install poetry
|
run: pip install poetry
|
||||||
|
|||||||
@@ -233,6 +233,24 @@ def create_app(application):
|
|||||||
)
|
)
|
||||||
logging.init_app(application)
|
logging.init_app(application)
|
||||||
|
|
||||||
|
# Hopefully will help identify if there is a race condition causing the CSRF errors
|
||||||
|
# that we have occasionally seen in our environments.
|
||||||
|
for key in ("SECRET_KEY", "DANGEROUS_SALT"):
|
||||||
|
try:
|
||||||
|
value = application.config[key]
|
||||||
|
except KeyError:
|
||||||
|
application.logger.error(f"Env Var {key} doesn't exist.")
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
data_len = len(value.strip())
|
||||||
|
except (TypeError, AttributeError):
|
||||||
|
application.logger.error(f"Env Var {key} invalid type: {type(value)}")
|
||||||
|
else:
|
||||||
|
if data_len:
|
||||||
|
application.logger.info(f"Env Var {key} is a non-zero length.")
|
||||||
|
else:
|
||||||
|
application.logger.error(f"Env Var {key} is empty.")
|
||||||
|
|
||||||
login_manager.login_view = "main.sign_in"
|
login_manager.login_view = "main.sign_in"
|
||||||
login_manager.login_message_category = "default"
|
login_manager.login_message_category = "default"
|
||||||
login_manager.session_protection = None
|
login_manager.session_protection = None
|
||||||
|
|||||||
@@ -130,10 +130,10 @@ def put_invite_data_in_redis(
|
|||||||
):
|
):
|
||||||
ttl = 60 * 15 # 15 minutes
|
ttl = 60 * 15 # 15 minutes
|
||||||
|
|
||||||
redis_client.raw_set(f"invitedata-{state}", json.dumps(invite_data), ex=ttl)
|
redis_client.set(f"invitedata-{state}", json.dumps(invite_data), ex=ttl)
|
||||||
redis_client.raw_set(f"user_email-{state}", user_email, ex=ttl)
|
redis_client.set(f"user_email-{state}", user_email, ex=ttl)
|
||||||
redis_client.raw_set(f"user_uuid-{state}", user_uuid, ex=ttl)
|
redis_client.set(f"user_uuid-{state}", user_uuid, ex=ttl)
|
||||||
redis_client.raw_set(
|
redis_client.set(
|
||||||
f"invited_user_email_address-{state}",
|
f"invited_user_email_address-{state}",
|
||||||
invited_user_email_address,
|
invited_user_email_address,
|
||||||
ex=ttl,
|
ex=ttl,
|
||||||
|
|||||||
1
poetry.lock
generated
1
poetry.lock
generated
@@ -1681,6 +1681,7 @@ files = [
|
|||||||
{file = "msgpack-1.0.8-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5fbb160554e319f7b22ecf530a80a3ff496d38e8e07ae763b9e82fadfe96f273"},
|
{file = "msgpack-1.0.8-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5fbb160554e319f7b22ecf530a80a3ff496d38e8e07ae763b9e82fadfe96f273"},
|
||||||
{file = "msgpack-1.0.8-cp39-cp39-win32.whl", hash = "sha256:f9af38a89b6a5c04b7d18c492c8ccf2aee7048aff1ce8437c4683bb5a1df893d"},
|
{file = "msgpack-1.0.8-cp39-cp39-win32.whl", hash = "sha256:f9af38a89b6a5c04b7d18c492c8ccf2aee7048aff1ce8437c4683bb5a1df893d"},
|
||||||
{file = "msgpack-1.0.8-cp39-cp39-win_amd64.whl", hash = "sha256:ed59dd52075f8fc91da6053b12e8c89e37aa043f8986efd89e61fae69dc1b011"},
|
{file = "msgpack-1.0.8-cp39-cp39-win_amd64.whl", hash = "sha256:ed59dd52075f8fc91da6053b12e8c89e37aa043f8986efd89e61fae69dc1b011"},
|
||||||
|
{file = "msgpack-1.0.8-py3-none-any.whl", hash = "sha256:24f727df1e20b9876fa6e95f840a2a2651e34c0ad147676356f4bf5fbb0206ca"},
|
||||||
{file = "msgpack-1.0.8.tar.gz", hash = "sha256:95c02b0e27e706e48d0e5426d1710ca78e0f0628d6e89d5b5a5b91a5f12274f3"},
|
{file = "msgpack-1.0.8.tar.gz", hash = "sha256:95c02b0e27e706e48d0e5426d1710ca78e0f0628d6e89d5b5a5b91a5f12274f3"},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
python-3.12.x
|
python-3.12.3
|
||||||
|
|||||||
@@ -19,9 +19,12 @@ def test_non_logged_in_user_can_see_homepage(
|
|||||||
"Reach people where they are with government-powered text messages"
|
"Reach people where they are with government-powered text messages"
|
||||||
)
|
)
|
||||||
|
|
||||||
assert page.select_one(
|
assert (
|
||||||
"a.usa-button.login-button.login-button--primary.margin-right-2"
|
page.select_one(
|
||||||
).text == "Sign in with \n"
|
"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
|
assert page.select_one("meta[name=description]") is not None
|
||||||
# This area is hidden for the pilot
|
# This area is hidden for the pilot
|
||||||
# assert normalize_spaces(page.select_one('#whos-using-notify').text) == (
|
# assert normalize_spaces(page.select_one('#whos-using-notify').text) == (
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ def test_landing_page(end_to_end_context):
|
|||||||
expect(benefits_studio_email).to_be_visible()
|
expect(benefits_studio_email).to_be_visible()
|
||||||
|
|
||||||
# Check to make sure the sign-in button and email links are correct.
|
# Check to make sure the sign-in button and email links are correct.
|
||||||
href_value = sign_in_button.get_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"
|
assert href_value is not None, "The sign-in button does not have an href attribute"
|
||||||
expect(benefits_studio_email).to_have_attribute(
|
expect(benefits_studio_email).to_have_attribute(
|
||||||
"href", "mailto:tts-benefits-studio@gsa.gov"
|
"href", "mailto:tts-benefits-studio@gsa.gov"
|
||||||
|
|||||||
Reference in New Issue
Block a user