fixed testing

This commit is contained in:
Beverly Nguyen
2024-12-18 15:30:48 -08:00
parent 1df019e78c
commit 1e261fd353
4 changed files with 7 additions and 5 deletions

View File

@@ -483,7 +483,7 @@ def send_one_off_step(service_id, template_id, step_index):
link_to_upload=( link_to_upload=(
request.endpoint == "main.send_one_off_step" and step_index == 0 request.endpoint == "main.send_one_off_step" and step_index == 0
), ),
errors=form.errors if form.errors else None errors=form.errors if form.errors else None,
) )

View File

@@ -33,7 +33,8 @@
{{ form.name(param_extensions={ {{ form.name(param_extensions={
"extra_form_group_classes": "margin-bottom-2", "extra_form_group_classes": "margin-bottom-2",
"id": "name", "id": "name",
"required": True "required": True,
"hint": {"text": "Your recipients will not see this"}
}) }} }) }}
{{ textbox( {{ textbox(
form.template_content, form.template_content,
@@ -53,7 +54,8 @@
<div class="grid-col-12"> <div class="grid-col-12">
<div class="template-content-count" bg-color="red"> <div class="template-content-count" bg-color="red">
<div data-module="update-status" data-target="template_content" <div data-module="update-status" data-target="template_content"
data-updates-url="{{ url_for('.count_content_length', service_id=current_service.id, template_type='sms') }}"> data-updates-url="{{ url_for('.count_content_length', service_id=current_service.id, template_type='sms') }}"
aria-live="polite">
&nbsp; &nbsp;
</div> </div>
</div> </div>

View File

@@ -1521,7 +1521,7 @@ def test_link_to_upload_not_offered_when_entering_personalisation(
# Were entering personalization # Were 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=placeholder_value]").text.strip() == "name" assert page.select_one("label[for=phone-number]").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

View File

@@ -175,7 +175,7 @@ def test_should_show_empty_text_box(
# shouldnt also be set on the textbox itself # shouldnt also be set on the textbox itself
assert "data-module" not in textbox assert "data-module" not in textbox
assert ( assert (
normalize_spaces(page.select_one("label[for=placeholder_value]").text) == "one" normalize_spaces(page.select_one("label[for=phone-number]").text) == "one"
) )