mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Fixing tests
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<div class='grid-row grid-gap ajax-block-container'>
|
<div class='grid-row grid-gap ajax-block-container'>
|
||||||
<div class='grid-col-12'>
|
<div class='grid-col-12'>
|
||||||
|
|
||||||
<table class="usa-table usa-table--borderless margin-bottom-5">
|
<table class="usa-table usa-table--borderless margin-top-1 margin-bottom-5">
|
||||||
<caption class="usa-sr-only">
|
<caption class="usa-sr-only">
|
||||||
Daily
|
Daily
|
||||||
</caption>
|
</caption>
|
||||||
|
|||||||
@@ -30,10 +30,10 @@
|
|||||||
|
|
||||||
{{ ajax_block(partials, updates_url, 'template-statistics') }}
|
{{ ajax_block(partials, updates_url, 'template-statistics') }}
|
||||||
|
|
||||||
<h2 class="margin-bottom-1">Usage</h2>
|
<h2 class="margin-top-4 margin-bottom-1">Usage</h2>
|
||||||
<h3 class="margin-bottom-0">Daily</h3>
|
<h3 class="margin-bottom-0">Daily</h3>
|
||||||
<p class="margin-0">Across all services</p>
|
<p class="margin-0">Across all services</p>
|
||||||
<table class="usa-table usa-table--borderless margin-bottom-5">
|
<table class="usa-table usa-table--borderless margin-top-1 margin-bottom-5">
|
||||||
<caption class="usa-sr-only">
|
<caption class="usa-sr-only">
|
||||||
Daily
|
Daily
|
||||||
</caption>
|
</caption>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
{% if current_user.has_permissions('manage_service') %}
|
{% if current_user.has_permissions('manage_service') %}
|
||||||
<h3 class='font-body-md margin-bottom-1'>2023</h3>
|
<h3 class='font-body-md margin-bottom-0'>2023</h3>
|
||||||
{{ ajax_block(partials, updates_url, 'usage') }}
|
{{ ajax_block(partials, updates_url, 'usage') }}
|
||||||
{{ show_more(
|
{{ show_more(
|
||||||
url_for(".usage", service_id=current_service['id']),
|
url_for(".usage", service_id=current_service['id']),
|
||||||
|
|||||||
@@ -471,7 +471,7 @@ def test_should_show_recent_templates_on_dashboard(
|
|||||||
headers = [
|
headers = [
|
||||||
header.text.strip() for header in page.find_all("h2") + page.find_all("h1")
|
header.text.strip() for header in page.find_all("h2") + page.find_all("h1")
|
||||||
]
|
]
|
||||||
assert "In the last seven days" in headers
|
assert "Messages sent" in headers
|
||||||
|
|
||||||
table_rows = page.find_all("tbody")[0].find_all("tr")
|
table_rows = page.find_all("tbody")[0].find_all("tr")
|
||||||
|
|
||||||
@@ -1522,6 +1522,8 @@ def test_service_dashboard_shows_usage(
|
|||||||
page = client_request.get("main.service_dashboard", service_id=SERVICE_ONE_ID)
|
page = client_request.get("main.service_dashboard", service_id=SERVICE_ONE_ID)
|
||||||
|
|
||||||
assert normalize_spaces(page.select_one("[data-key=usage]").text) == (
|
assert normalize_spaces(page.select_one("[data-key=usage]").text) == (
|
||||||
|
"Daily Usage Remaining "
|
||||||
|
"40,000 "
|
||||||
"$29.85 "
|
"$29.85 "
|
||||||
"spent on text messages"
|
"spent on text messages"
|
||||||
# Disabled for pilot
|
# Disabled for pilot
|
||||||
@@ -1556,4 +1558,4 @@ def test_service_dashboard_shows_free_allowance(
|
|||||||
|
|
||||||
usage_text = normalize_spaces(page.select_one("[data-key=usage]").text)
|
usage_text = normalize_spaces(page.select_one("[data-key=usage]").text)
|
||||||
assert "spent on text messages" not in usage_text
|
assert "spent on text messages" not in usage_text
|
||||||
assert "249,000 free text messages left" in usage_text
|
assert "Daily Usage Remaining -209,000 249,000" in usage_text
|
||||||
|
|||||||
Reference in New Issue
Block a user