@camunda/e2e-test-suite 0.0.1191 → 0.0.1192

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,71 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
3
+ xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
4
+ xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
5
+ xmlns:zeebe="http://camunda.org/schema/zeebe/1.0"
6
+ xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
7
+ xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_mcp_meta"
8
+ targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.42.0"
9
+ modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.9.0">
10
+ <bpmn:process id="mcp_remote_client_meta" name="mcp_remote_client_meta" isExecutable="true">
11
+ <bpmn:startEvent id="StartEvent_1">
12
+ <bpmn:outgoing>Flow_start_to_echo</bpmn:outgoing>
13
+ </bpmn:startEvent>
14
+ <bpmn:serviceTask id="Activity_echo_meta"
15
+ zeebe:modelerTemplate="io.camunda.connectors.agenticai.mcp.remoteclient.v0"
16
+ zeebe:modelerTemplateVersion="3">
17
+ <bpmn:extensionElements>
18
+ <zeebe:taskDefinition type="io.camunda.agenticai:mcpremoteclient:1" retries="3" />
19
+ <zeebe:ioMapping>
20
+ <zeebe:input source="http" target="data.transport.type" />
21
+ <zeebe:input source="http://localhost:12001/mcp"
22
+ target="data.transport.http.url" />
23
+ <zeebe:input source="noAuth" target="data.transport.http.authentication.type" />
24
+ <zeebe:input source="=false" target="data.options.clientCache" />
25
+ <zeebe:input source="standalone" target="data.connectorMode.type" />
26
+ <zeebe:input source="tools/call" target="data.connectorMode.operation.type" />
27
+ <zeebe:input source="echoMeta" target="data.connectorMode.operation.toolName" />
28
+ <zeebe:input source="={exampleMetaKey: &#34;exampleMetaValue&#34;}"
29
+ target="data.connectorMode.meta" />
30
+ </zeebe:ioMapping>
31
+ <zeebe:taskHeaders>
32
+ <zeebe:header key="elementTemplateVersion" value="3" />
33
+ <zeebe:header key="elementTemplateId"
34
+ value="io.camunda.connectors.agenticai.mcp.remoteclient.v0" />
35
+ <zeebe:header key="resultVariable" value="echoMetaResult" />
36
+ <zeebe:header key="retryBackoff" value="PT0S" />
37
+ </zeebe:taskHeaders>
38
+ </bpmn:extensionElements>
39
+ <bpmn:incoming>Flow_start_to_echo</bpmn:incoming>
40
+ <bpmn:outgoing>Flow_echo_to_end</bpmn:outgoing>
41
+ </bpmn:serviceTask>
42
+ <bpmn:endEvent id="Event_end">
43
+ <bpmn:incoming>Flow_echo_to_end</bpmn:incoming>
44
+ </bpmn:endEvent>
45
+ <bpmn:sequenceFlow id="Flow_start_to_echo" sourceRef="StartEvent_1"
46
+ targetRef="Activity_echo_meta" />
47
+ <bpmn:sequenceFlow id="Flow_echo_to_end" sourceRef="Activity_echo_meta"
48
+ targetRef="Event_end" />
49
+ </bpmn:process>
50
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
51
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="mcp_remote_client_meta">
52
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
53
+ <dc:Bounds x="152" y="99" width="36" height="36" />
54
+ </bpmndi:BPMNShape>
55
+ <bpmndi:BPMNShape id="Activity_echo_meta_di" bpmnElement="Activity_echo_meta">
56
+ <dc:Bounds x="250" y="77" width="100" height="80" />
57
+ </bpmndi:BPMNShape>
58
+ <bpmndi:BPMNShape id="Event_end_di" bpmnElement="Event_end">
59
+ <dc:Bounds x="412" y="99" width="36" height="36" />
60
+ </bpmndi:BPMNShape>
61
+ <bpmndi:BPMNEdge id="Flow_start_to_echo_di" bpmnElement="Flow_start_to_echo">
62
+ <di:waypoint x="188" y="117" />
63
+ <di:waypoint x="250" y="117" />
64
+ </bpmndi:BPMNEdge>
65
+ <bpmndi:BPMNEdge id="Flow_echo_to_end_di" bpmnElement="Flow_echo_to_end">
66
+ <di:waypoint x="350" y="117" />
67
+ <di:waypoint x="412" y="117" />
68
+ </bpmndi:BPMNEdge>
69
+ </bpmndi:BPMNPlane>
70
+ </bpmndi:BPMNDiagram>
71
+ </bpmn:definitions>
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const promises_1 = require("node:fs/promises");
4
+ const node_os_1 = require("node:os");
5
+ const node_path_1 = require("node:path");
6
+ const c8Run_8_10_1 = require("../../fixtures/c8Run-8.10");
7
+ const test_1 = require("@playwright/test");
8
+ const UtilitiesPage_1 = require("../../pages/c8Run-8.10/UtilitiesPage");
9
+ const _setup_1 = require("../../test-setup.js");
10
+ const apiHelpers_1 = require("../../utils/apiHelpers");
11
+ const zeebeClient_1 = require("../../utils/zeebeClient");
12
+ let processId;
13
+ let bpmnPath;
14
+ c8Run_8_10_1.test.beforeAll(async () => {
15
+ if (process.env.MCP_SERVER_AVAILABLE !== 'true') {
16
+ return;
17
+ }
18
+ await (0, apiHelpers_1.validateMcpServerHealth)();
19
+ await (0, apiHelpers_1.waitForConnectorsReady)(undefined, 300000, [
20
+ 'io.camunda.agenticai:mcpremoteclient:1',
21
+ ]);
22
+ processId = `mcp_remote_client_meta_${await (0, _setup_1.generateRandomStringAsync)(6)}`;
23
+ const tempDir = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'mcp-meta-'));
24
+ bpmnPath = (0, node_path_1.join)(tempDir, 'mcp_remote_client_meta.bpmn');
25
+ const bpmn = await (0, promises_1.readFile)('./resources/mcp_server/mcp_remote_client_meta.bpmn', 'utf8');
26
+ await (0, promises_1.writeFile)(bpmnPath, bpmn.replaceAll('mcp_remote_client_meta', processId));
27
+ await (0, zeebeClient_1.deploy)([bpmnPath]);
28
+ await (0, zeebeClient_1.createInstances)(processId, 1, 1);
29
+ });
30
+ c8Run_8_10_1.test.afterAll(async () => {
31
+ if (bpmnPath) {
32
+ await (0, promises_1.rm)((0, node_path_1.dirname)(bpmnPath), { recursive: true, force: true });
33
+ }
34
+ });
35
+ c8Run_8_10_1.test.describe('@tasklistV2 MCP Client connector _meta tests', () => {
36
+ c8Run_8_10_1.test.skip(process.env.MCP_SERVER_AVAILABLE !== 'true', 'MCP server is only available on Linux and macOS CI runners');
37
+ c8Run_8_10_1.test.beforeEach(async ({ page, operateLoginPage, operateHomePage }) => {
38
+ await (0, UtilitiesPage_1.navigateToApp)(page, 'operate');
39
+ await operateLoginPage.login('demo', 'demo');
40
+ await operateHomePage.operateBannerIsVisible();
41
+ });
42
+ c8Run_8_10_1.test.afterEach(async ({ page }, testInfo) => {
43
+ await (0, _setup_1.captureScreenshot)(page, testInfo);
44
+ await (0, _setup_1.captureFailureVideo)(page, testInfo);
45
+ });
46
+ (0, c8Run_8_10_1.test)('As a user I can forward MCP _meta and have it echoed back by the server', async ({ operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
47
+ c8Run_8_10_1.test.slow();
48
+ await c8Run_8_10_1.test.step('Navigate to completed process instance', async () => {
49
+ await operateHomePage.clickProcessesTab();
50
+ await operateProcessesPage.clickProcessCompletedCheckbox();
51
+ await operateProcessesPage.clickProcessInstanceLink(processId);
52
+ await operateProcessInstancePage.completedIconAssertion();
53
+ });
54
+ await c8Run_8_10_1.test.step('Verify echoMetaResult reflects the configured _meta', async () => {
55
+ await operateProcessInstancePage.verifyVariableJsonContent('echoMetaResult', (value) => {
56
+ const data = value;
57
+ (0, test_1.expect)(data.name).toBe('echoMeta');
58
+ (0, test_1.expect)(data.isError).toBe(false);
59
+ (0, test_1.expect)(data.content).toBeDefined();
60
+ (0, test_1.expect)(data.content.length).toBeGreaterThan(0);
61
+ (0, test_1.expect)(data.content[0].type).toBe('text');
62
+ // The mcp-test-server echoMeta tool returns the request `_meta`
63
+ // serialized verbatim as a JSON string. The MCP client forwards
64
+ // `data.connectorMode.meta` unmodified as the request `_meta`, so a
65
+ // successful round-trip proves end-to-end `_meta` propagation.
66
+ const echoed = JSON.parse(data.content[0].text);
67
+ (0, test_1.expect)(echoed).toMatchObject({
68
+ exampleMetaKey: 'exampleMetaValue',
69
+ });
70
+ });
71
+ });
72
+ });
73
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1191",
3
+ "version": "0.0.1192",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,71 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
3
+ xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
4
+ xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
5
+ xmlns:zeebe="http://camunda.org/schema/zeebe/1.0"
6
+ xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
7
+ xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_mcp_meta"
8
+ targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.42.0"
9
+ modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.9.0">
10
+ <bpmn:process id="mcp_remote_client_meta" name="mcp_remote_client_meta" isExecutable="true">
11
+ <bpmn:startEvent id="StartEvent_1">
12
+ <bpmn:outgoing>Flow_start_to_echo</bpmn:outgoing>
13
+ </bpmn:startEvent>
14
+ <bpmn:serviceTask id="Activity_echo_meta"
15
+ zeebe:modelerTemplate="io.camunda.connectors.agenticai.mcp.remoteclient.v0"
16
+ zeebe:modelerTemplateVersion="3">
17
+ <bpmn:extensionElements>
18
+ <zeebe:taskDefinition type="io.camunda.agenticai:mcpremoteclient:1" retries="3" />
19
+ <zeebe:ioMapping>
20
+ <zeebe:input source="http" target="data.transport.type" />
21
+ <zeebe:input source="http://localhost:12001/mcp"
22
+ target="data.transport.http.url" />
23
+ <zeebe:input source="noAuth" target="data.transport.http.authentication.type" />
24
+ <zeebe:input source="=false" target="data.options.clientCache" />
25
+ <zeebe:input source="standalone" target="data.connectorMode.type" />
26
+ <zeebe:input source="tools/call" target="data.connectorMode.operation.type" />
27
+ <zeebe:input source="echoMeta" target="data.connectorMode.operation.toolName" />
28
+ <zeebe:input source="={exampleMetaKey: &#34;exampleMetaValue&#34;}"
29
+ target="data.connectorMode.meta" />
30
+ </zeebe:ioMapping>
31
+ <zeebe:taskHeaders>
32
+ <zeebe:header key="elementTemplateVersion" value="3" />
33
+ <zeebe:header key="elementTemplateId"
34
+ value="io.camunda.connectors.agenticai.mcp.remoteclient.v0" />
35
+ <zeebe:header key="resultVariable" value="echoMetaResult" />
36
+ <zeebe:header key="retryBackoff" value="PT0S" />
37
+ </zeebe:taskHeaders>
38
+ </bpmn:extensionElements>
39
+ <bpmn:incoming>Flow_start_to_echo</bpmn:incoming>
40
+ <bpmn:outgoing>Flow_echo_to_end</bpmn:outgoing>
41
+ </bpmn:serviceTask>
42
+ <bpmn:endEvent id="Event_end">
43
+ <bpmn:incoming>Flow_echo_to_end</bpmn:incoming>
44
+ </bpmn:endEvent>
45
+ <bpmn:sequenceFlow id="Flow_start_to_echo" sourceRef="StartEvent_1"
46
+ targetRef="Activity_echo_meta" />
47
+ <bpmn:sequenceFlow id="Flow_echo_to_end" sourceRef="Activity_echo_meta"
48
+ targetRef="Event_end" />
49
+ </bpmn:process>
50
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
51
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="mcp_remote_client_meta">
52
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
53
+ <dc:Bounds x="152" y="99" width="36" height="36" />
54
+ </bpmndi:BPMNShape>
55
+ <bpmndi:BPMNShape id="Activity_echo_meta_di" bpmnElement="Activity_echo_meta">
56
+ <dc:Bounds x="250" y="77" width="100" height="80" />
57
+ </bpmndi:BPMNShape>
58
+ <bpmndi:BPMNShape id="Event_end_di" bpmnElement="Event_end">
59
+ <dc:Bounds x="412" y="99" width="36" height="36" />
60
+ </bpmndi:BPMNShape>
61
+ <bpmndi:BPMNEdge id="Flow_start_to_echo_di" bpmnElement="Flow_start_to_echo">
62
+ <di:waypoint x="188" y="117" />
63
+ <di:waypoint x="250" y="117" />
64
+ </bpmndi:BPMNEdge>
65
+ <bpmndi:BPMNEdge id="Flow_echo_to_end_di" bpmnElement="Flow_echo_to_end">
66
+ <di:waypoint x="350" y="117" />
67
+ <di:waypoint x="412" y="117" />
68
+ </bpmndi:BPMNEdge>
69
+ </bpmndi:BPMNPlane>
70
+ </bpmndi:BPMNDiagram>
71
+ </bpmn:definitions>