Use correct back link pattern on escalation page

This commit is contained in:
Chris Hill-Scott
2020-03-25 11:56:47 +00:00
parent 34a5ddaf2c
commit 8335de1432
2 changed files with 10 additions and 9 deletions

View File

@@ -600,9 +600,11 @@ def test_bat_email_page(
assert response.status_code == 200
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert page.select('main a')[1].text == 'Fill in this form'
assert page.select('main a')[1]['href'] == url_for('main.feedback', ticket_type=PROBLEM_TICKET_TYPE, severe='no')
next_page_response = client.get(page.select('main a')[1]['href'])
assert page.select('main a')[0].text == 'Back'
assert page.select('main a')[0]['href'] == url_for('main.support')
assert page.select('main a')[2].text == 'Fill in this form'
assert page.select('main a')[2]['href'] == url_for('main.feedback', ticket_type=PROBLEM_TICKET_TYPE, severe='no')
next_page_response = client.get(page.select('main a')[2]['href'])
next_page = BeautifulSoup(next_page_response.data.decode('utf-8'), 'html.parser')
assert next_page.h1.text.strip() == 'Report a problem'