mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-02 04:39:25 -04:00
Fixing unit tests
This commit is contained in:
@@ -9,56 +9,4 @@
|
||||
|
||||
{{ page_header('How to pay') }}
|
||||
|
||||
<!-- <p>
|
||||
If you use Notify.gov to send text messages, you may need to send us a <a class="usa-link" href="#purchase-orders">purchase order</a>.
|
||||
</p>
|
||||
|
||||
<h2 class="font-body-lg" id="invoices">
|
||||
Invoices
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
Notify is run by the Government Digital Service (GDS), part of the Cabinet Office.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The Cabinet Office will send your organization an invoice each quarter if you:
|
||||
</p>
|
||||
|
||||
<ul class="list list-bullet">
|
||||
<li>exceed the <a class="usa-link" href="{{ url_for('.pricing') }}">free text message allowance</a></li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
If your organization has more than one Notify service, you’ll see a breakdown of each service on your invoice.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If the value of an invoice is less than £250 (before <abbr title="Value Added Tax">VAT</abbr>), it will be added to the total for the next quarter to save time and effort.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
You can pay by BACS, debit card, or credit card.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Please start your payment reference with the invoice number.
|
||||
</p>
|
||||
|
||||
<h2 class="font-body-lg" id="purchase-orders">
|
||||
Purchase orders
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
If your organization’s total estimated spend is more than £500 per quarter (before <abbr title="Value Added Tax">VAT</abbr>), you need to raise a purchase order (PO).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Your organization should raise a single <abbr title="purchase order">PO</abbr> for the estimated cost of all its services. You can update the <abbr title="purchase order">PO</abbr> any time if your usage increases.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Your organization may need to <a class="usa-link" href="{{ url_for('main.billing_details') }}">add the Cabinet Office as a supplier</a> before you can raise a <abbr title="purchase order">PO</abbr>.
|
||||
</p> -->
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="grid-col-12">
|
||||
<h2 class="font-body-2xl line-height-sans-2 margin-0" id="page-title">{{page_title}}</h2>
|
||||
<h1 class="font-body-2xl line-height-sans-2 margin-0" id="page-title">{{page_title}}</h1>
|
||||
<div class="grid-row">
|
||||
<div class="{% if current_user.has_permissions(ServicePermission.MANAGE_TEMPLATES) and current_template_folder_id and user_has_template_folder_permission %}grid-col-10{% else %}grid-col-12{% endif %}">
|
||||
<p class="margin-bottom-4" id="page-description">
|
||||
|
||||
@@ -181,6 +181,7 @@ def test_service_user_without_manage_service_permission_can_see_usage_page_when_
|
||||
"main.usage",
|
||||
service_id=SERVICE_ONE_ID,
|
||||
_expected_status=expected_status,
|
||||
_test_page_title=False if expected_status == 403 else True,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ def test_organization_page_shows_all_organizations(
|
||||
"app.models.organization.AllOrganizations.client_method", return_value=orgs
|
||||
)
|
||||
client_request.login(platform_admin_user)
|
||||
page = client_request.get(".organizations")
|
||||
page = client_request.get("main.organizations")
|
||||
|
||||
assert normalize_spaces(page.select_one("h1").text) == "Organizations"
|
||||
|
||||
@@ -59,7 +59,7 @@ def test_organization_page_shows_all_organizations(
|
||||
),
|
||||
]
|
||||
|
||||
archived = page.select_one(".table-field-status-default.heading-medium")
|
||||
archived = page.select_one(".table-field-status-default.font-heading-lg")
|
||||
assert normalize_spaces(archived.text) == "- archived"
|
||||
assert normalize_spaces(archived.parent.text) == "Test 2 - archived 2 live services"
|
||||
|
||||
|
||||
@@ -25,13 +25,10 @@ def test_should_show_api_page(
|
||||
service_id=SERVICE_ONE_ID,
|
||||
)
|
||||
assert page.h1.string.strip() == "API integration"
|
||||
rows = page.find_all("details")
|
||||
rows = page.find_all("div", {"class": "usa-accordion api-notifications-item"})
|
||||
assert len(rows) == 5
|
||||
for row in rows:
|
||||
assert (
|
||||
row.select("h3 .govuk-details__summary-text")[0].string.strip()
|
||||
== "2021234567"
|
||||
)
|
||||
assert row.select("button span")[0].string.strip() == "2021234567"
|
||||
|
||||
|
||||
def test_should_show_api_page_with_lots_of_notifications(
|
||||
|
||||
@@ -277,7 +277,7 @@ def test_conversation_reply_shows_link_to_add_templates_if_service_has_no_templa
|
||||
service_id=SERVICE_ONE_ID,
|
||||
notification_id=fake_uuid,
|
||||
)
|
||||
page_text = page.find("p", class_="bottom-gutter").text
|
||||
page_text = page.find("p", class_="margin-bottom-3").text
|
||||
link = page.find("a", text=re.compile("Add a new template"))["href"]
|
||||
|
||||
assert (
|
||||
|
||||
@@ -97,8 +97,8 @@ def test_history(
|
||||
|
||||
assert page.select_one("h1").text == "Audit events"
|
||||
|
||||
headings = page.select("main h2.heading-small")
|
||||
events = page.select("main ul.bottom-gutter")
|
||||
headings = page.select("main h2.font-heading-md")
|
||||
events = page.select("main ul.margin-bottom-3")
|
||||
|
||||
assert len(headings) == len(events) == len(expected_headings_and_events)
|
||||
|
||||
|
||||
@@ -103,7 +103,6 @@ def test_hiding_pages_from_search_engines(
|
||||
"create_and_send_messages",
|
||||
"edit_and_format_messages",
|
||||
"send_files_by_email",
|
||||
"billing_details",
|
||||
],
|
||||
)
|
||||
def test_static_pages(client_request, mock_get_organization_by_domain, view, mocker):
|
||||
|
||||
Reference in New Issue
Block a user