mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-04 19:38:24 -04:00
Update dashboard and template flow (#514)
* Updated header and footer * Moved files around and updated gulpfile to correct the build process when it goes to production * Updated fonts * Adjusted grid templating * Adding images to assets * Updated account pages, dashboard, and pages in message sending flow * Updated the styling for the landing pages in the account section once logged in
This commit is contained in:
@@ -57,7 +57,7 @@ def test_invite_org_user_errors_when_same_email_as_inviter(
|
||||
)
|
||||
|
||||
assert mock_invite_org_user.called is False
|
||||
assert 'You cannot send an invitation to yourself' in normalize_spaces(page.select_one('.govuk-error-message').text)
|
||||
assert 'You cannot send an invitation to yourself' in normalize_spaces(page.select_one('.usa-error-message').text)
|
||||
|
||||
|
||||
def test_cancel_invited_org_user_cancels_user_invitations(
|
||||
|
||||
@@ -160,7 +160,7 @@ def test_create_new_organisation_validates(
|
||||
)
|
||||
assert [
|
||||
(error['data-error-label'], normalize_spaces(error.text))
|
||||
for error in page.select('.govuk-error-message')
|
||||
for error in page.select('.usa-error-message')
|
||||
] == [
|
||||
('name', 'Error: Cannot be empty'),
|
||||
('organisation_type', 'Error: Select the type of organization'),
|
||||
@@ -194,7 +194,7 @@ def test_create_new_organisation_fails_with_incorrect_input(
|
||||
_expected_status=200,
|
||||
)
|
||||
assert mock_create_organisation.called is False
|
||||
assert error_message in page.select_one('.govuk-error-message').text
|
||||
assert error_message in page.select_one('.usa-error-message').text
|
||||
|
||||
|
||||
def test_create_new_organisation_fails_with_duplicate_name(
|
||||
@@ -224,7 +224,7 @@ def test_create_new_organisation_fails_with_duplicate_name(
|
||||
)
|
||||
|
||||
error_message = 'This organization name is already in use'
|
||||
assert error_message in page.select_one('.govuk-error-message').text
|
||||
assert error_message in page.select_one('.usa-error-message').text
|
||||
|
||||
|
||||
@pytest.mark.parametrize('organisation_type, organisation, expected_status', (
|
||||
@@ -337,7 +337,7 @@ def test_validation_of_gps_creating_organisations(
|
||||
_data=data,
|
||||
_expected_status=200,
|
||||
)
|
||||
assert expected_error in page.select_one('.govuk-error-message, .error-message').text
|
||||
assert expected_error in page.select_one('.usa-error-message, .error-message').text
|
||||
|
||||
|
||||
@freeze_time("2020-02-20 20:20")
|
||||
@@ -739,7 +739,7 @@ def test_manage_org_users_should_show_live_search_if_more_than_7_users(
|
||||
)
|
||||
assert len(page.select('.user-list-item')) == number_of_users
|
||||
|
||||
textbox = page.select_one('[data-module=autofocus] .govuk-input')
|
||||
textbox = page.select_one('[data-module=autofocus] .usa-input')
|
||||
assert 'value' not in textbox
|
||||
assert textbox['name'] == 'search'
|
||||
# data-module=autofocus is set on a containing element so it
|
||||
@@ -747,7 +747,7 @@ def test_manage_org_users_should_show_live_search_if_more_than_7_users(
|
||||
assert 'data-module' not in textbox
|
||||
assert not page.select_one('[data-force-focus]')
|
||||
assert textbox['class'] == [
|
||||
'govuk-input', 'govuk-!-width-full',
|
||||
'usa-input', 'govuk-!-width-full',
|
||||
]
|
||||
assert normalize_spaces(
|
||||
page.select_one('label[for=search]').text
|
||||
@@ -1209,7 +1209,7 @@ def test_update_organisation_with_incorrect_input(
|
||||
_data={'name': name},
|
||||
_expected_status=200,
|
||||
)
|
||||
assert error_message in page.select_one('.govuk-error-message').text
|
||||
assert error_message in page.select_one('.usa-error-message').text
|
||||
|
||||
|
||||
def test_update_organisation_with_non_unique_name(
|
||||
@@ -1237,7 +1237,7 @@ def test_update_organisation_with_non_unique_name(
|
||||
_expected_status=200,
|
||||
)
|
||||
|
||||
assert 'This organization name is already in use' in page.select_one('.govuk-error-message').text
|
||||
assert 'This organization name is already in use' in page.select_one('.usa-error-message').text
|
||||
|
||||
|
||||
def test_get_edit_organisation_go_live_notes_page(
|
||||
@@ -1311,7 +1311,7 @@ def test_view_edit_organisation_notes(
|
||||
org_id=organisation_one['id'],
|
||||
)
|
||||
assert page.select_one('h1').text == "Edit organization notes"
|
||||
assert page.find('label', class_="form-label").text.strip() == "Notes"
|
||||
assert page.find('label', class_="usa-label").text.strip() == "Notes"
|
||||
assert page.find('textarea').attrs["name"] == "notes"
|
||||
|
||||
|
||||
@@ -1406,7 +1406,7 @@ def test_view_edit_organisation_billing_details(
|
||||
org_id=organisation_one['id'],
|
||||
)
|
||||
assert page.select_one('h1').text == "Edit organization billing details"
|
||||
labels = page.find_all('label', class_="form-label")
|
||||
labels = page.find_all('label', class_="usa-label")
|
||||
labels_list = [
|
||||
'Contact email addresses',
|
||||
'Contact names',
|
||||
|
||||
Reference in New Issue
Block a user