diff --git a/app/assets/stylesheets/components/task-list.scss b/app/assets/stylesheets/components/task-list.scss new file mode 100644 index 000000000..35f42eb15 --- /dev/null +++ b/app/assets/stylesheets/components/task-list.scss @@ -0,0 +1,41 @@ +$indicator-colour: $black; + +%task-list-indicator { + @include bold-16; + display: inline-block; + padding: 3px 8px 1px 8px; + position: absolute; + right: 0; + top: 50%; + margin-top: -15px; + border: 2px solid $indicator-colour; +} + +.task-list { + + border-bottom: 1px solid $border-colour; + margin: $gutter 0; + + &-item { + border-top: 1px solid $border-colour; + padding: 15px 0; + padding-right: 20%; + position: relative; + } + + &-indicator-completed { + @extend %task-list-indicator; + background-color: $indicator-colour; + color: $grey-4; + // Just a pinch of letter spacing to make reversed-out text a bit + // easier to read + letter-spacing: 0.02em; + } + + &-indicator-not-completed { + @extend %task-list-indicator; + background-color: transparent; + color: $indicator-colour; + } + +} diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss index 9f5955cae..74e3784d5 100644 --- a/app/assets/stylesheets/main.scss +++ b/app/assets/stylesheets/main.scss @@ -62,6 +62,7 @@ $path: '/static/images/'; @import 'components/vendor/breadcrumbs'; @import 'components/vendor/responsive-embed'; @import 'components/email-preview-pane'; +@import 'components/task-list'; @import 'views/dashboard'; @import 'views/users'; diff --git a/app/templates/components/task-list.html b/app/templates/components/task-list.html new file mode 100644 index 000000000..38585ee54 --- /dev/null +++ b/app/templates/components/task-list.html @@ -0,0 +1,16 @@ +{% macro task_list_item(completed, label) %} +
  • + {{ label }} + {% if completed %} + Completed + {% else %} + Not completed + {% endif %} +
  • +{% endmacro %} + +{% macro task_list_wrapper() %} + +{% endmacro %} diff --git a/app/templates/components/tick-cross.html b/app/templates/components/tick-cross.html index f6fbc9ecf..d8c0c297d 100644 --- a/app/templates/components/tick-cross.html +++ b/app/templates/components/tick-cross.html @@ -14,7 +14,6 @@ {% endmacro %} - {% macro tick_cross_done_not_done(yes, label) %} {{ tick_cross(yes, label, truthy_hint='Done: ', falsey_hint='Not done: ') }} {% endmacro %} diff --git a/app/templates/views/service-settings/request-to-go-live.html b/app/templates/views/service-settings/request-to-go-live.html index 2833dac48..4858714ca 100644 --- a/app/templates/views/service-settings/request-to-go-live.html +++ b/app/templates/views/service-settings/request-to-go-live.html @@ -4,7 +4,7 @@ {% from "components/radios.html" import radios %} {% from "components/page-footer.html" import page_footer %} {% from "components/banner.html" import banner_wrapper %} -{% from "components/tick-cross.html" import tick_cross_done_not_done %} +{% from "components/task-list.html" import task_list_wrapper, task_list_item %} {% block service_page_title %} Request to go live @@ -15,30 +15,30 @@

    Request to go live

    - Before your service can go live on Notify, you’ll need to: + Before your service can go live on Notify, you need:

    - + {% endcall %}

    You also need to accept our terms of use.

    diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index b87f834bd..c26ab1194 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -503,19 +503,19 @@ def test_should_raise_duplicate_name_handled( @pytest.mark.parametrize('count_of_users_with_manage_service, expected_user_checklist_item', [ - (1, 'Not done: Have more than one team member with the ‘Manage service’ permission'), - (2, 'Done: Have more than one team member with the ‘Manage service’ permission'), + (1, 'More than one team member with the ‘Manage settings’ permission Not completed'), + (2, 'More than one team member with the ‘Manage settings’ permission Completed'), ]) @pytest.mark.parametrize('count_of_templates, expected_templates_checklist_item', [ - (0, 'Not done: Create templates showing the kind of messages you plan to send'), - (1, 'Done: Create templates showing the kind of messages you plan to send'), - (2, 'Done: Create templates showing the kind of messages you plan to send'), + (0, 'Templates showing the kind of messages you plan to send Not completed'), + (1, 'Templates showing the kind of messages you plan to send Completed'), + (2, 'Templates showing the kind of messages you plan to send Completed'), ]) @pytest.mark.parametrize('count_of_email_templates, reply_to_email_addresses, expected_reply_to_checklist_item', [ pytest.mark.xfail((0, [], ''), raises=IndexError), pytest.mark.xfail((0, [{}], ''), raises=IndexError), - (1, [], 'Not done: Add an email reply-to address'), - (1, [{}], 'Done: Add an email reply-to address'), + (1, [], 'An email reply-to address Not completed'), + (1, [{}], 'An email reply-to address Completed'), ]) def test_should_show_request_to_go_live_checklist( client_request, @@ -552,7 +552,7 @@ def test_should_show_request_to_go_live_checklist( ) assert page.h1.text == 'Request to go live' - checklist_items = page.select('main ul[class=bottom-gutter] li') + checklist_items = page.select('.task-list .task-list-item') assert normalize_spaces(checklist_items[0].text) == expected_user_checklist_item assert normalize_spaces(checklist_items[1].text) == expected_templates_checklist_item