tests: add check for display message line details
This commit is contained in:
parent
fe8c40f7fd
commit
9c7c8633f2
|
@ -2174,6 +2174,25 @@ def test_workflow_display_message_to(pub):
|
|||
assert 'd1' in formdata.get_workflow_messages()
|
||||
assert 'd2' in formdata.get_workflow_messages()
|
||||
|
||||
def test_workflow_display_message_line_details(pub):
|
||||
workflow = Workflow(name='display message to')
|
||||
st1 = workflow.add_status('Status1', 'st1')
|
||||
display_message = DisplayMessageWorkflowStatusItem()
|
||||
display_message.parent = st1
|
||||
|
||||
assert display_message.get_line_details() == 'top of page'
|
||||
display_message.position = 'top'
|
||||
assert display_message.get_line_details() == 'top of page'
|
||||
display_message.position = 'bottom'
|
||||
assert display_message.get_line_details() == 'bottom of page'
|
||||
display_message.position = 'actions'
|
||||
assert display_message.get_line_details() == 'with actions'
|
||||
|
||||
role = Role(name='foorole')
|
||||
role.store()
|
||||
display_message.to = [role.id]
|
||||
assert display_message.get_line_details() == 'with actions, for foorole'
|
||||
|
||||
def test_workflow_roles(pub, emails):
|
||||
pub.substitutions.feed(MockSubstitutionVariables())
|
||||
|
||||
|
|
Loading…
Reference in New Issue