mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Go to organisation stub page which will eventually show list of services
This commit is contained in:
@@ -31,12 +31,32 @@ def test_organisation_page_shows_all_organisations(
|
||||
) == "Organisations"
|
||||
|
||||
for index, org in enumerate(orgs):
|
||||
assert (page.select('a.browse-list-link')[index]).text == org['name']
|
||||
assert page.select('a.browse-list-link')[index].text == org['name']
|
||||
if not org['active']:
|
||||
assert (page.select_one('.table-field-status-default,heading-medium')).text == '- archived'
|
||||
assert page.select_one('.table-field-status-default,heading-medium').text == '- archived'
|
||||
assert normalize_spaces((page.select('a.browse-list-link')[-1]).text) == 'Create an organisation'
|
||||
|
||||
|
||||
def test_view_organisation_shows_the_correct_organisation(
|
||||
logged_in_platform_admin_client,
|
||||
fake_uuid,
|
||||
mocker
|
||||
):
|
||||
org = {'id': fake_uuid, 'name': 'Test 1', 'active': True}
|
||||
mocker.patch(
|
||||
'app.organisations_client.get_organisation', return_value=org
|
||||
)
|
||||
|
||||
response = logged_in_platform_admin_client.get(
|
||||
url_for('.view_organisation', org_id=fake_uuid)
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
|
||||
assert page.select_one('.heading-large div').text == org['name']
|
||||
|
||||
|
||||
def test_edit_organisation_shows_the_correct_organisation(
|
||||
logged_in_platform_admin_client,
|
||||
fake_uuid,
|
||||
|
||||
Reference in New Issue
Block a user