mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 18:37:33 -04:00
Updates to dashboard and py tests for dashboard
This commit is contained in:
@@ -128,16 +128,6 @@
|
|||||||
|
|
||||||
<h2>Recent templates</h2>
|
<h2>Recent templates</h2>
|
||||||
{{ ajax_block(partials, updates_url, 'template-statistics') }}
|
{{ ajax_block(partials, updates_url, 'template-statistics') }}
|
||||||
{% if current_user.has_permissions('manage_service') %}
|
|
||||||
<h3 class='margin-bottom-0' id="current-year"></h3>
|
|
||||||
{{ ajax_block(partials, updates_url, 'usage') }}
|
|
||||||
<p class="margin-top-0">During the pilot period, each service has an allowance of 250,000 message parts. Once this allowance is met, the
|
|
||||||
application will stop delivering messages. There's no monthly charge, no setup fee, and no procurement cost.</p>
|
|
||||||
<p class="align-with-heading-copy">
|
|
||||||
What counts as 1 text message part?<br />
|
|
||||||
See <a class="usa-link" href="{{ url_for('.pricing') }}">pricing</a>.
|
|
||||||
</p>
|
|
||||||
{% endif %} #}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -595,10 +595,11 @@ def test_should_show_recent_templates_on_dashboard(
|
|||||||
]
|
]
|
||||||
assert "Total Messages" in headers
|
assert "Total Messages" in headers
|
||||||
|
|
||||||
table_rows = page.find_all("tbody")[1].find_all("tr")
|
table_rows = page.find_all("tbody")[0].find_all("tr")
|
||||||
|
|
||||||
assert len(table_rows) == 2
|
assert len(table_rows) == 2
|
||||||
|
|
||||||
|
|
||||||
assert "two" in table_rows[0].find_all("td")[0].text
|
assert "two" in table_rows[0].find_all("td")[0].text
|
||||||
assert "Email template" in table_rows[0].find_all("td")[0].text
|
assert "Email template" in table_rows[0].find_all("td")[0].text
|
||||||
assert "200" in table_rows[0].find_all("td")[1].text
|
assert "200" in table_rows[0].find_all("td")[1].text
|
||||||
@@ -1359,18 +1360,11 @@ def test_menu_all_services_for_platform_admin_user(
|
|||||||
page = _test_dashboard_menu(
|
page = _test_dashboard_menu(
|
||||||
client_request, mocker, platform_admin_user, service_one, []
|
client_request, mocker, platform_admin_user, service_one, []
|
||||||
)
|
)
|
||||||
|
print(page)
|
||||||
page = str(page)
|
page = str(page)
|
||||||
assert url_for("main.choose_template", service_id=service_one["id"]) in page
|
assert url_for("main.choose_template", service_id=service_one["id"]) in page
|
||||||
# assert url_for("main.manage_users", service_id=service_one["id"]) in page
|
assert url_for("main.service_settings", service_id=service_one["id"]) in page
|
||||||
# assert url_for("main.service_settings", service_id=service_one["id"]) in page
|
assert url_for('main.api_keys', service_id=service_one['id']) not in page
|
||||||
# assert url_for('main.view_notifications', service_id=service_one['id'], message_type='email') in page
|
|
||||||
assert (
|
|
||||||
url_for(
|
|
||||||
"main.view_notifications", service_id=service_one["id"], message_type="sms"
|
|
||||||
)
|
|
||||||
in page
|
|
||||||
)
|
|
||||||
# assert url_for('main.api_keys', service_id=service_one['id']) not in page
|
|
||||||
|
|
||||||
|
|
||||||
def test_route_for_service_permissions(
|
def test_route_for_service_permissions(
|
||||||
|
|||||||
Reference in New Issue
Block a user