mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 07:18:26 -04:00
Fixed test
This commit is contained in:
@@ -555,7 +555,7 @@
|
|||||||
"filename": "tests/app/main/views/test_register.py",
|
"filename": "tests/app/main/views/test_register.py",
|
||||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||||
"is_verified": false,
|
"is_verified": false,
|
||||||
"line_number": 201,
|
"line_number": 200,
|
||||||
"is_secret": false
|
"is_secret": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -563,7 +563,7 @@
|
|||||||
"filename": "tests/app/main/views/test_register.py",
|
"filename": "tests/app/main/views/test_register.py",
|
||||||
"hashed_secret": "bb5b7caa27d005d38039e3797c3ddb9bcd22c3c8",
|
"hashed_secret": "bb5b7caa27d005d38039e3797c3ddb9bcd22c3c8",
|
||||||
"is_verified": false,
|
"is_verified": false,
|
||||||
"line_number": 274,
|
"line_number": 273,
|
||||||
"is_secret": false
|
"is_secret": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -684,5 +684,5 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"generated_at": "2025-01-12T22:42:11Z"
|
"generated_at": "2025-01-13T20:16:58Z"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,20 +35,13 @@ class CsvFileValidator:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class ValidGovEmail:
|
class ValidGovEmail:
|
||||||
def __call__(self, form, field):
|
def __call__(self, form, field):
|
||||||
if field.data == "":
|
if field.data == "":
|
||||||
return
|
return
|
||||||
|
|
||||||
from flask import url_for
|
message = "Enter a public sector email address."
|
||||||
|
|
||||||
message = """
|
|
||||||
Enter a public sector email address or
|
|
||||||
<a class="usa-link" href="{}">find out who can use Notify</a>
|
|
||||||
""".format(
|
|
||||||
url_for("main.features")
|
|
||||||
)
|
|
||||||
if not is_gov_user(field.data.lower()):
|
if not is_gov_user(field.data.lower()):
|
||||||
raise ValidationError(message)
|
raise ValidationError(message)
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,8 @@
|
|||||||
|
|
||||||
<h1 class="font-body-2xl">Features</h1>
|
<h1 class="font-body-2xl">Features</h1>
|
||||||
<p class="usa-body">If you work for the government, you can use Notify.gov to keep your users updated.</p>
|
<p class="usa-body">If you work for the government, you can use Notify.gov to keep your users updated.</p>
|
||||||
<p class="usa-body">Notify makes it easy to create, customize, and send <a class="usa-link" href="{{ url_for('main.features_sms') }}">text messages</a>.</p>
|
<p class="usa-body">Notify makes it easy to create, customize, and send text messages</a>.</p>
|
||||||
<!-- <ul class="list list-bullet">
|
|
||||||
<li><a class="usa-link" href="{{ url_for('main.features_sms') }}">text messages</a></li>
|
|
||||||
</ul> -->
|
|
||||||
<p class="usa-body">You do not need any technical knowledge to use Notify.</p>
|
<p class="usa-body">You do not need any technical knowledge to use Notify.</p>
|
||||||
{% if not current_user.is_authenticated %}
|
{% if not current_user.is_authenticated %}
|
||||||
<p class="usa-body"><a class="usa-link" href="{{ url_for('main.register') }}">Create an account</a> for free and try it yourself.</p>
|
<p class="usa-body"><a class="usa-link" href="{{ url_for('main.register') }}">Create an account</a> for free and try it yourself.</p>
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
<ul class="list list-bullet">
|
<ul class="list list-bullet">
|
||||||
<li><a class="usa-link" href="{{ url_for('main.trial_mode_new') }}">trial mode</a></li>
|
<li><a class="usa-link" href="{{ url_for('main.trial_mode_new') }}">trial mode</a></li>
|
||||||
<li><a class="usa-link" href="{{ url_for('main.message_status') }}">message status types</a></li>
|
<li><a class="usa-link" href="{{ url_for('main.message_status') }}">message status types</a></li>
|
||||||
<li><a class="usa-link" href="{{ url_for('main.features_sms') }}">text message replies</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -148,7 +148,6 @@ def test_should_return_200_when_email_is_not_gov_uk(
|
|||||||
"Enter a public sector email address or find out who can use Notify"
|
"Enter a public sector email address or find out who can use Notify"
|
||||||
in normalize_spaces(page.select_one(".usa-error-message").text)
|
in normalize_spaces(page.select_one(".usa-error-message").text)
|
||||||
)
|
)
|
||||||
assert page.select_one(".usa-error-message a")["href"] == url_for("main.features")
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
|
|||||||
Reference in New Issue
Block a user