@camunda/e2e-test-suite 0.0.1691 → 0.0.1693
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.
- package/dist/resources/workspace-templates/camunda-nightlies/camunda-nightlies.guidance.md +1 -1
- package/dist/tests/SM-8.10/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.d.ts +1 -0
- package/dist/tests/SM-8.10/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.js +72 -0
- package/dist/tests/SM-8.10/orchestration-cluster-mcp-server/mcp-process-definition-tools.spec.d.ts +1 -0
- package/dist/tests/SM-8.10/orchestration-cluster-mcp-server/mcp-process-definition-tools.spec.js +101 -0
- package/dist/tests/SM-8.10/orchestration-cluster-mcp-server/mcp-process-instance-tools.spec.d.ts +1 -0
- package/dist/tests/SM-8.10/orchestration-cluster-mcp-server/mcp-process-instance-tools.spec.js +107 -0
- package/dist/tests/SM-8.10/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.d.ts +1 -0
- package/dist/tests/SM-8.10/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.js +124 -0
- package/dist/tests/SM-8.11/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.js +72 -0
- package/dist/tests/SM-8.11/orchestration-cluster-mcp-server/mcp-process-definition-tools.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/orchestration-cluster-mcp-server/mcp-process-definition-tools.spec.js +101 -0
- package/dist/tests/SM-8.11/orchestration-cluster-mcp-server/mcp-process-instance-tools.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/orchestration-cluster-mcp-server/mcp-process-instance-tools.spec.js +107 -0
- package/dist/tests/SM-8.11/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.js +124 -0
- package/dist/tests/SM-8.9/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.js +2 -2
- package/package.json +1 -1
- package/playwright.config.ts +6 -0
- package/resources/workspace-templates/camunda-nightlies/camunda-nightlies.guidance.md +1 -1
|
@@ -99,7 +99,7 @@ The monorepo is checked out at `{{.WorkspacePath}}/camunda-{version}/` (e.g. `ca
|
|
|
99
99
|
|
|
100
100
|
A change is considered done only when all of the following hold:
|
|
101
101
|
|
|
102
|
-
- **Lint gate passes**: `npm run lint` in `c8-cross-component-e2e-tests/`; `
|
|
102
|
+
- **Lint gate passes**: `npm run lint` in `c8-cross-component-e2e-tests/`; `helm lint charts/camunda-platform-<version>` and `make go.test chartPath=...` for chart changes; `npm run build` (Docusaurus) for docs.
|
|
103
103
|
- **Nightly re-run is green**: for SM, trigger `test-chart-version-nightly.yaml` for the affected version(s); for c8Run, trigger the matching c8Run nightly workflow.
|
|
104
104
|
- **Cross-repo links are wired**: all PRs reference each other and include the originating nightly run URL.
|
|
105
105
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const SM_8_10_1 = require("../../../fixtures/SM-8.10");
|
|
4
|
+
const _setup_1 = require("../../../test-setup.js");
|
|
5
|
+
const apiHelpers_1 = require("../../../utils/apiHelpers");
|
|
6
|
+
const mcpSmSetup_1 = require("../../../utils/mcpSmSetup");
|
|
7
|
+
const test_1 = require("@playwright/test");
|
|
8
|
+
let authToken;
|
|
9
|
+
let instanceKey;
|
|
10
|
+
SM_8_10_1.test.describe.configure({ mode: 'parallel' });
|
|
11
|
+
SM_8_10_1.test.describe('MCP Gateway - Cluster Tools @tasklistV2', () => {
|
|
12
|
+
SM_8_10_1.test.skip(process.env.MCP_GATEWAY_ENABLED !== 'true', 'MCP gateway not enabled in this deployment');
|
|
13
|
+
SM_8_10_1.test.beforeAll(async () => {
|
|
14
|
+
authToken = await (0, apiHelpers_1.authSmAPI)();
|
|
15
|
+
const processDefinitionKey = await (0, apiHelpers_1.deployProcess)('./resources/mcp_server_sm/mcp_cluster_tools.bpmn', authToken);
|
|
16
|
+
if (processDefinitionKey == null) {
|
|
17
|
+
throw new Error('Failed to deploy cluster tools process');
|
|
18
|
+
}
|
|
19
|
+
const mcpVars = (0, mcpSmSetup_1.getMcpSmVariables)();
|
|
20
|
+
instanceKey = await (0, apiHelpers_1.createProcessInstance)(String(processDefinitionKey), authToken, undefined, undefined, mcpVars);
|
|
21
|
+
});
|
|
22
|
+
SM_8_10_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
|
|
23
|
+
await navigationPage.goToOperate((testInfo.workerIndex + 1) * 1000);
|
|
24
|
+
});
|
|
25
|
+
SM_8_10_1.test.afterEach(async ({ page }, testInfo) => {
|
|
26
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
27
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
28
|
+
});
|
|
29
|
+
const clusterToolTests = [
|
|
30
|
+
{
|
|
31
|
+
name: 'getClusterStatus - returns cluster health status',
|
|
32
|
+
variable: 'mcpResultClusterStatus',
|
|
33
|
+
assertions: [
|
|
34
|
+
{
|
|
35
|
+
text: '"HEALTHY"',
|
|
36
|
+
description: 'cluster status response reports a healthy cluster',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'getTopology - returns cluster topology information',
|
|
42
|
+
variable: 'mcpResultTopology',
|
|
43
|
+
assertions: [
|
|
44
|
+
{ text: 'brokers', description: 'topology response contains brokers' },
|
|
45
|
+
{
|
|
46
|
+
text: 'partitionsCount',
|
|
47
|
+
description: 'topology response contains partitions count',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
for (const testCase of clusterToolTests) {
|
|
53
|
+
(0, SM_8_10_1.test)(testCase.name, async ({ operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
|
|
54
|
+
SM_8_10_1.test.slow();
|
|
55
|
+
await SM_8_10_1.test.step('Navigate to completed process in Operate', async () => {
|
|
56
|
+
await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
|
|
57
|
+
timeout: 60000,
|
|
58
|
+
});
|
|
59
|
+
await operateHomePage.clickProcessesTab();
|
|
60
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
61
|
+
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(instanceKey));
|
|
62
|
+
await operateProcessesPage.clickProcessInstanceLink('MCP Cluster tools', 'completed');
|
|
63
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
64
|
+
});
|
|
65
|
+
for (const assertion of testCase.assertions) {
|
|
66
|
+
await SM_8_10_1.test.step(`Verify ${assertion.description}`, async () => {
|
|
67
|
+
await operateProcessInstancePage.assertProcessVariableContainsText(testCase.variable, assertion.text);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
});
|
package/dist/tests/SM-8.10/orchestration-cluster-mcp-server/mcp-process-definition-tools.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/tests/SM-8.10/orchestration-cluster-mcp-server/mcp-process-definition-tools.spec.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const SM_8_10_1 = require("../../../fixtures/SM-8.10");
|
|
4
|
+
const _setup_1 = require("../../../test-setup.js");
|
|
5
|
+
const apiHelpers_1 = require("../../../utils/apiHelpers");
|
|
6
|
+
const mcpSmSetup_1 = require("../../../utils/mcpSmSetup");
|
|
7
|
+
const test_1 = require("@playwright/test");
|
|
8
|
+
let authToken;
|
|
9
|
+
let toolsInstanceKey;
|
|
10
|
+
SM_8_10_1.test.describe.configure({ mode: 'parallel' });
|
|
11
|
+
SM_8_10_1.test.describe('MCP Gateway - Process Definition Tools @tasklistV2', () => {
|
|
12
|
+
SM_8_10_1.test.skip(process.env.MCP_GATEWAY_ENABLED !== 'true', 'MCP gateway not enabled in this deployment');
|
|
13
|
+
SM_8_10_1.test.beforeAll(async () => {
|
|
14
|
+
authToken = await (0, apiHelpers_1.authSmAPI)();
|
|
15
|
+
const [testFileProcessKey, toolsProcessKey] = await Promise.all([
|
|
16
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_saas/mcp_process_definition_test_file.bpmn', authToken),
|
|
17
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_sm/mcp_process_definition_tools.bpmn', authToken),
|
|
18
|
+
]);
|
|
19
|
+
if (testFileProcessKey == null || toolsProcessKey == null) {
|
|
20
|
+
throw new Error('Failed to deploy process definition tools processes');
|
|
21
|
+
}
|
|
22
|
+
await (0, apiHelpers_1.createProcessInstance)(String(testFileProcessKey), authToken);
|
|
23
|
+
const mcpVars = (0, mcpSmSetup_1.getMcpSmVariables)();
|
|
24
|
+
toolsInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(toolsProcessKey), authToken, undefined, undefined, { ...mcpVars, testFileProcessKey });
|
|
25
|
+
});
|
|
26
|
+
SM_8_10_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
|
|
27
|
+
await navigationPage.goToOperate((testInfo.workerIndex + 1) * 1000);
|
|
28
|
+
});
|
|
29
|
+
SM_8_10_1.test.afterEach(async ({ page }, testInfo) => {
|
|
30
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
31
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
32
|
+
});
|
|
33
|
+
const processDefinitionToolTests = [
|
|
34
|
+
{
|
|
35
|
+
name: 'searchProcessDefinitions - search process definitions with filters such as name and key.',
|
|
36
|
+
variable: 'mcpResultSearchProcessDefinitions',
|
|
37
|
+
assertions: [
|
|
38
|
+
{
|
|
39
|
+
text: 'totalItems',
|
|
40
|
+
description: 'search response contains totalItems field',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
text: 'processDefinitionKey',
|
|
44
|
+
description: 'search response contains processDefinitionKey field',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
text: 'resourceName',
|
|
48
|
+
description: 'search response contains resourceName field',
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'getProcessDefinitionXml - retrieve the BPMN XML of a process definition.',
|
|
54
|
+
variable: 'mcpResultGetProcessDefinitionXml',
|
|
55
|
+
assertions: [
|
|
56
|
+
{
|
|
57
|
+
text: 'bpmn:definitions',
|
|
58
|
+
description: 'XML response contains bpmn:definitions element',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
text: 'bpmn:process',
|
|
62
|
+
description: 'XML response contains bpmn:process element',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'getProcessDefinition - retrieve a process definition by key',
|
|
68
|
+
variable: 'mcpResultGetProcessDefinition',
|
|
69
|
+
assertions: [
|
|
70
|
+
{
|
|
71
|
+
text: 'processDefinitionKey',
|
|
72
|
+
description: 'process definition response contains processDefinitionKey',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
text: 'mcp_process_definition_test_file',
|
|
76
|
+
description: 'process definition response contains correct process name',
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
];
|
|
81
|
+
for (const testCase of processDefinitionToolTests) {
|
|
82
|
+
(0, SM_8_10_1.test)(testCase.name, async ({ operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
|
|
83
|
+
SM_8_10_1.test.slow();
|
|
84
|
+
await SM_8_10_1.test.step('Navigate to completed process in Operate', async () => {
|
|
85
|
+
await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
|
|
86
|
+
timeout: 60000,
|
|
87
|
+
});
|
|
88
|
+
await operateHomePage.clickProcessesTab();
|
|
89
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
90
|
+
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(toolsInstanceKey));
|
|
91
|
+
await operateProcessesPage.clickProcessInstanceLink('MCP Process Definition Tools', 'completed');
|
|
92
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
93
|
+
});
|
|
94
|
+
for (const assertion of testCase.assertions) {
|
|
95
|
+
await SM_8_10_1.test.step(`Verify ${assertion.description}`, async () => {
|
|
96
|
+
await operateProcessInstancePage.assertProcessVariableContainsText(testCase.variable, assertion.text);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
});
|
package/dist/tests/SM-8.10/orchestration-cluster-mcp-server/mcp-process-instance-tools.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/tests/SM-8.10/orchestration-cluster-mcp-server/mcp-process-instance-tools.spec.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const SM_8_10_1 = require("../../../fixtures/SM-8.10");
|
|
4
|
+
const _setup_1 = require("../../../test-setup.js");
|
|
5
|
+
const apiHelpers_1 = require("../../../utils/apiHelpers");
|
|
6
|
+
const mcpSmSetup_1 = require("../../../utils/mcpSmSetup");
|
|
7
|
+
const test_1 = require("@playwright/test");
|
|
8
|
+
let authToken;
|
|
9
|
+
let toolsInstanceKey;
|
|
10
|
+
SM_8_10_1.test.describe.configure({ mode: 'parallel' });
|
|
11
|
+
SM_8_10_1.test.describe('MCP Gateway - Process Instance Tools @tasklistV2', () => {
|
|
12
|
+
SM_8_10_1.test.skip(process.env.MCP_GATEWAY_ENABLED !== 'true', 'MCP gateway not enabled in this deployment');
|
|
13
|
+
SM_8_10_1.test.beforeAll(async () => {
|
|
14
|
+
authToken = await (0, apiHelpers_1.authSmAPI)();
|
|
15
|
+
const [testFileProcessKey, toolsProcessKey] = await Promise.all([
|
|
16
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_saas/mcp_process_instance_test_file.bpmn', authToken),
|
|
17
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_sm/mcp_process_instance_tools.bpmn', authToken),
|
|
18
|
+
]);
|
|
19
|
+
if (testFileProcessKey == null || toolsProcessKey == null) {
|
|
20
|
+
throw new Error('Failed to deploy process instance tools processes');
|
|
21
|
+
}
|
|
22
|
+
const testInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(testFileProcessKey), authToken);
|
|
23
|
+
// Wait for test instance to be indexed before tools instance queries it
|
|
24
|
+
await (0, apiHelpers_1.waitForProcessInstanceVisible)(testInstanceKey, authToken, 'sm');
|
|
25
|
+
const mcpVars = (0, mcpSmSetup_1.getMcpSmVariables)();
|
|
26
|
+
toolsInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(toolsProcessKey), authToken, undefined, undefined, { ...mcpVars, testFileProcessKey, testInstanceKey });
|
|
27
|
+
});
|
|
28
|
+
SM_8_10_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
|
|
29
|
+
await navigationPage.goToOperate((testInfo.workerIndex + 1) * 1000);
|
|
30
|
+
});
|
|
31
|
+
SM_8_10_1.test.afterEach(async ({ page }, testInfo) => {
|
|
32
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
33
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
34
|
+
});
|
|
35
|
+
const processInstanceToolTests = [
|
|
36
|
+
{
|
|
37
|
+
name: 'searchProcessInstances - search process instances with filters such as processDefinitionKey',
|
|
38
|
+
variable: 'mcpResultSearchProcessInstances',
|
|
39
|
+
assertions: [
|
|
40
|
+
{
|
|
41
|
+
text: 'totalItems',
|
|
42
|
+
description: 'search response contains totalItems field',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
text: 'processInstanceKey',
|
|
46
|
+
description: 'search response contains processInstanceKey field',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
text: 'processDefinitionKey',
|
|
50
|
+
description: 'search response contains processDefinitionKey field',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'getProcessInstance - retrieve a process instance by key',
|
|
56
|
+
variable: 'mcpResultGetProcessInstance',
|
|
57
|
+
assertions: [
|
|
58
|
+
{
|
|
59
|
+
text: 'processInstanceKey',
|
|
60
|
+
description: 'process instance response contains processInstanceKey',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
text: 'mcp_process_instance_test_file',
|
|
64
|
+
description: 'process instance response contains correct process name',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
text: 'state',
|
|
68
|
+
description: 'process instance response contains state field',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'createProcessInstance - create a new process instance with variables',
|
|
74
|
+
variable: 'mcpResultCreateProcessInstance',
|
|
75
|
+
assertions: [
|
|
76
|
+
{
|
|
77
|
+
text: 'processInstanceKey',
|
|
78
|
+
description: 'create response contains processInstanceKey',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
text: 'processDefinitionKey',
|
|
82
|
+
description: 'create response contains processDefinitionKey',
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
];
|
|
87
|
+
for (const testCase of processInstanceToolTests) {
|
|
88
|
+
(0, SM_8_10_1.test)(testCase.name, async ({ operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
|
|
89
|
+
SM_8_10_1.test.slow();
|
|
90
|
+
await SM_8_10_1.test.step('Navigate to completed process in Operate', async () => {
|
|
91
|
+
await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
|
|
92
|
+
timeout: 60000,
|
|
93
|
+
});
|
|
94
|
+
await operateHomePage.clickProcessesTab();
|
|
95
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
96
|
+
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(toolsInstanceKey));
|
|
97
|
+
await operateProcessesPage.clickProcessInstanceLink('MCP Process Instance Tools', 'completed');
|
|
98
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
99
|
+
});
|
|
100
|
+
for (const assertion of testCase.assertions) {
|
|
101
|
+
await SM_8_10_1.test.step(assertion.description, async () => {
|
|
102
|
+
await operateProcessInstancePage.assertProcessVariableContainsText(testCase.variable, assertion.text);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const SM_8_10_1 = require("../../../fixtures/SM-8.10");
|
|
4
|
+
const _setup_1 = require("../../../test-setup.js");
|
|
5
|
+
const apiHelpers_1 = require("../../../utils/apiHelpers");
|
|
6
|
+
const userTaskHelpers_1 = require("../../../utils/userTaskHelpers");
|
|
7
|
+
const mcpSmSetup_1 = require("../../../utils/mcpSmSetup");
|
|
8
|
+
const test_1 = require("@playwright/test");
|
|
9
|
+
let authToken;
|
|
10
|
+
let toolsInstanceKey;
|
|
11
|
+
SM_8_10_1.test.describe.configure({ mode: 'parallel' });
|
|
12
|
+
SM_8_10_1.test.describe('MCP Gateway - User Task Tools @tasklistV2', () => {
|
|
13
|
+
SM_8_10_1.test.skip(process.env.MCP_GATEWAY_ENABLED !== 'true', 'MCP gateway not enabled in this deployment');
|
|
14
|
+
SM_8_10_1.test.beforeAll(async () => {
|
|
15
|
+
authToken = await (0, apiHelpers_1.authSmAPI)();
|
|
16
|
+
const [testFileProcessKey, toolsProcessKey] = await Promise.all([
|
|
17
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_saas/mcp_user_task_test_file.bpmn', authToken),
|
|
18
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_sm/mcp_user_task_tools.bpmn', authToken),
|
|
19
|
+
]);
|
|
20
|
+
if (testFileProcessKey == null || toolsProcessKey == null) {
|
|
21
|
+
throw new Error('Failed to deploy user task tools processes');
|
|
22
|
+
}
|
|
23
|
+
// Create test instance which will create a user task
|
|
24
|
+
const testInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(testFileProcessKey), authToken);
|
|
25
|
+
// Get the user task key created by the test instance (with retry logic)
|
|
26
|
+
const testUserTaskKey = await (0, userTaskHelpers_1.getUserTaskKeyByProcessInstanceKey)(testInstanceKey, authToken, 'sm');
|
|
27
|
+
console.log('Creating tools instance with variables:', {
|
|
28
|
+
testFileProcessKey,
|
|
29
|
+
testUserTaskKey,
|
|
30
|
+
});
|
|
31
|
+
// Create tools instance with required variables
|
|
32
|
+
const mcpVars = (0, mcpSmSetup_1.getMcpSmVariables)();
|
|
33
|
+
toolsInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(toolsProcessKey), authToken, undefined, undefined, { ...mcpVars, testFileProcessKey, testUserTaskKey });
|
|
34
|
+
});
|
|
35
|
+
SM_8_10_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
|
|
36
|
+
await navigationPage.goToOperate((testInfo.workerIndex + 1) * 1000);
|
|
37
|
+
});
|
|
38
|
+
SM_8_10_1.test.afterEach(async ({ page }, testInfo) => {
|
|
39
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
40
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
41
|
+
});
|
|
42
|
+
const userTaskToolTests = [
|
|
43
|
+
{
|
|
44
|
+
name: 'searchUserTasks - search user tasks with filters such as processDefinitionKey',
|
|
45
|
+
variable: 'mcpResultSearchUserTasks',
|
|
46
|
+
assertions: [
|
|
47
|
+
{
|
|
48
|
+
text: 'totalItems',
|
|
49
|
+
description: 'search response contains totalItems field',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
text: 'userTaskKey',
|
|
53
|
+
description: 'search response contains userTaskKey field',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
text: 'processDefinitionKey',
|
|
57
|
+
description: 'search response contains processDefinitionKey field',
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'getUserTask - retrieve a user task by key',
|
|
63
|
+
variable: 'mcpResultGetUserTask',
|
|
64
|
+
assertions: [
|
|
65
|
+
{
|
|
66
|
+
text: 'userTaskKey',
|
|
67
|
+
description: 'response contains userTaskKey field',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
text: 'processInstanceKey',
|
|
71
|
+
description: 'response contains processInstanceKey field',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
text: 'assignee',
|
|
75
|
+
description: 'response contains assignee field',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'assignUserTask - update the assignment of a user task',
|
|
81
|
+
variable: 'mcpResultAssignUserTask',
|
|
82
|
+
assertions: [
|
|
83
|
+
{
|
|
84
|
+
text: 'mcpUser',
|
|
85
|
+
description: 'response reflects the assignee value mcpUser',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'searchUserTaskVariables - search variables scoped to a specific user task',
|
|
91
|
+
variable: 'mcpResultSearchUserTaskVariables',
|
|
92
|
+
assertions: [
|
|
93
|
+
{
|
|
94
|
+
text: 'totalItems',
|
|
95
|
+
description: 'search response contains totalItems field',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
text: 'items',
|
|
99
|
+
description: 'search response contains items array',
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
];
|
|
104
|
+
for (const testCase of userTaskToolTests) {
|
|
105
|
+
(0, SM_8_10_1.test)(testCase.name, async ({ operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
|
|
106
|
+
SM_8_10_1.test.slow();
|
|
107
|
+
await SM_8_10_1.test.step('Navigate to completed process in Operate', async () => {
|
|
108
|
+
await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
|
|
109
|
+
timeout: 60000,
|
|
110
|
+
});
|
|
111
|
+
await operateHomePage.clickProcessesTab();
|
|
112
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
113
|
+
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(toolsInstanceKey));
|
|
114
|
+
await operateProcessesPage.clickProcessInstanceLink('MCP User Task Tools', 'completed');
|
|
115
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
116
|
+
});
|
|
117
|
+
for (const assertion of testCase.assertions) {
|
|
118
|
+
await SM_8_10_1.test.step(assertion.description, async () => {
|
|
119
|
+
await operateProcessInstancePage.assertProcessVariableContainsText(testCase.variable, assertion.text);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const SM_8_11_1 = require("../../../fixtures/SM-8.11");
|
|
4
|
+
const _setup_1 = require("../../../test-setup.js");
|
|
5
|
+
const apiHelpers_1 = require("../../../utils/apiHelpers");
|
|
6
|
+
const mcpSmSetup_1 = require("../../../utils/mcpSmSetup");
|
|
7
|
+
const test_1 = require("@playwright/test");
|
|
8
|
+
let authToken;
|
|
9
|
+
let instanceKey;
|
|
10
|
+
SM_8_11_1.test.describe.configure({ mode: 'parallel' });
|
|
11
|
+
SM_8_11_1.test.describe('MCP Gateway - Cluster Tools @tasklistV2', () => {
|
|
12
|
+
SM_8_11_1.test.skip(process.env.MCP_GATEWAY_ENABLED !== 'true', 'MCP gateway not enabled in this deployment');
|
|
13
|
+
SM_8_11_1.test.beforeAll(async () => {
|
|
14
|
+
authToken = await (0, apiHelpers_1.authSmAPI)();
|
|
15
|
+
const processDefinitionKey = await (0, apiHelpers_1.deployProcess)('./resources/mcp_server_sm/mcp_cluster_tools.bpmn', authToken);
|
|
16
|
+
if (processDefinitionKey == null) {
|
|
17
|
+
throw new Error('Failed to deploy cluster tools process');
|
|
18
|
+
}
|
|
19
|
+
const mcpVars = (0, mcpSmSetup_1.getMcpSmVariables)();
|
|
20
|
+
instanceKey = await (0, apiHelpers_1.createProcessInstance)(String(processDefinitionKey), authToken, undefined, undefined, mcpVars);
|
|
21
|
+
});
|
|
22
|
+
SM_8_11_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
|
|
23
|
+
await navigationPage.goToOperate((testInfo.workerIndex + 1) * 1000);
|
|
24
|
+
});
|
|
25
|
+
SM_8_11_1.test.afterEach(async ({ page }, testInfo) => {
|
|
26
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
27
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
28
|
+
});
|
|
29
|
+
const clusterToolTests = [
|
|
30
|
+
{
|
|
31
|
+
name: 'getClusterStatus - returns cluster health status',
|
|
32
|
+
variable: 'mcpResultClusterStatus',
|
|
33
|
+
assertions: [
|
|
34
|
+
{
|
|
35
|
+
text: '"HEALTHY"',
|
|
36
|
+
description: 'cluster status response reports a healthy cluster',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'getTopology - returns cluster topology information',
|
|
42
|
+
variable: 'mcpResultTopology',
|
|
43
|
+
assertions: [
|
|
44
|
+
{ text: 'brokers', description: 'topology response contains brokers' },
|
|
45
|
+
{
|
|
46
|
+
text: 'partitionsCount',
|
|
47
|
+
description: 'topology response contains partitions count',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
for (const testCase of clusterToolTests) {
|
|
53
|
+
(0, SM_8_11_1.test)(testCase.name, async ({ operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
|
|
54
|
+
SM_8_11_1.test.slow();
|
|
55
|
+
await SM_8_11_1.test.step('Navigate to completed process in Operate', async () => {
|
|
56
|
+
await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
|
|
57
|
+
timeout: 60000,
|
|
58
|
+
});
|
|
59
|
+
await operateHomePage.clickProcessesTab();
|
|
60
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
61
|
+
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(instanceKey));
|
|
62
|
+
await operateProcessesPage.clickProcessInstanceLink('MCP Cluster tools', 'completed');
|
|
63
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
64
|
+
});
|
|
65
|
+
for (const assertion of testCase.assertions) {
|
|
66
|
+
await SM_8_11_1.test.step(`Verify ${assertion.description}`, async () => {
|
|
67
|
+
await operateProcessInstancePage.assertProcessVariableContainsText(testCase.variable, assertion.text);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
});
|
package/dist/tests/SM-8.11/orchestration-cluster-mcp-server/mcp-process-definition-tools.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/tests/SM-8.11/orchestration-cluster-mcp-server/mcp-process-definition-tools.spec.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const SM_8_11_1 = require("../../../fixtures/SM-8.11");
|
|
4
|
+
const _setup_1 = require("../../../test-setup.js");
|
|
5
|
+
const apiHelpers_1 = require("../../../utils/apiHelpers");
|
|
6
|
+
const mcpSmSetup_1 = require("../../../utils/mcpSmSetup");
|
|
7
|
+
const test_1 = require("@playwright/test");
|
|
8
|
+
let authToken;
|
|
9
|
+
let toolsInstanceKey;
|
|
10
|
+
SM_8_11_1.test.describe.configure({ mode: 'parallel' });
|
|
11
|
+
SM_8_11_1.test.describe('MCP Gateway - Process Definition Tools @tasklistV2', () => {
|
|
12
|
+
SM_8_11_1.test.skip(process.env.MCP_GATEWAY_ENABLED !== 'true', 'MCP gateway not enabled in this deployment');
|
|
13
|
+
SM_8_11_1.test.beforeAll(async () => {
|
|
14
|
+
authToken = await (0, apiHelpers_1.authSmAPI)();
|
|
15
|
+
const [testFileProcessKey, toolsProcessKey] = await Promise.all([
|
|
16
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_saas/mcp_process_definition_test_file.bpmn', authToken),
|
|
17
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_sm/mcp_process_definition_tools.bpmn', authToken),
|
|
18
|
+
]);
|
|
19
|
+
if (testFileProcessKey == null || toolsProcessKey == null) {
|
|
20
|
+
throw new Error('Failed to deploy process definition tools processes');
|
|
21
|
+
}
|
|
22
|
+
await (0, apiHelpers_1.createProcessInstance)(String(testFileProcessKey), authToken);
|
|
23
|
+
const mcpVars = (0, mcpSmSetup_1.getMcpSmVariables)();
|
|
24
|
+
toolsInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(toolsProcessKey), authToken, undefined, undefined, { ...mcpVars, testFileProcessKey });
|
|
25
|
+
});
|
|
26
|
+
SM_8_11_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
|
|
27
|
+
await navigationPage.goToOperate((testInfo.workerIndex + 1) * 1000);
|
|
28
|
+
});
|
|
29
|
+
SM_8_11_1.test.afterEach(async ({ page }, testInfo) => {
|
|
30
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
31
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
32
|
+
});
|
|
33
|
+
const processDefinitionToolTests = [
|
|
34
|
+
{
|
|
35
|
+
name: 'searchProcessDefinitions - search process definitions with filters such as name and key.',
|
|
36
|
+
variable: 'mcpResultSearchProcessDefinitions',
|
|
37
|
+
assertions: [
|
|
38
|
+
{
|
|
39
|
+
text: 'totalItems',
|
|
40
|
+
description: 'search response contains totalItems field',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
text: 'processDefinitionKey',
|
|
44
|
+
description: 'search response contains processDefinitionKey field',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
text: 'resourceName',
|
|
48
|
+
description: 'search response contains resourceName field',
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'getProcessDefinitionXml - retrieve the BPMN XML of a process definition.',
|
|
54
|
+
variable: 'mcpResultGetProcessDefinitionXml',
|
|
55
|
+
assertions: [
|
|
56
|
+
{
|
|
57
|
+
text: 'bpmn:definitions',
|
|
58
|
+
description: 'XML response contains bpmn:definitions element',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
text: 'bpmn:process',
|
|
62
|
+
description: 'XML response contains bpmn:process element',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'getProcessDefinition - retrieve a process definition by key',
|
|
68
|
+
variable: 'mcpResultGetProcessDefinition',
|
|
69
|
+
assertions: [
|
|
70
|
+
{
|
|
71
|
+
text: 'processDefinitionKey',
|
|
72
|
+
description: 'process definition response contains processDefinitionKey',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
text: 'mcp_process_definition_test_file',
|
|
76
|
+
description: 'process definition response contains correct process name',
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
];
|
|
81
|
+
for (const testCase of processDefinitionToolTests) {
|
|
82
|
+
(0, SM_8_11_1.test)(testCase.name, async ({ operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
|
|
83
|
+
SM_8_11_1.test.slow();
|
|
84
|
+
await SM_8_11_1.test.step('Navigate to completed process in Operate', async () => {
|
|
85
|
+
await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
|
|
86
|
+
timeout: 60000,
|
|
87
|
+
});
|
|
88
|
+
await operateHomePage.clickProcessesTab();
|
|
89
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
90
|
+
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(toolsInstanceKey));
|
|
91
|
+
await operateProcessesPage.clickProcessInstanceLink('MCP Process Definition Tools', 'completed');
|
|
92
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
93
|
+
});
|
|
94
|
+
for (const assertion of testCase.assertions) {
|
|
95
|
+
await SM_8_11_1.test.step(`Verify ${assertion.description}`, async () => {
|
|
96
|
+
await operateProcessInstancePage.assertProcessVariableContainsText(testCase.variable, assertion.text);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
});
|
package/dist/tests/SM-8.11/orchestration-cluster-mcp-server/mcp-process-instance-tools.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/tests/SM-8.11/orchestration-cluster-mcp-server/mcp-process-instance-tools.spec.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const SM_8_11_1 = require("../../../fixtures/SM-8.11");
|
|
4
|
+
const _setup_1 = require("../../../test-setup.js");
|
|
5
|
+
const apiHelpers_1 = require("../../../utils/apiHelpers");
|
|
6
|
+
const mcpSmSetup_1 = require("../../../utils/mcpSmSetup");
|
|
7
|
+
const test_1 = require("@playwright/test");
|
|
8
|
+
let authToken;
|
|
9
|
+
let toolsInstanceKey;
|
|
10
|
+
SM_8_11_1.test.describe.configure({ mode: 'parallel' });
|
|
11
|
+
SM_8_11_1.test.describe('MCP Gateway - Process Instance Tools @tasklistV2', () => {
|
|
12
|
+
SM_8_11_1.test.skip(process.env.MCP_GATEWAY_ENABLED !== 'true', 'MCP gateway not enabled in this deployment');
|
|
13
|
+
SM_8_11_1.test.beforeAll(async () => {
|
|
14
|
+
authToken = await (0, apiHelpers_1.authSmAPI)();
|
|
15
|
+
const [testFileProcessKey, toolsProcessKey] = await Promise.all([
|
|
16
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_saas/mcp_process_instance_test_file.bpmn', authToken),
|
|
17
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_sm/mcp_process_instance_tools.bpmn', authToken),
|
|
18
|
+
]);
|
|
19
|
+
if (testFileProcessKey == null || toolsProcessKey == null) {
|
|
20
|
+
throw new Error('Failed to deploy process instance tools processes');
|
|
21
|
+
}
|
|
22
|
+
const testInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(testFileProcessKey), authToken);
|
|
23
|
+
// Wait for test instance to be indexed before tools instance queries it
|
|
24
|
+
await (0, apiHelpers_1.waitForProcessInstanceVisible)(testInstanceKey, authToken, 'sm');
|
|
25
|
+
const mcpVars = (0, mcpSmSetup_1.getMcpSmVariables)();
|
|
26
|
+
toolsInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(toolsProcessKey), authToken, undefined, undefined, { ...mcpVars, testFileProcessKey, testInstanceKey });
|
|
27
|
+
});
|
|
28
|
+
SM_8_11_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
|
|
29
|
+
await navigationPage.goToOperate((testInfo.workerIndex + 1) * 1000);
|
|
30
|
+
});
|
|
31
|
+
SM_8_11_1.test.afterEach(async ({ page }, testInfo) => {
|
|
32
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
33
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
34
|
+
});
|
|
35
|
+
const processInstanceToolTests = [
|
|
36
|
+
{
|
|
37
|
+
name: 'searchProcessInstances - search process instances with filters such as processDefinitionKey',
|
|
38
|
+
variable: 'mcpResultSearchProcessInstances',
|
|
39
|
+
assertions: [
|
|
40
|
+
{
|
|
41
|
+
text: 'totalItems',
|
|
42
|
+
description: 'search response contains totalItems field',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
text: 'processInstanceKey',
|
|
46
|
+
description: 'search response contains processInstanceKey field',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
text: 'processDefinitionKey',
|
|
50
|
+
description: 'search response contains processDefinitionKey field',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'getProcessInstance - retrieve a process instance by key',
|
|
56
|
+
variable: 'mcpResultGetProcessInstance',
|
|
57
|
+
assertions: [
|
|
58
|
+
{
|
|
59
|
+
text: 'processInstanceKey',
|
|
60
|
+
description: 'process instance response contains processInstanceKey',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
text: 'mcp_process_instance_test_file',
|
|
64
|
+
description: 'process instance response contains correct process name',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
text: 'state',
|
|
68
|
+
description: 'process instance response contains state field',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'createProcessInstance - create a new process instance with variables',
|
|
74
|
+
variable: 'mcpResultCreateProcessInstance',
|
|
75
|
+
assertions: [
|
|
76
|
+
{
|
|
77
|
+
text: 'processInstanceKey',
|
|
78
|
+
description: 'create response contains processInstanceKey',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
text: 'processDefinitionKey',
|
|
82
|
+
description: 'create response contains processDefinitionKey',
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
];
|
|
87
|
+
for (const testCase of processInstanceToolTests) {
|
|
88
|
+
(0, SM_8_11_1.test)(testCase.name, async ({ operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
|
|
89
|
+
SM_8_11_1.test.slow();
|
|
90
|
+
await SM_8_11_1.test.step('Navigate to completed process in Operate', async () => {
|
|
91
|
+
await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
|
|
92
|
+
timeout: 60000,
|
|
93
|
+
});
|
|
94
|
+
await operateHomePage.clickProcessesTab();
|
|
95
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
96
|
+
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(toolsInstanceKey));
|
|
97
|
+
await operateProcessesPage.clickProcessInstanceLink('MCP Process Instance Tools', 'completed');
|
|
98
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
99
|
+
});
|
|
100
|
+
for (const assertion of testCase.assertions) {
|
|
101
|
+
await SM_8_11_1.test.step(assertion.description, async () => {
|
|
102
|
+
await operateProcessInstancePage.assertProcessVariableContainsText(testCase.variable, assertion.text);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const SM_8_11_1 = require("../../../fixtures/SM-8.11");
|
|
4
|
+
const _setup_1 = require("../../../test-setup.js");
|
|
5
|
+
const apiHelpers_1 = require("../../../utils/apiHelpers");
|
|
6
|
+
const userTaskHelpers_1 = require("../../../utils/userTaskHelpers");
|
|
7
|
+
const mcpSmSetup_1 = require("../../../utils/mcpSmSetup");
|
|
8
|
+
const test_1 = require("@playwright/test");
|
|
9
|
+
let authToken;
|
|
10
|
+
let toolsInstanceKey;
|
|
11
|
+
SM_8_11_1.test.describe.configure({ mode: 'parallel' });
|
|
12
|
+
SM_8_11_1.test.describe('MCP Gateway - User Task Tools @tasklistV2', () => {
|
|
13
|
+
SM_8_11_1.test.skip(process.env.MCP_GATEWAY_ENABLED !== 'true', 'MCP gateway not enabled in this deployment');
|
|
14
|
+
SM_8_11_1.test.beforeAll(async () => {
|
|
15
|
+
authToken = await (0, apiHelpers_1.authSmAPI)();
|
|
16
|
+
const [testFileProcessKey, toolsProcessKey] = await Promise.all([
|
|
17
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_saas/mcp_user_task_test_file.bpmn', authToken),
|
|
18
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_sm/mcp_user_task_tools.bpmn', authToken),
|
|
19
|
+
]);
|
|
20
|
+
if (testFileProcessKey == null || toolsProcessKey == null) {
|
|
21
|
+
throw new Error('Failed to deploy user task tools processes');
|
|
22
|
+
}
|
|
23
|
+
// Create test instance which will create a user task
|
|
24
|
+
const testInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(testFileProcessKey), authToken);
|
|
25
|
+
// Get the user task key created by the test instance (with retry logic)
|
|
26
|
+
const testUserTaskKey = await (0, userTaskHelpers_1.getUserTaskKeyByProcessInstanceKey)(testInstanceKey, authToken, 'sm');
|
|
27
|
+
console.log('Creating tools instance with variables:', {
|
|
28
|
+
testFileProcessKey,
|
|
29
|
+
testUserTaskKey,
|
|
30
|
+
});
|
|
31
|
+
// Create tools instance with required variables
|
|
32
|
+
const mcpVars = (0, mcpSmSetup_1.getMcpSmVariables)();
|
|
33
|
+
toolsInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(toolsProcessKey), authToken, undefined, undefined, { ...mcpVars, testFileProcessKey, testUserTaskKey });
|
|
34
|
+
});
|
|
35
|
+
SM_8_11_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
|
|
36
|
+
await navigationPage.goToOperate((testInfo.workerIndex + 1) * 1000);
|
|
37
|
+
});
|
|
38
|
+
SM_8_11_1.test.afterEach(async ({ page }, testInfo) => {
|
|
39
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
40
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
41
|
+
});
|
|
42
|
+
const userTaskToolTests = [
|
|
43
|
+
{
|
|
44
|
+
name: 'searchUserTasks - search user tasks with filters such as processDefinitionKey',
|
|
45
|
+
variable: 'mcpResultSearchUserTasks',
|
|
46
|
+
assertions: [
|
|
47
|
+
{
|
|
48
|
+
text: 'totalItems',
|
|
49
|
+
description: 'search response contains totalItems field',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
text: 'userTaskKey',
|
|
53
|
+
description: 'search response contains userTaskKey field',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
text: 'processDefinitionKey',
|
|
57
|
+
description: 'search response contains processDefinitionKey field',
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'getUserTask - retrieve a user task by key',
|
|
63
|
+
variable: 'mcpResultGetUserTask',
|
|
64
|
+
assertions: [
|
|
65
|
+
{
|
|
66
|
+
text: 'userTaskKey',
|
|
67
|
+
description: 'response contains userTaskKey field',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
text: 'processInstanceKey',
|
|
71
|
+
description: 'response contains processInstanceKey field',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
text: 'assignee',
|
|
75
|
+
description: 'response contains assignee field',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'assignUserTask - update the assignment of a user task',
|
|
81
|
+
variable: 'mcpResultAssignUserTask',
|
|
82
|
+
assertions: [
|
|
83
|
+
{
|
|
84
|
+
text: 'mcpUser',
|
|
85
|
+
description: 'response reflects the assignee value mcpUser',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'searchUserTaskVariables - search variables scoped to a specific user task',
|
|
91
|
+
variable: 'mcpResultSearchUserTaskVariables',
|
|
92
|
+
assertions: [
|
|
93
|
+
{
|
|
94
|
+
text: 'totalItems',
|
|
95
|
+
description: 'search response contains totalItems field',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
text: 'items',
|
|
99
|
+
description: 'search response contains items array',
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
];
|
|
104
|
+
for (const testCase of userTaskToolTests) {
|
|
105
|
+
(0, SM_8_11_1.test)(testCase.name, async ({ operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
|
|
106
|
+
SM_8_11_1.test.slow();
|
|
107
|
+
await SM_8_11_1.test.step('Navigate to completed process in Operate', async () => {
|
|
108
|
+
await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
|
|
109
|
+
timeout: 60000,
|
|
110
|
+
});
|
|
111
|
+
await operateHomePage.clickProcessesTab();
|
|
112
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
113
|
+
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(toolsInstanceKey));
|
|
114
|
+
await operateProcessesPage.clickProcessInstanceLink('MCP User Task Tools', 'completed');
|
|
115
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
116
|
+
});
|
|
117
|
+
for (const assertion of testCase.assertions) {
|
|
118
|
+
await SM_8_11_1.test.step(assertion.description, async () => {
|
|
119
|
+
await operateProcessInstancePage.assertProcessVariableContainsText(testCase.variable, assertion.text);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
});
|
|
@@ -32,8 +32,8 @@ SM_8_9_1.test.describe('MCP Gateway - Cluster Tools @tasklistV2', () => {
|
|
|
32
32
|
variable: 'mcpResultClusterStatus',
|
|
33
33
|
assertions: [
|
|
34
34
|
{
|
|
35
|
-
text: 'HEALTHY',
|
|
36
|
-
description: 'cluster status response
|
|
35
|
+
text: '"HEALTHY"',
|
|
36
|
+
description: 'cluster status response reports a healthy cluster',
|
|
37
37
|
},
|
|
38
38
|
],
|
|
39
39
|
},
|
package/package.json
CHANGED
package/playwright.config.ts
CHANGED
|
@@ -111,11 +111,13 @@ const useReportersWithSlack: any[] = [
|
|
|
111
111
|
const isMT = process.env.IS_MT === 'true';
|
|
112
112
|
const isDS = process.env.IS_DS === 'true';
|
|
113
113
|
const isLICENSEKEY = process.env.IS_LICENSE_KEY === 'true';
|
|
114
|
+
const isMCP = process.env.MCP_GATEWAY_ENABLED === 'true';
|
|
114
115
|
|
|
115
116
|
let suffix = '';
|
|
116
117
|
if (isRBA) suffix += ' - RBA';
|
|
117
118
|
if (isMT) suffix += ' - Multi-Tenancy';
|
|
118
119
|
if (isDS) suffix += ' - DocumentStore';
|
|
120
|
+
if (isMCP) suffix += ' - MCP';
|
|
119
121
|
if (isLICENSEKEY)
|
|
120
122
|
suffix += ` - License-Key- ${process.env.LICENSE_KEY}`;
|
|
121
123
|
const tasklistSuffix = process.env.TASKLIST_VERSION
|
|
@@ -132,11 +134,13 @@ const useReportersWithSlack: any[] = [
|
|
|
132
134
|
const isMT = process.env.IS_MT === 'true';
|
|
133
135
|
const isDS = process.env.IS_DS === 'true';
|
|
134
136
|
const isLICENSEKEY = process.env.IS_LICENSE_KEY === 'true';
|
|
137
|
+
const isMCP = process.env.MCP_GATEWAY_ENABLED === 'true';
|
|
135
138
|
|
|
136
139
|
let suffix = '';
|
|
137
140
|
if (isRBA) suffix += ' - RBA';
|
|
138
141
|
if (isMT) suffix += ' - Multi-Tenancy';
|
|
139
142
|
if (isDS) suffix += ' - DocumentStore';
|
|
143
|
+
if (isMCP) suffix += ' - MCP';
|
|
140
144
|
if (isLICENSEKEY)
|
|
141
145
|
suffix += ` - License-Key- ${process.env.LICENSE_KEY}`;
|
|
142
146
|
const tasklistSuffix = process.env.TASKLIST_VERSION
|
|
@@ -153,11 +157,13 @@ const useReportersWithSlack: any[] = [
|
|
|
153
157
|
const isMT = process.env.IS_MT === 'true';
|
|
154
158
|
const isDS = process.env.IS_DS === 'true';
|
|
155
159
|
const isLICENSEKEY = process.env.IS_LICENSE_KEY === 'true';
|
|
160
|
+
const isMCP = process.env.MCP_GATEWAY_ENABLED === 'true';
|
|
156
161
|
|
|
157
162
|
let suffix = '';
|
|
158
163
|
if (isRBA) suffix += ' - RBA';
|
|
159
164
|
if (isMT) suffix += ' - Multi-Tenancy';
|
|
160
165
|
if (isDS) suffix += ' - DocumentStore';
|
|
166
|
+
if (isMCP) suffix += ' - MCP';
|
|
161
167
|
if (isLICENSEKEY)
|
|
162
168
|
suffix += ` - License-Key- ${process.env.LICENSE_KEY}`;
|
|
163
169
|
const tasklistSuffix = process.env.TASKLIST_VERSION
|
|
@@ -99,7 +99,7 @@ The monorepo is checked out at `{{.WorkspacePath}}/camunda-{version}/` (e.g. `ca
|
|
|
99
99
|
|
|
100
100
|
A change is considered done only when all of the following hold:
|
|
101
101
|
|
|
102
|
-
- **Lint gate passes**: `npm run lint` in `c8-cross-component-e2e-tests/`; `
|
|
102
|
+
- **Lint gate passes**: `npm run lint` in `c8-cross-component-e2e-tests/`; `helm lint charts/camunda-platform-<version>` and `make go.test chartPath=...` for chart changes; `npm run build` (Docusaurus) for docs.
|
|
103
103
|
- **Nightly re-run is green**: for SM, trigger `test-chart-version-nightly.yaml` for the affected version(s); for c8Run, trigger the matching c8Run nightly workflow.
|
|
104
104
|
- **Cross-repo links are wired**: all PRs reference each other and include the originating nightly run URL.
|
|
105
105
|
|