diff --git a/.ds.baseline b/.ds.baseline index 666119f50..df4be33a6 100644 --- a/.ds.baseline +++ b/.ds.baseline @@ -555,7 +555,7 @@ "filename": "tests/app/main/views/test_register.py", "hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8", "is_verified": false, - "line_number": 201, + "line_number": 200, "is_secret": false }, { @@ -563,7 +563,7 @@ "filename": "tests/app/main/views/test_register.py", "hashed_secret": "bb5b7caa27d005d38039e3797c3ddb9bcd22c3c8", "is_verified": false, - "line_number": 274, + "line_number": 273, "is_secret": false } ], @@ -684,5 +684,5 @@ } ] }, - "generated_at": "2025-01-12T22:42:11Z" + "generated_at": "2025-01-13T20:16:58Z" } diff --git a/app/main/validators.py b/app/main/validators.py index 1dfc97c48..e1292b959 100644 --- a/app/main/validators.py +++ b/app/main/validators.py @@ -41,14 +41,8 @@ class ValidGovEmail: if field.data == "": return - from flask import url_for + message = "Enter a public sector email address." - message = """ - Enter a public sector email address or - find out who can use Notify - """.format( - url_for("main.features") - ) if not is_gov_user(field.data.lower()): raise ValidationError(message) diff --git a/app/main/views/index.py b/app/main/views/index.py index f7a8c231c..b45c699e7 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -15,8 +15,6 @@ from app.main import main from app.main.views.pricing import CURRENT_SMS_RATE from app.main.views.sub_navigation_dictionaries import ( about_notify_nav, - best_practices_nav, - features_nav, using_notify_nav, ) from app.utils.user import user_is_logged_in @@ -106,44 +104,6 @@ def callbacks(): return redirect(url_for("main.documentation"), 301) -# --- Features page set --- # - - -@main.route("/features") -@user_is_logged_in -def features(): - return render_template("views/features.html", navigation_links=features_nav()) - - -@main.route("/features/roadmap", endpoint="roadmap") -@user_is_logged_in -def roadmap(): - return render_template("views/roadmap.html", navigation_links=features_nav()) - - -@main.route("/features/sms") -@user_is_logged_in -def features_sms(): - return render_template( - "views/features/text-messages.html", navigation_links=features_nav() - ) - - -@main.route("/features/security", endpoint="security") -@user_is_logged_in -def security(): - return render_template("views/security.html", navigation_links=features_nav()) - - -@main.route("/features/using_notify") -@user_is_logged_in -def using_notify(): - return ( - render_template("views/using-notify.html", navigation_links=features_nav()), - 410, - ) - - @main.route("/using-notify/delivery-status") @user_is_logged_in def message_status(): @@ -198,70 +158,70 @@ def trial_mode_new(): ) -@main.route("/guides/best-practices") +@main.route("/using-notify/best-practices") @user_is_logged_in def best_practices(): return render_template( "views/guides/best-practices.html", - navigation_links=best_practices_nav(), + navigation_links=using_notify_nav(), ) -@main.route("/guides/clear-goals") +@main.route("/using-notify/best-practices/clear-goals") @user_is_logged_in def clear_goals(): return render_template( "views/guides/clear-goals.html", - navigation_links=best_practices_nav(), + navigation_links=using_notify_nav(), ) -@main.route("/guides/rules-and-regulations") +@main.route("/using-notify/best-practices/rules-and-regulations") @user_is_logged_in def rules_and_regulations(): return render_template( "views/guides/rules-and-regulations.html", - navigation_links=best_practices_nav(), + navigation_links=using_notify_nav(), ) -@main.route("/guides/establish-trust") +@main.route("/using-notify/best-practices/establish-trust") @user_is_logged_in def establish_trust(): return render_template( "views/guides/establish-trust.html", - navigation_links=best_practices_nav(), + navigation_links=using_notify_nav(), ) -@main.route("/guides/write-for-action") +@main.route("/using-notify/best-practices/write-for-action") @user_is_logged_in def write_for_action(): return render_template( "views/guides/write-for-action.html", - navigation_links=best_practices_nav(), + navigation_links=using_notify_nav(), ) -@main.route("/guides/multiple-languages") +@main.route("/using-notify/best-practices/multiple-languages") @user_is_logged_in def multiple_languages(): return render_template( "views/guides/multiple-languages.html", - navigation_links=best_practices_nav(), + navigation_links=using_notify_nav(), ) -@main.route("/guides/benchmark-performance") +@main.route("/using-notify/best-practices/benchmark-performance") @user_is_logged_in def benchmark_performance(): return render_template( "views/guides/benchmark-performance.html", - navigation_links=best_practices_nav(), + navigation_links=using_notify_nav(), ) -@main.route("/guides/using-notify/guidance") +@main.route("/using-notify/guidance") @user_is_logged_in def guidance_index(): return render_template( diff --git a/app/main/views/sub_navigation_dictionaries.py b/app/main/views/sub_navigation_dictionaries.py index d18595024..3b2cf84c1 100644 --- a/app/main/views/sub_navigation_dictionaries.py +++ b/app/main/views/sub_navigation_dictionaries.py @@ -1,30 +1,36 @@ -def features_nav(): - return [ - { - "name": "Features", - "link": "main.features", - "sub_navigation_items": [ - # { - # "name": "Text messages", - # "link": "main.features_sms", - # }, - ], - }, - { - "name": "Roadmap", - "link": "main.roadmap", - }, - { - "name": "Security", - "link": "main.security", - }, - ] - - def using_notify_nav(): nav_items = [ {"name": "Get started", "link": "main.get_started"}, - {"name": "Guides", "link": "main.best_practices"}, + { + "name": "Best Practices", + "link": "main.best_practices", + "sub_navigation_items": [ + { + "name": "Clear goals", + "link": "main.clear_goals", + }, + { + "name": "Rules and regulations", + "link": "main.rules_and_regulations", + }, + { + "name": "Establish trust", + "link": "main.establish_trust", + }, + { + "name": "Write for action", + "link": "main.write_for_action", + }, + { + "name": "Multiple languages", + "link": "main.multiple_languages", + }, + { + "name": "Benchmark performance", + "link": "main.benchmark_performance", + }, + ], + }, {"name": "Trial mode", "link": "main.trial_mode_new"}, {"name": "Tracking usage", "link": "main.pricing"}, {"name": "Delivery Status", "link": "main.message_status"}, @@ -34,49 +40,6 @@ def using_notify_nav(): return nav_items -def best_practices_nav(): - return [ - { - "name": "Best Practices", - "link": "main.best_practices", - }, - { - "name": "Clear goals", - "link": "main.clear_goals", - }, - { - "name": "Rules and regulations", - "link": "main.rules_and_regulations", - }, - { - "name": "Establish trust", - "link": "main.establish_trust", - "sub_navigation_items": [ - { - "name": "Get the word out", - "link": "main.establish_trust#get-the-word-out", - }, - { - "name": "As people receive texts", - "link": "main.establish_trust#as-people-receive-texts", - }, - ], - }, - { - "name": "Write for action", - "link": "main.write_for_action", - }, - { - "name": "Multiple languages", - "link": "main.multiple_languages", - }, - { - "name": "Benchmark performance", - "link": "main.benchmark_performance", - }, - ] - - def about_notify_nav(): return [ { diff --git a/app/templates/components/header.html b/app/templates/components/header.html index 4c04200be..a07f01506 100644 --- a/app/templates/components/header.html +++ b/app/templates/components/header.html @@ -6,9 +6,7 @@ {% if current_user.is_authenticated %} {% set navigation = [ {"href": url_for("main.show_accounts_or_dashboard"), "text": "Current service", "active": header_navigation.is_selected('accounts-or-dashboard')}, - {"href": url_for('main.get_started'), "text": "Using Notify", "active": header_navigation.is_selected('using_notify')}, - {"href": url_for('main.best_practices'), "text": "Guides", "active": header_navigation.is_selected('best_practices')}, - {"href": url_for('main.features'), "text": "Features", "active": header_navigation.is_selected('features')}, + {"href": url_for('main.get_started'), "text": "Using Notify", "active": request.path.startswith('/using-notify')}, {"href": url_for('main.support'), "text": "Contact us", "active": header_navigation.is_selected('support')} ] %} diff --git a/app/templates/views/features.html b/app/templates/views/features.html index 8007a06e8..456f16815 100644 --- a/app/templates/views/features.html +++ b/app/templates/views/features.html @@ -11,10 +11,8 @@

