mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-11 21:01:06 -04:00
We have a `client_request` fixture which does a bunch of useful stuff
like:
- checking the status code of the response
- returning a `BeautifulSoup` object
Lots of our tests still use an older fixture called `client`. This is
not as good because it:
- returns a raw `Response` object
- doesn’t do the additional checks
- means our tests contain a lot of repetetive boilerplate like `page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')`
This commit converts all the tests which had a `client.get(…)` or
`client.post(…)` statement to use their equivalents on `client_request`
instead.
Subsequent commits will remove uses of `client` in other tests, but
doing it this way means the work can be broken up into more manageable
chunks.
32 lines
926 B
HTML
32 lines
926 B
HTML
{% extends "withoutnav_template.html" %}
|
||
{% from "components/page-footer.html" import page_footer %}
|
||
{% from "components/form.html" import form_wrapper %}
|
||
|
||
{% block per_page_title %}
|
||
Check your phone
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
|
||
<div class="govuk-grid-row">
|
||
<div class="govuk-grid-column-two-thirds">
|
||
<h1 class="heading-large">Check your phone</h1>
|
||
|
||
<p class="govuk-body">We’ve sent you a text message with a security code.</p>
|
||
|
||
{% call form_wrapper(class="extra-tracking") %}
|
||
{{ form.sms_code(param_extensions={
|
||
"classes": "govuk-input govuk-input--width-5",
|
||
"attributes": {"data-module": "autofocus"}
|
||
}) }}
|
||
{{ page_footer(
|
||
"Continue",
|
||
secondary_link=url_for('main.check_and_resend_text_code', next=redirect_url),
|
||
secondary_link_text='Not received a text message?'
|
||
) }}
|
||
{% endcall %}
|
||
</div>
|
||
</div>
|
||
|
||
{% endblock %}
|