Test, workflow, and empty spreadsheet for the new code. The workflow references the spreadsheet, which has no rows.

This commit is contained in:
mike cullerton 2021-02-08 15:12:11 -05:00
parent b42b843f7d
commit 11177b4296
3 changed files with 75 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_0vm4ua3" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.2.0">
<bpmn:process id="Process_EmptyEnum" name="Empty Enum" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_08cjvuw</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_08cjvuw" sourceRef="StartEvent_1" targetRef="Activity_EmptyEnum" />
<bpmn:userTask id="Activity_EmptyEnum" name="Empty Enum" camunda:formKey="EmptyEnumForm">
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="empty_select" label="Select One" type="enum">
<camunda:properties>
<camunda:property id="spreadsheet.name" value="empty_spreadsheet.xls" />
<camunda:property id="spreadsheet.value.column" value="COMPANY_ID" />
<camunda:property id="spreadsheet.label.column" value="COMPANY_NAME" />
</camunda:properties>
</camunda:formField>
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>Flow_08cjvuw</bpmn:incoming>
<bpmn:outgoing>Flow_0qm71qa</bpmn:outgoing>
</bpmn:userTask>
<bpmn:sequenceFlow id="Flow_0qm71qa" sourceRef="Activity_EmptyEnum" targetRef="Activity_GoodBye" />
<bpmn:endEvent id="Event_034utr4">
<bpmn:incoming>Flow_0ynk21r</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0ynk21r" sourceRef="Activity_GoodBye" targetRef="Event_034utr4" />
<bpmn:manualTask id="Activity_GoodBye" name="Good Bye">
<bpmn:documentation>&lt;H1&gt;Good Bye&lt;/H1&gt;</bpmn:documentation>
<bpmn:incoming>Flow_0qm71qa</bpmn:incoming>
<bpmn:outgoing>Flow_0ynk21r</bpmn:outgoing>
</bpmn:manualTask>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_EmptyEnum">
<bpmndi:BPMNEdge id="Flow_08cjvuw_di" bpmnElement="Flow_08cjvuw">
<di:waypoint x="215" y="117" />
<di:waypoint x="270" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0qm71qa_di" bpmnElement="Flow_0qm71qa">
<di:waypoint x="370" y="117" />
<di:waypoint x="430" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0ynk21r_di" bpmnElement="Flow_0ynk21r">
<di:waypoint x="530" y="117" />
<di:waypoint x="592" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="179" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1mqyx7y_di" bpmnElement="Activity_EmptyEnum">
<dc:Bounds x="270" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_034utr4_di" bpmnElement="Event_034utr4">
<dc:Bounds x="592" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0obcp1b_di" bpmnElement="Activity_GoodBye">
<dc:Bounds x="430" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>

View File

@ -0,0 +1,13 @@
from tests.base_test import BaseTest
import json
class TestEmptyEnumList(BaseTest):
def test_empty_enum_list(self):
spec_model = self.load_test_spec('enum_empty_list')
rv = self.app.get('/v1.0/workflow-specification/%s/validate' % spec_model.id, headers=self.logged_in_headers())
json_data = json.loads(rv.get_data(as_text=True))
self.assertEqual(json_data[0]['code'], 'invalid enum')