Features

If you work for the government, you can use Notify.gov to keep your users updated.

-

Notify makes it easy to create, customize, and send text messages.

- +

Notify makes it easy to create, customize, and send text messages.

+

You do not need any technical knowledge to use Notify.

{% if not current_user.is_authenticated %}

Create an account for free and try it yourself.

diff --git a/app/templates/views/guides/best-practices.html b/app/templates/views/guides/best-practices.html index 0170e987a..9826e6a33 100644 --- a/app/templates/views/guides/best-practices.html +++ b/app/templates/views/guides/best-practices.html @@ -24,37 +24,37 @@ "svg_src": "goal", "card_heading": "Establish clear goals", "p_text": "Start with a singular purpose. Make explicit what you want to achieve.", - "link": "/guides/clear-goals" + "link": "/using-notify/best-practices/clear-goals" }, { "svg_src": "compliant", "card_heading": "Follow rules & regulations", "p_text": "Understand what is required when texting the public.", - "link": "/guides/rules-and-regulations" + "link": "/using-notify/best-practices/rules-and-regulations" }, { "svg_src": "trust", "card_heading": "Establish trust", "p_text": "Help your audience anticipate and welcome your texts.", - "link": "/guides/establish-trust" + "link": "/using-notify/best-practices/establish-trust" }, { "svg_src": "runner", "card_heading": "Write texts that provoke action", "p_text": "Help your audience know what to do with the information you send.", - "link": "/guides/write-for-action" + "link": "/using-notify/best-practices/write-for-action" }, { "svg_src": "language", "card_heading": "Send texts in multiple languages", "p_text": "What to know as you plan translated texts.", - "link": "/guides/multiple-languages" + "link": "/using-notify/best-practices/multiple-languages" }, { "svg_src": "chart", "card_heading": "Measure performance with benchmarking", "p_text": "Learn how effective your texting program can be.", - "link": "/guides/benchmark-performance" + "link": "/using-notify/best-practices/benchmark-performance" } ] %} diff --git a/app/templates/views/using-notify.html b/app/templates/views/using-notify.html index 0679229e7..d0279f446 100644 --- a/app/templates/views/using-notify.html +++ b/app/templates/views/using-notify.html @@ -21,7 +21,6 @@ diff --git a/backstop_data/bitmaps_reference/backstop_test_About_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_About_0_document_0_desktop.png index 6f2fbc850..b972cbd83 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_About_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_About_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Add_Service_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Add_Service_0_document_0_desktop.png index a1eb4e2b1..81fd6f432 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Add_Service_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Add_Service_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Benchmark_Performance_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Benchmark_Performance_0_document_0_desktop.png index f2b2c9e4a..21823dbf5 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Benchmark_Performance_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Benchmark_Performance_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Best_Practices_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Best_Practices_0_document_0_desktop.png index 81c1beaed..ad1e94bf9 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Best_Practices_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Best_Practices_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Clear_Goals_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Clear_Goals_0_document_0_desktop.png index cf18acec9..9abf8e7d7 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Clear_Goals_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Clear_Goals_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Delivery_Status_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Delivery_Status_0_document_0_desktop.png index 21cb94ec4..0b84f40e9 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Delivery_Status_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Delivery_Status_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Establish_Trust_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Establish_Trust_0_document_0_desktop.png index fb31fc2e8..7520a8161 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Establish_Trust_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Establish_Trust_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Features_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Features_0_document_0_desktop.png deleted file mode 100644 index 66009a770..000000000 Binary files a/backstop_data/bitmaps_reference/backstop_test_Features_0_document_0_desktop.png and /dev/null differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Get_Started_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Get_Started_0_document_0_desktop.png index be225111f..a2e8add13 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Get_Started_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Get_Started_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Get_Started_Page_-_Highlight_Trial_Mode_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Get_Started_Page_-_Highlight_Trial_Mode_0_document_0_desktop.png index be225111f..a2e8add13 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Get_Started_Page_-_Highlight_Trial_Mode_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Get_Started_Page_-_Highlight_Trial_Mode_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Guidance_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Guidance_0_document_0_desktop.png index d7a515b0e..7852a4c20 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Guidance_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Guidance_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Multiple_Languages_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Multiple_Languages_0_document_0_desktop.png index 1d91c1966..29c170483 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Multiple_Languages_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Multiple_Languages_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Pricing_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Pricing_0_document_0_desktop.png index 9b158bc0c..a5e001728 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Pricing_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Pricing_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Roadmap_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Roadmap_0_document_0_desktop.png deleted file mode 100644 index dfeecfa2a..000000000 Binary files a/backstop_data/bitmaps_reference/backstop_test_Roadmap_0_document_0_desktop.png and /dev/null differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Rules_And_Regulations_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Rules_And_Regulations_0_document_0_desktop.png index 8a860dfb2..561cc8826 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Rules_And_Regulations_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Rules_And_Regulations_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Support_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Support_0_document_0_desktop.png index c89453061..56357f6cc 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Support_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Support_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Trial_Mode_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Trial_Mode_0_document_0_desktop.png index 6e8d9e068..4aa0584a0 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Trial_Mode_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Trial_Mode_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Write_For_Action_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Write_For_Action_0_document_0_desktop.png index a1ac842f7..6b15b7666 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Write_For_Action_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Write_For_Action_0_document_0_desktop.png differ diff --git a/tests/app/main/views/test_index.py b/tests/app/main/views/test_index.py index 9f5bf51e4..26f3d529a 100644 --- a/tests/app/main/views/test_index.py +++ b/tests/app/main/views/test_index.py @@ -83,8 +83,6 @@ def test_hiding_pages_from_search_engines( [ "privacy", "pricing", - "roadmap", - "features", "documentation", "best_practices", "clear_goals", @@ -93,9 +91,7 @@ def test_hiding_pages_from_search_engines( "write_for_action", "multiple_languages", "benchmark_performance", - "security", "message_status", - "features_sms", "how_to_pay", "get_started", "guidance_index", @@ -162,11 +158,7 @@ def test_guidance_pages_link_to_service_pages_when_signed_in(client_request, moc @pytest.mark.parametrize( ("view", "expected_view"), [ - ("information_risk_management", "security"), ("old_integration_testing", "integration_testing"), - ("old_roadmap", "roadmap"), - ("information_security", "using_notify"), - ("old_using_notify", "using_notify"), ("delivery_and_failure", "message_status"), ("callbacks", "documentation"), ], diff --git a/tests/app/main/views/test_register.py b/tests/app/main/views/test_register.py index b3d70deb5..952aa8211 100644 --- a/tests/app/main/views/test_register.py +++ b/tests/app/main/views/test_register.py @@ -145,10 +145,9 @@ def test_should_return_200_when_email_is_not_gov_uk( ) assert ( - "Enter a public sector email address or find out who can use Notify" + "Enter a public sector email address." in normalize_spaces(page.select_one(".usa-error-message").text) ) - assert page.select_one(".usa-error-message a")["href"] == url_for("main.features") @pytest.mark.parametrize( diff --git a/tests/app/main/views/test_user_profile.py b/tests/app/main/views/test_user_profile.py index 4fd2004cd..0d71b0736 100644 --- a/tests/app/main/views/test_user_profile.py +++ b/tests/app/main/views/test_user_profile.py @@ -84,7 +84,7 @@ def test_should_redirect_after_email_change( [ ( "me@example.com", - "Enter a public sector email address or find out who can use Notify", + "Enter a public sector email address.", ), ( "not_valid", diff --git a/urls.js b/urls.js index c6db0795e..767c8f0fd 100644 --- a/urls.js +++ b/urls.js @@ -8,29 +8,26 @@ const sublinks = [ { label: 'Trial Mode', path: '/using-notify/trial-mode' }, { label: 'Pricing', path: '/using-notify/pricing' }, { label: 'Delivery Status', path: '/using-notify/delivery-status' }, - { label: 'Guidance', path: '/guides/using-notify/guidance' }, - { label: 'Features', path: '/features' }, - { label: 'Roadmap', path: '/features/roadmap' }, - { label: 'Security', path: '/features/security' }, + { label: 'Guidance', path: '/using-notify/guidance' }, { label: 'Support', path: '/support' }, - { label: 'Best Practices', path: '/guides/best-practices' }, - { label: 'Clear Goals', path: '/guides/clear-goals' }, + { label: 'Best Practices', path: '/using-notify/best-practices' }, + { label: 'Clear Goals', path: '/using-notify/best-practices/clear-goals' }, { label: 'Rules And Regulations', - path: '/guides/rules-and-regulations', + path: '/using-notify/best-practices//rules-and-regulations', }, - { label: 'Establish Trust', path: '/guides/establish-trust' }, + { label: 'Establish Trust', path: '/using-notify/best-practices//establish-trust' }, { label: 'Write For Action', - path: '/guides/write-for-action', + path: '/using-notify/best-practices//write-for-action', }, { label: 'Multiple Languages', - path: '/guides/multiple-languages', + path: '/using-notify/best-practices//multiple-languages', }, { label: 'Benchmark Performance', - path: '/guides/benchmark-performance', + path: '/using-notify/best-practices//benchmark-performance', }, { label: 'About',