diff --git a/app/templates/views/platform-admin/services.html b/app/templates/views/platform-admin/services.html index 277fbd503..c983d49a6 100644 --- a/app/templates/views/platform-admin/services.html +++ b/app/templates/views/platform-admin/services.html @@ -4,8 +4,8 @@ {% from "components/page-footer.html" import page_footer %} {% from "components/big-number.html" import big_number, big_number_with_status %} {% from "components/message-count-label.html" import message_count_label %} -{% from "components/table.html" import mapping_table, field, row_heading, row_group, row, -right_aligned_field_heading, hidden_field_heading, text_field %} +{% from "components/table.html" import mapping_table, field, row_heading, row_group, row, right_aligned_field_heading, +hidden_field_heading, text_field %} {% from "components/form.html" import form_wrapper %} {% macro stats_fields(channel, data) -%} @@ -56,6 +56,8 @@ {{ _("research mode") }} {% elif not service['restricted'] %} {{ _("Live") }} + {% else %} + {% endif %} {% endcall %} diff --git a/tests/app/main/views/test_platform_admin.py b/tests/app/main/views/test_platform_admin.py index d80ad1d81..47e671fed 100644 --- a/tests/app/main/views/test_platform_admin.py +++ b/tests/app/main/views/test_platform_admin.py @@ -93,9 +93,9 @@ def test_should_show_research_and_restricted_mode( assert response.status_code == 200 mock_get_detailed_services.assert_called_once_with({"detailed": True, "include_from_test_key": True, "only_active": False}) page = BeautifulSoup(response.data.decode("utf-8"), "html.parser") - # get first column in second row, which contains flags as text. + # get first column in first row, which contains service name and flags as a span in a single th. table_body = page.find_all("table")[0].find_all("tbody")[0] - service_mode = table_body.find_all("tbody")[0].find_all("tr")[1].find_all("td")[0].text.strip() + service_mode = table_body.find_all("tbody")[0].find_all("tr")[0].find_all("th")[0].find_all("span")[0].text.strip() assert service_mode == displayed