Count of orgs and live services for platform admin

This makes it consistent that an option which contains more options has
a hint about how many options it contains.

Also adds a formatter to get us ready for 1,000 services 🎉
This commit is contained in:
Chris Hill-Scott
2019-07-08 12:00:40 +01:00
parent c709d7668e
commit 6d5f542a88
8 changed files with 38 additions and 5 deletions

View File

@@ -157,16 +157,21 @@ def test_choose_account_should_show_choose_accounts_page_if_no_services(
def test_choose_account_should_should_organisations_link_for_platform_admin(
client_request,
platform_admin_user,
mock_get_organisations,
mock_get_orgs_and_services,
mock_get_organisation_services,
mock_get_service_and_organisation_counts,
):
client_request.login(platform_admin_user)
page = client_request.get('main.choose_account')
first_link = page.select_one('.browse-list-item a')
first_item = page.select_one('.browse-list-item')
first_link = first_item.select_one('a')
first_hint = first_item.select_one('.browse-list-hint')
assert first_link.text == 'All organisations'
assert first_link['href'] == url_for('main.organisations')
assert normalize_spaces(first_hint.text) == '3 organisations, 9,999 live services'
def test_choose_account_should_show_back_to_service_link(