diff --git a/tests/admin_pages/test_workflow.py b/tests/admin_pages/test_workflow.py index 0a0407658..d90ebd797 100644 --- a/tests/admin_pages/test_workflow.py +++ b/tests/admin_pages/test_workflow.py @@ -203,12 +203,19 @@ def test_workflows_edit_status(pub): resp = resp.follow() assert Workflow.get(1).possible_status[0].visibility == ['_receiver'] - resp = resp.click('Change Terminal Status') + assert 'This status has been automatically evaluated as being terminal.' in resp.text + resp = resp.click('Force Terminal Status') resp.forms[0]['force_terminal_status'].checked = True resp = resp.forms[0].submit() assert resp.location == 'http://example.net/backoffice/workflows/1/status/1/' resp = resp.follow() assert Workflow.get(1).possible_status[0].forced_endpoint is True + assert 'This status has been manually set to be considered as terminal.' in resp.text + resp = resp.click('Unforce Terminal Status') + resp.forms[0]['force_terminal_status'].checked = False + resp = resp.forms[0].submit() + assert resp.location == 'http://example.net/backoffice/workflows/1/status/1/' + resp = resp.follow() resp = resp.click('Change Display Settings') assert resp.forms[0]['colour'].value == 'FFFFFF' diff --git a/wcs/templates/wcs/backoffice/workflow-status.html b/wcs/templates/wcs/backoffice/workflow-status.html index 78de3b758..7e4e4b64f 100644 --- a/wcs/templates/wcs/backoffice/workflow-status.html +++ b/wcs/templates/wcs/backoffice/workflow-status.html @@ -77,10 +77,26 @@ duplicate it to base your own workflow on it. {% elif workflow.is_readonly %}

{% trans "This workflow is readonly." %}

{% else %} + +{% if status.is_endpoint %} +
+

+{% if status.forced_endpoint %} +{% trans "This status has been manually set to be considered as terminal." %} +
{% trans "Unforce Terminal Status" %} +{% elif status.is_endpoint %} +{% trans "This status has been automatically evaluated as being terminal." %} +{% endif %} +

+
+{% endif %} +