Merge pull request #1091 from alphagov/fix-back-button

Fix back button on breaking-change.html
This commit is contained in:
Rebecca Law
2017-01-25 08:57:41 +00:00
committed by GitHub
3 changed files with 6 additions and 1 deletions

View File

@@ -218,6 +218,7 @@ def edit_service_template(service_id, template_id):
'name': form.name.data,
'subject': subject,
'content': form.template_content.data,
'id': new_template.id
},
column_headings=list(ascii_uppercase[:len(new_template.placeholders) + 1]),
example_rows=[

View File

@@ -29,6 +29,8 @@
<input type="hidden" name="name" value="{{ new_template.name }}" />
<input type="hidden" name="subject" value="{{ new_template.subject or '' }}" />
<input type="hidden" name="template_content" value="{{ new_template.content }}" />
<input type="hidden" name="template_id" value="{{ new_template.id }}" />
<input type="hidden" name="confirm" value="true" />
{{ page_footer(
'Save changes to template',

View File

@@ -279,7 +279,9 @@ def test_should_show_interstitial_when_making_breaking_change(
assert response.status_code == 200
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert page.h1.string.strip() == "Confirm changes"
assert page.find('a', {'class': 'page-footer-back-link'})['href'] == url_for(".edit_service_template",
service_id=service_id,
template_id=template_id)
for key, value in {
'name': 'new name',
'subject': 'reminder',