mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 02:23:11 -04:00
Committing before merge
This commit is contained in:
@@ -227,7 +227,7 @@ def terms():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@main.route("/features/using-notify")
|
@main.route("/features/using_notify")
|
||||||
@user_is_logged_in
|
@user_is_logged_in
|
||||||
def using_notify():
|
def using_notify():
|
||||||
return (
|
return (
|
||||||
@@ -236,7 +236,7 @@ def using_notify():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@main.route("/using-notify/delivery-status")
|
@main.route("/using_notify/delivery-status")
|
||||||
@user_is_logged_in
|
@user_is_logged_in
|
||||||
def message_status():
|
def message_status():
|
||||||
return render_template(
|
return render_template(
|
||||||
@@ -251,7 +251,7 @@ def get_started_old():
|
|||||||
return redirect(url_for(".get_started"), 301)
|
return redirect(url_for(".get_started"), 301)
|
||||||
|
|
||||||
|
|
||||||
@main.route("/using-notify/get-started")
|
@main.route("/using_notify/get-started")
|
||||||
@user_is_logged_in
|
@user_is_logged_in
|
||||||
def get_started():
|
def get_started():
|
||||||
return render_template(
|
return render_template(
|
||||||
@@ -260,7 +260,7 @@ def get_started():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@main.route("/using-notify/who-its-for")
|
@main.route("/using_notify/who-its-for")
|
||||||
def who_its_for():
|
def who_its_for():
|
||||||
return redirect(url_for(".features"), 301)
|
return redirect(url_for(".features"), 301)
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ def trial_mode():
|
|||||||
return redirect(url_for(".trial_mode_new"), 301)
|
return redirect(url_for(".trial_mode_new"), 301)
|
||||||
|
|
||||||
|
|
||||||
@main.route("/using-notify/trial-mode")
|
@main.route("/using_notify/trial-mode")
|
||||||
def trial_mode_new():
|
def trial_mode_new():
|
||||||
return render_template(
|
return render_template(
|
||||||
"views/trial-mode.html",
|
"views/trial-mode.html",
|
||||||
@@ -279,7 +279,7 @@ def trial_mode_new():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@main.route("/using-notify/guidance")
|
@main.route("/using_notify/guidance")
|
||||||
@user_is_logged_in
|
@user_is_logged_in
|
||||||
def guidance_index():
|
def guidance_index():
|
||||||
return render_template(
|
return render_template(
|
||||||
@@ -288,7 +288,7 @@ def guidance_index():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@main.route("/using-notify/guidance/branding-and-customisation")
|
@main.route("/using_notify/guidance/branding-and-customisation")
|
||||||
@user_is_logged_in
|
@user_is_logged_in
|
||||||
def branding_and_customisation():
|
def branding_and_customisation():
|
||||||
return render_template(
|
return render_template(
|
||||||
@@ -297,7 +297,7 @@ def branding_and_customisation():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@main.route("/using-notify/guidance/create-and-send-messages")
|
@main.route("/using_notify/guidance/create-and-send-messages")
|
||||||
@user_is_logged_in
|
@user_is_logged_in
|
||||||
def create_and_send_messages():
|
def create_and_send_messages():
|
||||||
return render_template(
|
return render_template(
|
||||||
@@ -306,7 +306,7 @@ def create_and_send_messages():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@main.route("/using-notify/guidance/edit-and-format-messages")
|
@main.route("/using_notify/guidance/edit-and-format-messages")
|
||||||
@user_is_logged_in
|
@user_is_logged_in
|
||||||
def edit_and_format_messages():
|
def edit_and_format_messages():
|
||||||
return render_template(
|
return render_template(
|
||||||
@@ -315,7 +315,7 @@ def edit_and_format_messages():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@main.route("/using-notify/guidance/send-files-by-email")
|
@main.route("/using_notify/guidance/send-files-by-email")
|
||||||
@user_is_logged_in
|
@user_is_logged_in
|
||||||
def send_files_by_email():
|
def send_files_by_email():
|
||||||
return render_template(
|
return render_template(
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ class HeaderNavigation(Navigation):
|
|||||||
"message_status",
|
"message_status",
|
||||||
"guidance_index",
|
"guidance_index",
|
||||||
},
|
},
|
||||||
|
"accounts-or-dashboard": {
|
||||||
|
},
|
||||||
"pricing": {
|
"pricing": {
|
||||||
"how_to_pay",
|
"how_to_pay",
|
||||||
"billing_details",
|
"billing_details",
|
||||||
|
|||||||
@@ -75,6 +75,11 @@
|
|||||||
] %}
|
] %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set navigation = [
|
{% 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'),
|
"href": url_for('main.get_started'),
|
||||||
"text": "Using Notify",
|
"text": "Using Notify",
|
||||||
@@ -92,7 +97,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"href": url_for('main.user_profile'),
|
"href": url_for('main.user_profile'),
|
||||||
"text": current_user.name,
|
"text": "User Profile",
|
||||||
"active": header_navigation.is_selected('user-profile')
|
"active": header_navigation.is_selected('user-profile')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
<div class="navigation-service margin-top-2 display-flex flex-align-end flex-justify border-bottom padding-bottom-1">
|
<div class="navigation-service margin-top-5 display-flex flex-align-end flex-justify border-bottom padding-bottom-1">
|
||||||
{% if current_service.organization_id %}
|
{% if current_service.organization_id %}
|
||||||
{% if current_user.platform_admin or
|
{% if current_user.platform_admin or
|
||||||
(current_user.belongs_to_organization(current_service.organization_id) and current_service.live) %}
|
(current_user.belongs_to_organization(current_service.organization_id) and current_service.live) %}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<h2 class="font-body-lg">Get started</h2>
|
<h2 class="font-body-lg margin-top-0 margin-bottom-1">Get started</h2>
|
||||||
<a class="usa-button" href="{{ url_for('.choose_template', service_id=current_service.id) }}">
|
<a class="usa-button margin-bottom-5" href="{{ url_for('.choose_template', service_id=current_service.id) }}">
|
||||||
Create your first template
|
Create your first template
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -3,16 +3,16 @@
|
|||||||
{% from "components/table.html" import mapping_table, row, text_field, optional_text_field, edit_field, field, boolean_field with context %}
|
{% from "components/table.html" import mapping_table, row, text_field, optional_text_field, edit_field, field, boolean_field with context %}
|
||||||
|
|
||||||
{% block per_page_title %}
|
{% block per_page_title %}
|
||||||
Your profile
|
User profile
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block maincolumn_content %}
|
{% block maincolumn_content %}
|
||||||
|
|
||||||
<h1 class="font-body-2xl margin-bottom-3">Your profile</h1>
|
<h1 class="font-body-2xl margin-bottom-3">User profile</h1>
|
||||||
|
|
||||||
<div class="body-copy-table">
|
<div class="body-copy-table">
|
||||||
{% call mapping_table(
|
{% call mapping_table(
|
||||||
caption='Your profile',
|
caption='User profile',
|
||||||
field_headings_visible=False,
|
field_headings_visible=False,
|
||||||
caption_visible=False
|
caption_visible=False
|
||||||
) %}
|
) %}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
{% block beforeContent %}
|
{% block beforeContent %}
|
||||||
{% if current_service and current_service.active and current_user.is_authenticated and current_user.belongs_to_service(current_service.id) %}
|
{% if current_service and current_service.active and current_user.is_authenticated and current_user.belongs_to_service(current_service.id) %}
|
||||||
<div class="navigation-service usa-breadcrumb">
|
<!-- <div class="navigation-service usa-breadcrumb">
|
||||||
<a href="{{ url_for('main.show_accounts_or_dashboard') }}" class="usa-link usa-breadcrumb__link usa-breadcrumb-back-to">Back to {{ current_service.name }}</a>
|
<a href="{{ url_for('main.show_accounts_or_dashboard') }}" class="usa-link usa-breadcrumb__link usa-breadcrumb-back-to">Back to {{ current_service.name }}</a>
|
||||||
</div>
|
</div> -->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block backLink %}{% endblock %}
|
{% block backLink %}{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -256,21 +256,23 @@ def test_choose_account_should_should_organizations_link_for_platform_admin(
|
|||||||
] == expected_headings
|
] == expected_headings
|
||||||
|
|
||||||
|
|
||||||
def test_choose_account_should_show_back_to_service_link(
|
# Moving the back to service link into the top navigation
|
||||||
client_request,
|
|
||||||
mock_get_orgs_and_services,
|
|
||||||
mock_get_organization,
|
|
||||||
mock_get_organization_services,
|
|
||||||
):
|
|
||||||
resp = client_request.get("main.choose_account")
|
|
||||||
|
|
||||||
service_navigation = resp.find(
|
# def test_choose_account_should_show_back_to_service_link(
|
||||||
"div", {"class": "navigation-service usa-breadcrumb"}
|
# client_request,
|
||||||
)
|
# mock_get_orgs_and_services,
|
||||||
back_to_service_link = service_navigation.a
|
# mock_get_organization,
|
||||||
|
# mock_get_organization_services,
|
||||||
|
# ):
|
||||||
|
# resp = client_request.get("main.choose_account")
|
||||||
|
|
||||||
assert back_to_service_link["href"] == url_for("main.show_accounts_or_dashboard")
|
# service_navigation = resp.find(
|
||||||
assert back_to_service_link.text == "Back to service one"
|
# "div", {"class": "navigation-service usa-breadcrumb"}
|
||||||
|
# )
|
||||||
|
# back_to_service_link = service_navigation.a
|
||||||
|
|
||||||
|
# assert back_to_service_link["href"] == url_for("main.show_accounts_or_dashboard")
|
||||||
|
# assert back_to_service_link.text == "Back to service one"
|
||||||
|
|
||||||
|
|
||||||
def test_choose_account_should_not_show_back_to_service_link_if_no_service_in_session(
|
def test_choose_account_should_not_show_back_to_service_link_if_no_service_in_session(
|
||||||
@@ -322,7 +324,7 @@ def test_choose_account_should_not_show_back_to_service_link_if_service_archived
|
|||||||
|
|
||||||
assert normalize_spaces(page.select_one("h1").text) == "Choose service"
|
assert normalize_spaces(page.select_one("h1").text) == "Choose service"
|
||||||
if active:
|
if active:
|
||||||
assert page.select_one(".navigation-service a") is not None
|
assert page.select_one(".navigation-service a") is None
|
||||||
else:
|
else:
|
||||||
assert page.select_one(".navigation-service a") is None
|
assert page.select_one(".navigation-service a") is None
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ def test_should_show_overview_page(
|
|||||||
client_request,
|
client_request,
|
||||||
):
|
):
|
||||||
page = client_request.get("main.user_profile")
|
page = client_request.get("main.user_profile")
|
||||||
assert page.select_one("h1").text.strip() == "Your profile"
|
assert page.select_one("h1").text.strip() == "User profile"
|
||||||
assert "Use platform admin view" not in page
|
assert "Use platform admin view" not in page
|
||||||
assert "Security keys" not in page
|
assert "Security keys" not in page
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ def test_overview_page_shows_disable_for_platform_admin(
|
|||||||
):
|
):
|
||||||
client_request.login(platform_admin_user)
|
client_request.login(platform_admin_user)
|
||||||
page = client_request.get("main.user_profile")
|
page = client_request.get("main.user_profile")
|
||||||
assert page.select_one("h1").text.strip() == "Your profile"
|
assert page.select_one("h1").text.strip() == "User profile"
|
||||||
disable_platform_admin_row = page.select_one("#disable-platform-admin")
|
disable_platform_admin_row = page.select_one("#disable-platform-admin")
|
||||||
assert (
|
assert (
|
||||||
" ".join(disable_platform_admin_row.text.split())
|
" ".join(disable_platform_admin_row.text.split())
|
||||||
@@ -365,7 +365,7 @@ def test_non_gov_user_cannot_see_change_email_link(
|
|||||||
client_request.login(api_nongov_user_active)
|
client_request.login(api_nongov_user_active)
|
||||||
page = client_request.get("main.user_profile")
|
page = client_request.get("main.user_profile")
|
||||||
assert not page.find("a", {"href": url_for("main.user_profile_email")})
|
assert not page.find("a", {"href": url_for("main.user_profile_email")})
|
||||||
assert page.select_one("h1").text.strip() == "Your profile"
|
assert page.select_one("h1").text.strip() == "User profile"
|
||||||
|
|
||||||
|
|
||||||
def test_non_gov_user_cannot_access_change_email_page(
|
def test_non_gov_user_cannot_access_change_email_page(
|
||||||
|
|||||||
Reference in New Issue
Block a user