mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-31 11:49:58 -04:00
Link to all services from organisation
Because a member of the organisation can now see some pages for any live service they should be able to click into each one.
This commit is contained in:
@@ -9,6 +9,7 @@ from tests import organisation_json, service_json
|
||||
from tests.conftest import (
|
||||
ORGANISATION_ID,
|
||||
SERVICE_ONE_ID,
|
||||
SERVICE_TWO_ID,
|
||||
active_user_with_permissions,
|
||||
normalize_spaces,
|
||||
platform_admin_user,
|
||||
@@ -104,11 +105,11 @@ def test_organisation_services_shows_live_services_only(
|
||||
mocker.patch(
|
||||
'app.organisations_client.get_organisation_services',
|
||||
return_value=[
|
||||
service_json(id_='1', name='1', restricted=False, active=True), # live
|
||||
service_json(id_=SERVICE_ONE_ID, name='1', restricted=False, active=True), # live
|
||||
service_json(id_='2', name='2', restricted=True, active=True), # trial
|
||||
service_json(id_='3', name='3', restricted=True, active=False), # trial, now archived
|
||||
service_json(id_='4', name='4', restricted=False, active=False), # was live, now archived
|
||||
service_json(id_=SERVICE_ONE_ID, name='5', restricted=False, active=True), # live, member of
|
||||
service_json(id_=SERVICE_TWO_ID, name='5', restricted=False, active=True), # live, member of
|
||||
]
|
||||
)
|
||||
|
||||
@@ -120,8 +121,8 @@ def test_organisation_services_shows_live_services_only(
|
||||
|
||||
assert normalize_spaces(services[0].text) == '1'
|
||||
assert normalize_spaces(services[1].text) == '5'
|
||||
assert services[0].find('a') is None
|
||||
assert services[1].find('a')['href'] == url_for('main.service_dashboard', service_id=SERVICE_ONE_ID)
|
||||
assert services[0].find('a')['href'] == url_for('main.service_dashboard', service_id=SERVICE_ONE_ID)
|
||||
assert services[1].find('a')['href'] == url_for('main.service_dashboard', service_id=SERVICE_TWO_ID)
|
||||
|
||||
|
||||
def test_organisation_trial_mode_services_shows_all_non_live_services(
|
||||
|
||||
Reference in New Issue
Block a user