From 9c0b5b9e1676ca90f6474a10e2a42b38a77e8569 Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Tue, 1 Mar 2022 16:17:34 -0500 Subject: [PATCH] Test for new feature --- .../form_with_jinja_help.bpmn | 76 +++++++++++++++++++ .../workflow/test_workflow_form_jinja_help.py | 11 +++ 2 files changed, 87 insertions(+) create mode 100644 tests/data/form_with_jinja_help/form_with_jinja_help.bpmn create mode 100644 tests/workflow/test_workflow_form_jinja_help.py diff --git a/tests/data/form_with_jinja_help/form_with_jinja_help.bpmn b/tests/data/form_with_jinja_help/form_with_jinja_help.bpmn new file mode 100644 index 00000000..37b7875f --- /dev/null +++ b/tests/data/form_with_jinja_help/form_with_jinja_help.bpmn @@ -0,0 +1,76 @@ + + + + + Flow_17bkn17 + + + + + + Flow_075bliw + + + + Flow_17bkn17 + Flow_0whf895 + my_variable = 'Cruel' + + + + + + + + + + + + Flow_0whf895 + Flow_00tcg8m + + + ## Hello +{{ my_variable }} +{{name }} + + Flow_00tcg8m + Flow_075bliw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/workflow/test_workflow_form_jinja_help.py b/tests/workflow/test_workflow_form_jinja_help.py new file mode 100644 index 00000000..68f16a87 --- /dev/null +++ b/tests/workflow/test_workflow_form_jinja_help.py @@ -0,0 +1,11 @@ +from tests.base_test import BaseTest + + +class TestWorkflowFormJinjaHelp(BaseTest): + + def test_form_help_with_jinja(self): + workflow = self.create_workflow('form_with_jinja_help') + workflow_api = self.get_workflow_api(workflow) + task = workflow_api.next_task + self.assertEqual('help', task.form['fields'][0]['properties'][0]['id']) + self.assertEqual('Hello Cruel World', task.form['fields'][0]['properties'][0]['value'])