Changing the govuk grid to USWDS

This commit is contained in:
Jonathan Bobel
2023-08-23 16:18:25 -04:00
parent 4aa781ed9a
commit 412fad89ff
107 changed files with 314 additions and 314 deletions

View File

@@ -310,7 +310,7 @@ def test_should_not_show_back_to_service_if_user_doesnt_belong_to_service(
)
assert normalize_spaces(
page.select_one('.govuk-grid-row').text
page.select_one('.grid-row').text
).startswith(
normalize_spaces(expected_page_text)
)

View File

@@ -365,7 +365,7 @@ def test_organization_services_shows_live_services_and_usage(
mock.assert_called_once_with(ORGANISATION_ID, 2019)
services = page.select('main h3')
usage_rows = page.select('main .govuk-grid-column-one-half')
usage_rows = page.select('main .grid-col-6')
assert len(services) == 2
# Totals
@@ -406,7 +406,7 @@ def test_organization_services_shows_live_services_and_usage_with_count_of_1(
client_request.login(active_user_with_permissions)
page = client_request.get('.organization_dashboard', org_id=ORGANISATION_ID)
usage_rows = page.select('main .govuk-grid-column-one-half')
usage_rows = page.select('main .grid-col-6')
# Totals
assert normalize_spaces(usage_rows[0].text) == "Emails 1 sent"

View File

@@ -803,7 +803,7 @@ def test_usage_page(
assert normalize_spaces(unselected_nav_links[0].text) == '2010 to 2011 fiscal year'
assert normalize_spaces(unselected_nav_links[1].text) == '2009 to 2010 fiscal year'
annual_usage = page.find_all('div', {'class': 'govuk-grid-column-one-half'})
annual_usage = page.find_all('div', {'class': 'grid-col-6'})
# annual stats are shown in two rows, each with three column; email is col 1
# email_column = normalize_spaces(annual_usage[0].text + annual_usage[2].text)
@@ -843,7 +843,7 @@ def test_usage_page_no_sms_spend(
service_id=SERVICE_ONE_ID,
)
annual_usage = page.find_all('div', {'class': 'govuk-grid-column-one-half'})
annual_usage = page.find_all('div', {'class': 'grid-col-6'})
sms_column = normalize_spaces(annual_usage[0].text)
assert 'Text messages' in sms_column
assert '1,000 sent' in sms_column
@@ -918,7 +918,7 @@ def test_usage_page_with_0_free_allowance(
year=2020,
)
annual_usage = page.select('main .govuk-grid-column-one-half')
annual_usage = page.select('main .grid-col-6')
sms_column = normalize_spaces(annual_usage[0].text)
assert '0 free allowance' in sms_column

View File

@@ -313,7 +313,7 @@ def test_sms_price(
pricing_page = client_request.get('main.pricing')
assert normalize_spaces(
home_page.select('.product-page-section')[5].select('.govuk-grid-column-one-half')[1].text
home_page.select('.product-page-section')[5].select('.grid-col-6')[1].text
) == (
f'Text messages '
f'Up to 40,000 free text messages a year, '

View File

@@ -304,7 +304,7 @@ def test_should_show_old_job(
assert page.select_one('tbody').text.strip() == expected_message
assert [
normalize_spaces(column.text)
for column in page.select('main .govuk-grid-column-one-quarter')
for column in page.select('main .grid-col-3')
] == [
'1 total text messages',
'1 pending',

View File

@@ -629,16 +629,16 @@ def test_platform_admin_displays_stats_in_right_boxes_and_with_correct_styling(
# Email permanent failure status box - number is correct
assert '3 permanent failures' in page.find_all(
'div', class_='govuk-grid-column-one-half'
'div', class_='grid-col-6'
)[0].find(string=re.compile('permanent'))
# Email complaints status box - link exists and number is correct
assert page.find('a', string='15 complaints')
# SMS total box - number is correct
assert page.find_all('span', class_='big-number-number')[1].text.strip() == '168'
# Test SMS box - number is correct
assert '5' in page.find_all('div', class_='govuk-grid-column-one-half')[3].text
assert '5' in page.find_all('div', class_='grid-col-6')[3].text
# SMS technical failure status box - number is correct and failure class is used
assert '1 technical failures' in page.find_all('div', class_='govuk-grid-column-one-half')[1].find(
assert '1 technical failures' in page.find_all('div', class_='grid-col-6')[1].find(
'div', class_='big-number-status-failing').text

View File

@@ -23,7 +23,7 @@ def test_should_200_for_tour_start(
) == (
'Try sending yourself this example'
)
selected_hint = page.select('.banner-tour .govuk-grid-row')[0]
selected_hint = page.select('.banner-tour .grid-row')[0]
selected_hint_text = normalize_spaces(selected_hint.select(".govuk-body")[0].text)
assert "greyed-out-step" not in selected_hint["class"]
assert selected_hint_text == 'Every message is sent from a template'
@@ -146,7 +146,7 @@ def test_should_200_for_get_tour_step(
) == (
'Try sending yourself this example'
)
selected_hint = page.select('.banner-tour .govuk-grid-row')[1]
selected_hint = page.select('.banner-tour .grid-row')[1]
selected_hint_text = normalize_spaces(selected_hint.select(".govuk-body")[0].text)
assert "greyed-out-step" not in selected_hint["class"]
assert selected_hint_text == 'The template pulls in the data you provide'
@@ -546,7 +546,7 @@ def test_should_200_for_check_tour_notification(
) == (
'Try sending yourself this example'
)
selected_hint = page.select('.banner-tour .govuk-grid-row')[1]
selected_hint = page.select('.banner-tour .grid-row')[1]
selected_hint_text = normalize_spaces(selected_hint.select(".govuk-body")[0].text)
assert "greyed-out-step" not in selected_hint["class"]
assert selected_hint_text == 'The template pulls in the data you provide'