mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 08:44:23 -04:00
Adjusting tests
This commit is contained in:
@@ -197,7 +197,7 @@ def test_should_show_live_search_if_more_than_7_users(
|
|||||||
"usa-input",
|
"usa-input",
|
||||||
]
|
]
|
||||||
assert (
|
assert (
|
||||||
normalize_spaces(page.select_one("label[for=search]").text)
|
normalize_spaces(page.select_one("label:contains('Search by')").text)
|
||||||
== "Search by name or email address"
|
== "Search by name or email address"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -366,6 +366,8 @@ def test_user_with_no_mobile_number_cant_be_set_to_sms_auth(
|
|||||||
user_id=sample_uuid(),
|
user_id=sample_uuid(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sms_auth_radio_button = page.select_one('input[value="sms_auth"]')
|
sms_auth_radio_button = page.select_one('input[value="sms_auth"]')
|
||||||
assert sms_auth_radio_button.has_attr("disabled") == sms_option_disabled
|
assert sms_auth_radio_button.has_attr("disabled") == sms_option_disabled
|
||||||
assert normalize_spaces(
|
assert normalize_spaces(
|
||||||
@@ -445,9 +447,11 @@ def test_invite_user_has_correct_email_field(
|
|||||||
platform_admin_user,
|
platform_admin_user,
|
||||||
):
|
):
|
||||||
client_request.login(platform_admin_user)
|
client_request.login(platform_admin_user)
|
||||||
|
page = client_request.get("main.invite_user", service_id=SERVICE_ONE_ID)
|
||||||
|
print(page.prettify()) # Print the full HTML response
|
||||||
email_field = client_request.get(
|
email_field = client_request.get(
|
||||||
"main.invite_user", service_id=SERVICE_ONE_ID
|
"main.invite_user", service_id=SERVICE_ONE_ID
|
||||||
).select_one("#email_address")
|
).select_one("#email-address")
|
||||||
assert email_field["spellcheck"] == "false"
|
assert email_field["spellcheck"] == "false"
|
||||||
assert "autocomplete" not in email_field
|
assert "autocomplete" not in email_field
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ def test_render_register_returns_template_with_form(client_request, mocker):
|
|||||||
page = client_request.get_url("/register")
|
page = client_request.get_url("/register")
|
||||||
|
|
||||||
assert page.find("input", attrs={"name": "auth_type"}).attrs["value"] == "sms_auth"
|
assert page.find("input", attrs={"name": "auth_type"}).attrs["value"] == "sms_auth"
|
||||||
assert page.select_one("#email_address")["spellcheck"] == "false"
|
assert page.select_one("#email-address")["spellcheck"] == "false"
|
||||||
assert page.select_one("#email_address")["autocomplete"] == "email"
|
assert page.select_one("#email-address")["autocomplete"] == "email"
|
||||||
assert page.select_one("#password")["autocomplete"] == "new-password"
|
assert page.select_one("#password")["autocomplete"] == "new-password"
|
||||||
assert "Create an account" in page.text
|
assert "Create an account" in page.text
|
||||||
|
|
||||||
|
|||||||
@@ -1519,9 +1519,11 @@ def test_link_to_upload_not_offered_when_entering_personalisation(
|
|||||||
step_index=1,
|
step_index=1,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# print(page.prettify()) # Print the full HTML response
|
||||||
|
|
||||||
# We’re entering personalization
|
# We’re entering personalization
|
||||||
assert page.select_one("input[type=text]")["name"] == "placeholder_value"
|
assert page.select_one("input[type=text]")["name"] == "placeholder_value"
|
||||||
assert page.select_one("label[for=phone-number]").text.strip() == "name"
|
assert page.select_one("label").text.strip() == "name"
|
||||||
# No ‘Upload’ link shown
|
# No ‘Upload’ link shown
|
||||||
assert len(page.select("main a")) == 0
|
assert len(page.select("main a")) == 0
|
||||||
assert "Upload" not in page.select_one("main").text
|
assert "Upload" not in page.select_one("main").text
|
||||||
|
|||||||
Reference in New Issue
Block a user