Updating new home page styles to use more from the USWDS, and make sure it's responsive and accessible

This commit is contained in:
Jonathan Bobel
2024-12-13 12:37:11 -05:00
parent 92f3794e61
commit 1486680293
8 changed files with 151 additions and 122 deletions

View File

@@ -118,7 +118,7 @@ def test_static_pages(client_request, mock_get_organization_by_domain, view, moc
"write_for_action",
"multiple_languages",
"benchmark_performance",
"guidance_index"
"guidance_index",
]
return (
not current_app.config["FEATURE_BEST_PRACTICES_ENABLED"]

View File

@@ -350,9 +350,13 @@ def test_should_show_templates_folder_page(
assert normalize_spaces(page.select_one("h1").text) == expected_title_tag
# remove this line if you don't want the breadcrumb on the first page
assert len(page.select("nav#breadcrumb-template-folders a")) == len(expected_parent_link_args)
assert len(page.select("nav#breadcrumb-template-folders a")) == len(
expected_parent_link_args
)
for index, parent_link in enumerate(page.select("nav#breadcrumb-template-folders a")):
for index, parent_link in enumerate(
page.select("nav#breadcrumb-template-folders a")
):
assert parent_link["href"] == url_for(
"main.choose_template",
service_id=SERVICE_ONE_ID,

View File

@@ -69,7 +69,9 @@ def test_should_show_empty_page_when_no_templates(
service_id=service_one["id"],
)
assert normalize_spaces(page.select_one("h1").text) == ("Select or create a template")
assert normalize_spaces(page.select_one("h1").text) == (
"Select or create a template"
)
assert normalize_spaces(page.select_one("main p").text) == (expected_message)
assert page.select_one("#add_new_folder_form")
assert page.select_one("#add_new_template_form")
@@ -87,7 +89,9 @@ def test_should_show_add_template_form_if_service_has_folder_permission(
service_id=service_one["id"],
)
assert normalize_spaces(page.select_one("h1").text) == ("Select or create a template")
assert normalize_spaces(page.select_one("h1").text) == (
"Select or create a template"
)
assert normalize_spaces(page.select_one("main p").text) == (
"Every message starts with a template. You can change it later. "
"You need a template before you can send messages."