Skip to content

Commit

Permalink
test(cmmn): add failing test case related to deployed task form
Browse files Browse the repository at this point in the history
related to CAM-9081
  • Loading branch information
tasso94 committed May 16, 2018
1 parent a699259 commit 35194c0
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
Expand Up @@ -73,6 +73,7 @@
import org.camunda.commons.utils.IoUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
Expand Down Expand Up @@ -1206,6 +1207,25 @@ public void testGetDeployedTaskForm() {
assertEquals(deployedStartFormAsString, fileAsString);
}

@Ignore("CAM-9081")
@Deployment(resources = { "org/camunda/bpm/engine/test/api/form/DeployedFormsCase.cmmn11.xml",
"org/camunda/bpm/engine/test/api/form/task.form" })
@Test
public void testGetDeployedTaskForm_Case() {
// given
caseService.createCaseInstanceByKey("Case_1");
String taskId = taskService.createTaskQuery().singleResult().getId();

// when
InputStream deployedTaskForm = formService.getDeployedTaskForm(taskId);

// then
assertNotNull(deployedTaskForm);
String fileAsString = IoUtil.fileAsString("org/camunda/bpm/engine/test/api/form/task.form");
String deployedStartFormAsString = IoUtil.inputStreamAsString(deployedTaskForm);
assertEquals(deployedStartFormAsString, fileAsString);
}

@Deployment(resources = { "org/camunda/bpm/engine/test/api/form/EmbeddedDeployedFormsProcess.bpmn20.xml",
"org/camunda/bpm/engine/test/api/form/start.form",
"org/camunda/bpm/engine/test/api/form/task.form" })
Expand Down
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<cmmn:definitions xmlns:dc="http://www.omg.org/spec/CMMN/20151109/DC" xmlns:di="http://www.omg.org/spec/CMMN/20151109/DI" xmlns:cmmndi="http://www.omg.org/spec/CMMN/20151109/CMMNDI" xmlns:cmmn="http://www.omg.org/spec/CMMN/20151109/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/cmmn" id="Test" targetNamespace="http://bpmn.io/schema/cmmn" exporter="Camunda Modeler" exporterVersion="1.8.0">
<cmmn:case id="Case_1">
<cmmn:casePlanModel id="CasePlanModel_1" name="A CasePlanModel">
<cmmn:planItem id="PlanItem_1" definitionRef="HumanTask_0xijr4e" />
<cmmn:humanTask id="HumanTask_0xijr4e" camunda:formKey="deployment:org/camunda/bpm/engine/test/api/form/task.form" />
</cmmn:casePlanModel>
</cmmn:case>
<cmmndi:CMMNDI>
<cmmndi:CMMNDiagram id="_5a66685b-5f57-4e2f-b1d1-acca4fae04b2">
<cmmndi:Size xsi:type="dc:Dimension" width="500" height="500" />
<cmmndi:CMMNShape id="DI_CasePlanModel_1" cmmnElementRef="CasePlanModel_1">
<dc:Bounds x="114" y="63" width="534" height="389" />
<cmmndi:CMMNLabel />
</cmmndi:CMMNShape>
<cmmndi:CMMNShape id="PlanItem_0lvqze0_di" cmmnElementRef="PlanItem_1">
<dc:Bounds x="150" y="96" width="100" height="80" />
<cmmndi:CMMNLabel />
</cmmndi:CMMNShape>
</cmmndi:CMMNDiagram>
</cmmndi:CMMNDI>
</cmmn:definitions>

0 comments on commit 35194c0

Please sign in to comment.