backoffice: add note on final statuses in workflow inspect page (#51109) #531
|
@ -3634,6 +3634,22 @@ def test_workflows_inspect_view(pub):
|
|||
workflow.store()
|
||||
resp = app.get('/backoffice/workflows/%s/inspect' % workflow.id)
|
||||
|
||||
# check final status are noted
|
||||
workflow = Workflow(name='bar2')
|
||||
status1 = workflow.add_status('statusfoo')
|
||||
status1.forced_endpoint = True
|
||||
status2 = workflow.add_status('statusbar')
|
||||
workflow.store()
|
||||
resp = app.get('/backoffice/workflows/%s/inspect' % workflow.id)
|
||||
assert (
|
||||
resp.pyquery(f'#status-{status1.id} + p').text()
|
||||
== 'This status has been manually set to be considered as terminal.'
|
||||
)
|
||||
assert (
|
||||
resp.pyquery(f'#status-{status2.id} + p').text()
|
||||
== 'This status has been automatically evaluated as being terminal.'
|
||||
)
|
||||
|
||||
|
||||
def test_workflows_unused(pub):
|
||||
create_superuser(pub)
|
||||
|
|
|
@ -40,6 +40,15 @@
|
|||
><a href="{{ workflow.get_admin_url }}status/{{ status.id }}/" class="inspect-status--link">
|
||||
<span class="inspect-status--colour" style="background-color: #{{ status.colour|default:"fff" }}"></span>
|
||||
{{ status.name }}</a></h3>
|
||||
{% if status.is_endpoint %}
|
||||
<p>
|
||||
{% if status.forced_endpoint %}
|
||||
{% trans "This status has been manually set to be considered as terminal." %}
|
||||
{% elif status.is_endpoint %}
|
||||
{% trans "This status has been automatically evaluated as being terminal." %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if status.backoffice_info_text %}<div>{{ status.backoffice_info_text|safe }}</div>{% endif %}
|
||||
{% for item in status.items %}
|
||||
<h4><a href="{{ workflow.get_admin_url }}status/{{ status.id }}/items/{{ item.id }}/">{{ item.description }}</a></h4>
|
||||
|
|
Loading…
Reference in New Issue