mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Fix order of placeholders in the tour
Doing a lookup with `step_index - 1` means that on step `0` we were looking up `placeholders[-1]`, ie we were making people fill in the last placeholder first. Fixing this reintroduces the bug fixed by this pull request: https://github.com/alphagov/notifications-admin/pull/2551 So this commit also re-fixes that bug but in a different way.
This commit is contained in:
@@ -845,6 +845,20 @@ def mock_get_service_template_with_placeholders(mocker):
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_service_template_with_multiple_placeholders(mocker):
|
||||
def _get(service_id, template_id, version=None):
|
||||
template = template_json(
|
||||
service_id, template_id, "Two week reminder", "sms", "((one)) ((two)) ((three))"
|
||||
)
|
||||
return {'data': template}
|
||||
|
||||
return mocker.patch(
|
||||
'app.service_api_client.get_service_template',
|
||||
side_effect=_get
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_service_template_with_placeholders_same_as_recipient(mocker):
|
||||
def _get(service_id, template_id, version=None):
|
||||
|
||||
Reference in New Issue
Block a user