mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 13:38:24 -04:00
Merge branch 'main' into 1928-develop-new-page-templates-in-code-to-sit-behind-the-log-in
This commit is contained in:
@@ -610,7 +610,7 @@ def test_organization_services_links_to_downloadable_report(
|
||||
assert link_to_report.attrs["href"] == url_for(
|
||||
".download_organization_usage_report",
|
||||
org_id=ORGANISATION_ID,
|
||||
selected_year=2022,
|
||||
selected_year=2021,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -431,7 +431,7 @@ def test_caseworkers_get_caseworking_navigation(
|
||||
client_request.login(active_caseworking_user)
|
||||
page = client_request.get("main.choose_template", service_id=SERVICE_ONE_ID)
|
||||
assert normalize_spaces(page.select_one("header + .grid-container nav").text) == (
|
||||
"Send messages Sent messages"
|
||||
"service one Switch service"
|
||||
)
|
||||
|
||||
|
||||
@@ -446,5 +446,5 @@ def test_caseworkers_see_jobs_nav_if_jobs_exist(
|
||||
client_request.login(active_caseworking_user)
|
||||
page = client_request.get("main.choose_template", service_id=SERVICE_ONE_ID)
|
||||
assert normalize_spaces(page.select_one("header + .grid-container nav").text) == (
|
||||
"Send messages Sent messages"
|
||||
"service one Switch service"
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
from freezegun import freeze_time
|
||||
|
||||
from app.utils.time import get_current_financial_year, is_less_than_days_ago
|
||||
from app.utils.time import is_less_than_days_ago
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -15,17 +15,3 @@ from app.utils.time import get_current_financial_year, is_less_than_days_ago
|
||||
@freeze_time("2020-02-14T12:00:00")
|
||||
def test_is_less_than_days_ago(date_from_db, expected_result):
|
||||
assert is_less_than_days_ago(date_from_db, 90) == expected_result
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("datetime_string", "financial_year"),
|
||||
[
|
||||
("2021-01-01T00:00:00+00:00", 2021), # Start of 2021
|
||||
("2021-04-01T03:59:59+00:00", 2021), # One minute before midnight (BST)
|
||||
("2021-10-01T04:05:00+00:00", 2022), # Midnight (BST)
|
||||
("2021-12-12T12:12:12+01:00", 2022), # Later in the year
|
||||
],
|
||||
)
|
||||
def test_get_financial_year(datetime_string, financial_year):
|
||||
with freeze_time(datetime_string):
|
||||
assert get_current_financial_year() == financial_year
|
||||
|
||||
@@ -29,12 +29,9 @@ def check_axe_report(page):
|
||||
|
||||
results = axe.run(page)
|
||||
|
||||
# TODO we are setting this to critical for now
|
||||
# to keep tests passing. Once the serious and
|
||||
# moderate issues are fixed, we will set this
|
||||
# 'moderate'
|
||||
# TODO fix remaining 'moderate' failures
|
||||
# so we can set the level we skip to minor only
|
||||
for violation in results["violations"]:
|
||||
assert violation["impact"] in [
|
||||
"minor",
|
||||
"moderate",
|
||||
], f"Accessibility violation: {violation}"
|
||||
|
||||
Reference in New Issue
Block a user