Revert "Replace govuk template with govuk frontend components"

This commit is contained in:
Tom Byers
2019-11-25 10:37:35 +00:00
committed by GitHub
parent db255c7cf3
commit e02f94f238
47 changed files with 356 additions and 939 deletions

View File

@@ -88,7 +88,7 @@ def test_choose_account_should_show_choose_accounts_page(
mock_get_organisation,
):
resp = client_request.get('main.choose_account')
page = resp.find('main', {'id': 'main-content'})
page = resp.find('div', {'id': 'content'}).main
assert normalize_spaces(page.h1.text) == 'Choose service'
outer_list_items = page.select('nav ul')[0].select('li')
@@ -144,7 +144,7 @@ def test_choose_account_should_show_choose_accounts_page_if_no_services(
'services': []
}
resp = client_request.get('main.choose_account')
page = resp.find('main', {'id': 'main-content'})
page = resp.find('div', {'id': 'content'}).main
links = page.findAll('a')
assert len(links) == 1
@@ -182,8 +182,8 @@ def test_choose_account_should_show_back_to_service_link(
):
resp = client_request.get('main.choose_account')
service_navigation = resp.find('div', {'class': 'navigation-service'})
back_to_service_link = service_navigation.a
page = resp.find('div', {'id': 'content'})
back_to_service_link = page.find('div', {'class': 'navigation-service'}).a
assert back_to_service_link['href'] == url_for('main.show_accounts_or_dashboard')
assert back_to_service_link.text == 'Back to service one'
@@ -273,7 +273,7 @@ def test_should_not_show_back_to_service_if_user_doesnt_belong_to_service(
)
assert normalize_spaces(
page.select_one('header + .govuk-width-container').text
page.select_one('#content').text
).startswith(
normalize_spaces(page_text)
)