Skip to content

Commit

Permalink
E2E Tests - Unfinished
Browse files Browse the repository at this point in the history
  • Loading branch information
Josephblt committed Jun 8, 2024
1 parent ca00754 commit 73a7f27
Show file tree
Hide file tree
Showing 11 changed files with 501 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import * as path from "path";
import { VSCodeTestHelper } from "@kie-tools/vscode-extension-common-test-helpers";

describe("Extended Services VS Code extension - activation tests", () => {
const TEST_PROJECT_FOLDER: string = path.resolve("e2e-tests-tmp", "resources", "greeting-flow");
const DIST_E2E_TESTS_FOLDER: string = path.resolve("dist-e2e-tests");

let testHelper: VSCodeTestHelper;

before(async function () {
this.timeout(60000);
testHelper = new VSCodeTestHelper();
await testHelper.openFolder(TEST_PROJECT_FOLDER);
});

beforeEach(async function () {
await testHelper.closeAllEditors();
await testHelper.closeAllNotifications();
});

afterEach(async function () {
this.timeout(15000);
await testHelper.takeScreenshotOnTestFailure(this, DIST_E2E_TESTS_FOLDER);
await testHelper.closeAllEditors();
await testHelper.closeAllNotifications();
});

it("Opens greetings.sw.json and loads two editor groups", async function () {
this.timeout(40000);
const editorWebviews = await testHelper.openFileFromSidebar("greetings.sw.json", "src/main/resources");
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpsim="http://www.bpsim.org/schemas/1.0" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" id="_KAfIIAGaED2bt4lyi26FCQ" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd http://www.omg.org/spec/DD/20100524/DC DC.xsd http://www.omg.org/spec/DD/20100524/DI DI.xsd " exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20">
<bpmn2:itemDefinition id="__8F513029-43A3-4BBF-A637-DC34E85503EF_SkippableInputXItem" structureRef="Object"/>
<bpmn2:itemDefinition id="__8F513029-43A3-4BBF-A637-DC34E85503EF_PriorityInputXItem" structureRef="Object"/>
<bpmn2:itemDefinition id="__8F513029-43A3-4BBF-A637-DC34E85503EF_CommentInputXItem" structureRef="Object"/>
<bpmn2:itemDefinition id="__8F513029-43A3-4BBF-A637-DC34E85503EF_DescriptionInputXItem" structureRef="Object"/>
<bpmn2:itemDefinition id="__8F513029-43A3-4BBF-A637-DC34E85503EF_CreatedByInputXItem" structureRef="Object"/>
<bpmn2:itemDefinition id="__8F513029-43A3-4BBF-A637-DC34E85503EF_TaskNameInputXItem" structureRef="Object"/>
<bpmn2:itemDefinition id="__8F513029-43A3-4BBF-A637-DC34E85503EF_GroupIdInputXItem" structureRef="Object"/>
<bpmn2:itemDefinition id="__8F513029-43A3-4BBF-A637-DC34E85503EF_ContentInputXItem" structureRef="Object"/>
<bpmn2:itemDefinition id="__8F513029-43A3-4BBF-A637-DC34E85503EF_NotStartedReassignInputXItem" structureRef="Object"/>
<bpmn2:itemDefinition id="__8F513029-43A3-4BBF-A637-DC34E85503EF_NotCompletedReassignInputXItem" structureRef="Object"/>
<bpmn2:itemDefinition id="__8F513029-43A3-4BBF-A637-DC34E85503EF_NotStartedNotifyInputXItem" structureRef="Object"/>
<bpmn2:itemDefinition id="__8F513029-43A3-4BBF-A637-DC34E85503EF_NotCompletedNotifyInputXItem" structureRef="Object"/>
<bpmn2:collaboration id="_D21ED19E-1B57-4D5E-AE1A-CD0A5E0BDF0D" name="Default Collaboration">
<bpmn2:participant id="_9F5301EA-34D0-4CFB-8BEC-6B142C100220" name="Pool Participant" processRef="tests"/>
</bpmn2:collaboration>
<bpmn2:process id="tests" drools:packageName="com.example" drools:version="1.0" drools:adHoc="false" name="tests" isExecutable="true" processType="Public">
<bpmn2:sequenceFlow id="_2104EAC5-80A9-4BF7-8AFA-FB72DE6F731F" sourceRef="_8F513029-43A3-4BBF-A637-DC34E85503EF" targetRef="_6182E0BB-6336-4E72-8894-08609310E69D"/>
<bpmn2:sequenceFlow id="_3B420194-D273-4CD5-9DD9-3356AC4DFFF9" sourceRef="_851B45F7-558D-4E6A-A5CF-60A82CE68F67" targetRef="_8F513029-43A3-4BBF-A637-DC34E85503EF"/>
<bpmn2:endEvent id="_6182E0BB-6336-4E72-8894-08609310E69D">
<bpmn2:incoming>_2104EAC5-80A9-4BF7-8AFA-FB72DE6F731F</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:userTask id="_8F513029-43A3-4BBF-A637-DC34E85503EF" name="Task">
<bpmn2:extensionElements>
<drools:metaData name="elementname">
<drools:metaValue><![CDATA[Task]]></drools:metaValue>
</drools:metaData>
</bpmn2:extensionElements>
<bpmn2:incoming>_3B420194-D273-4CD5-9DD9-3356AC4DFFF9</bpmn2:incoming>
<bpmn2:outgoing>_2104EAC5-80A9-4BF7-8AFA-FB72DE6F731F</bpmn2:outgoing>
<bpmn2:ioSpecification>
<bpmn2:dataInput id="_8F513029-43A3-4BBF-A637-DC34E85503EF_TaskNameInputX" drools:dtype="Object" itemSubjectRef="__8F513029-43A3-4BBF-A637-DC34E85503EF_TaskNameInputXItem" name="TaskName"/>
<bpmn2:dataInput id="_8F513029-43A3-4BBF-A637-DC34E85503EF_SkippableInputX" drools:dtype="Object" itemSubjectRef="__8F513029-43A3-4BBF-A637-DC34E85503EF_SkippableInputXItem" name="Skippable"/>
<bpmn2:inputSet>
<bpmn2:dataInputRefs>_8F513029-43A3-4BBF-A637-DC34E85503EF_TaskNameInputX</bpmn2:dataInputRefs>
<bpmn2:dataInputRefs>_8F513029-43A3-4BBF-A637-DC34E85503EF_SkippableInputX</bpmn2:dataInputRefs>
</bpmn2:inputSet>
</bpmn2:ioSpecification>
<bpmn2:dataInputAssociation>
<bpmn2:targetRef>_8F513029-43A3-4BBF-A637-DC34E85503EF_TaskNameInputX</bpmn2:targetRef>
<bpmn2:assignment>
<bpmn2:from xsi:type="bpmn2:tFormalExpression"><![CDATA[Task]]></bpmn2:from>
<bpmn2:to xsi:type="bpmn2:tFormalExpression"><![CDATA[_8F513029-43A3-4BBF-A637-DC34E85503EF_TaskNameInputX]]></bpmn2:to>
</bpmn2:assignment>
</bpmn2:dataInputAssociation>
<bpmn2:dataInputAssociation>
<bpmn2:targetRef>_8F513029-43A3-4BBF-A637-DC34E85503EF_SkippableInputX</bpmn2:targetRef>
<bpmn2:assignment>
<bpmn2:from xsi:type="bpmn2:tFormalExpression"><![CDATA[false]]></bpmn2:from>
<bpmn2:to xsi:type="bpmn2:tFormalExpression"><![CDATA[_8F513029-43A3-4BBF-A637-DC34E85503EF_SkippableInputX]]></bpmn2:to>
</bpmn2:assignment>
</bpmn2:dataInputAssociation>
</bpmn2:userTask>
<bpmn2:startEvent id="_851B45F7-558D-4E6A-A5CF-60A82CE68F67">
<bpmn2:outgoing>_3B420194-D273-4CD5-9DD9-3356AC4DFFF9</bpmn2:outgoing>
</bpmn2:startEvent>
</bpmn2:process>
<bpmndi:BPMNDiagram>
<bpmndi:BPMNPlane bpmnElement="tests">
<bpmndi:BPMNShape id="shape__851B45F7-558D-4E6A-A5CF-60A82CE68F67" bpmnElement="_851B45F7-558D-4E6A-A5CF-60A82CE68F67">
<dc:Bounds height="56" width="56" x="116" y="119"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="shape__8F513029-43A3-4BBF-A637-DC34E85503EF" bpmnElement="_8F513029-43A3-4BBF-A637-DC34E85503EF">
<dc:Bounds height="102" width="154" x="252" y="96"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="shape__6182E0BB-6336-4E72-8894-08609310E69D" bpmnElement="_6182E0BB-6336-4E72-8894-08609310E69D">
<dc:Bounds height="56" width="56" x="486" y="119"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="edge_shape__851B45F7-558D-4E6A-A5CF-60A82CE68F67_to_shape__8F513029-43A3-4BBF-A637-DC34E85503EF" bpmnElement="_3B420194-D273-4CD5-9DD9-3356AC4DFFF9">
<di:waypoint x="144" y="147"/>
<di:waypoint x="329" y="147"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="edge_shape__8F513029-43A3-4BBF-A637-DC34E85503EF_to_shape__6182E0BB-6336-4E72-8894-08609310E69D" bpmnElement="_2104EAC5-80A9-4BF7-8AFA-FB72DE6F731F">
<di:waypoint x="329" y="147"/>
<di:waypoint x="514" y="147"/>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
<bpmn2:relationship type="BPSimData">
<bpmn2:extensionElements>
<bpsim:BPSimData>
<bpsim:Scenario id="default" name="Simulationscenario">
<bpsim:ScenarioParameters/>
<bpsim:ElementParameters elementRef="_851B45F7-558D-4E6A-A5CF-60A82CE68F67">
<bpsim:TimeParameters>
<bpsim:ProcessingTime>
<bpsim:NormalDistribution mean="0" standardDeviation="0"/>
</bpsim:ProcessingTime>
</bpsim:TimeParameters>
</bpsim:ElementParameters>
<bpsim:ElementParameters elementRef="_8F513029-43A3-4BBF-A637-DC34E85503EF">
<bpsim:TimeParameters>
<bpsim:ProcessingTime>
<bpsim:NormalDistribution mean="0" standardDeviation="0"/>
</bpsim:ProcessingTime>
</bpsim:TimeParameters>
<bpsim:ResourceParameters>
<bpsim:Availability>
<bpsim:FloatingParameter value="0"/>
</bpsim:Availability>
<bpsim:Quantity>
<bpsim:FloatingParameter value="0"/>
</bpsim:Quantity>
</bpsim:ResourceParameters>
<bpsim:CostParameters>
<bpsim:UnitCost>
<bpsim:FloatingParameter value="0"/>
</bpsim:UnitCost>
</bpsim:CostParameters>
</bpsim:ElementParameters>
</bpsim:Scenario>
</bpsim:BPSimData>
</bpmn2:extensionElements>
<bpmn2:source>_KAfIIAGaED2bt4lyi26FCQ</bpmn2:source>
<bpmn2:target>_KAfIIAGaED2bt4lyi26FCQ</bpmn2:target>
</bpmn2:relationship>
</bpmn2:definitions>
Loading

0 comments on commit 73a7f27

Please sign in to comment.