@camunda/e2e-test-suite 0.0.262 → 0.0.264

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.
@@ -10,7 +10,7 @@ const testUser = (0, users_1.getTestUser)('fourteenthUser');
10
10
  let authToken;
11
11
  let instanceKey;
12
12
  _8_9_1.test.describe.configure({ mode: 'parallel' });
13
- _8_9_1.test.describe('Orchestration Cluster MCP Server - Cluster Tools', () => {
13
+ _8_9_1.test.describe('Orchestration Cluster MCP Server - Cluster Tools @tasklistV2', () => {
14
14
  const clusterName = 'Agentic Orchestration Cluster';
15
15
  _8_9_1.test.beforeAll(async () => {
16
16
  authToken = await (0, apiHelpers_1.authSaasAPI)(undefined, 'agentic_cluster');
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const _8_9_1 = require("../../../fixtures/8.9");
4
+ const UtilitiesPage_1 = require("../../../pages/8.9/UtilitiesPage");
5
+ const _setup_1 = require("../../../test-setup.js");
6
+ const apiHelpers_1 = require("../../../utils/apiHelpers");
7
+ const users_1 = require("../../../utils/users");
8
+ const test_1 = require("@playwright/test");
9
+ const testUser = (0, users_1.getTestUser)('fourteenthUser');
10
+ let authToken;
11
+ let toolsInstanceKey;
12
+ _8_9_1.test.describe.configure({ mode: 'parallel' });
13
+ _8_9_1.test.describe('Orchestration Cluster MCP Server - Process Definition Tools @tasklistV2', () => {
14
+ const clusterName = 'Agentic Orchestration Cluster';
15
+ _8_9_1.test.beforeAll(async () => {
16
+ authToken = await (0, apiHelpers_1.authSaasAPI)(undefined, 'agentic_cluster');
17
+ const [testFileProcessKey, toolsProcessKey] = await Promise.all([
18
+ (0, apiHelpers_1.deployProcess)('./resources/mcp_server_saas/mcp_process_definition_test_file.bpmn', authToken, 'saas', 'agentic_cluster'),
19
+ (0, apiHelpers_1.deployProcess)('./resources/mcp_server_saas/mcp_process_definition_tools.bpmn', authToken, 'saas', 'agentic_cluster'),
20
+ ]);
21
+ if (testFileProcessKey == null || toolsProcessKey == null) {
22
+ throw new Error('Failed to deploy process definition tools processes');
23
+ }
24
+ await (0, apiHelpers_1.createProcessInstance)(String(testFileProcessKey), authToken, 'saas', 'agentic_cluster');
25
+ toolsInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(toolsProcessKey), authToken, 'saas', 'agentic_cluster', { testFileProcessKey });
26
+ });
27
+ _8_9_1.test.beforeEach(async ({ page, loginPage }, testInfo) => {
28
+ await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
29
+ });
30
+ _8_9_1.test.afterEach(async ({ page }, testInfo) => {
31
+ await (0, _setup_1.captureScreenshot)(page, testInfo);
32
+ await (0, _setup_1.captureFailureVideo)(page, testInfo);
33
+ });
34
+ const processDefinitionToolTests = [
35
+ {
36
+ name: 'searchProcessDefinitions - search process definitions with filters such as name and key.',
37
+ variable: 'mcpResultSearchProcessDefinitions',
38
+ assertions: [
39
+ {
40
+ text: 'totalItems',
41
+ description: 'search response contains totalItems field',
42
+ },
43
+ {
44
+ text: 'processDefinitionKey',
45
+ description: 'search response contains processDefinitionKey field',
46
+ },
47
+ {
48
+ text: 'resourceName',
49
+ description: 'search response contains resourceName field',
50
+ },
51
+ ],
52
+ },
53
+ {
54
+ name: 'getProcessDefinitionXml - retrieve the BPMN XML of a process definition.',
55
+ variable: 'mcpResultGetProcessDefinitionXml',
56
+ assertions: [
57
+ {
58
+ text: 'bpmn:definitions',
59
+ description: 'XML response contains bpmn:definitions element',
60
+ },
61
+ {
62
+ text: 'bpmn:process',
63
+ description: 'XML response contains bpmn:process element',
64
+ },
65
+ ],
66
+ },
67
+ {
68
+ name: 'getProcessDefinition - retrieve a process definition by key',
69
+ variable: 'mcpResultGetProcessDefinition',
70
+ assertions: [
71
+ {
72
+ text: 'processDefinitionKey',
73
+ description: 'process definition response contains processDefinitionKey',
74
+ },
75
+ {
76
+ text: 'mcp_process_definition_test_file',
77
+ description: 'process definition response contains correct process name',
78
+ },
79
+ ],
80
+ },
81
+ ];
82
+ for (const testCase of processDefinitionToolTests) {
83
+ (0, _8_9_1.test)(testCase.name, async ({ homePage, appsPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
84
+ _8_9_1.test.slow();
85
+ await _8_9_1.test.step('Navigate to completed process in Operate', async () => {
86
+ await homePage.clickClusters();
87
+ await appsPage.clickOperate(clusterName);
88
+ await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
89
+ timeout: 60000,
90
+ });
91
+ await operateHomePage.clickProcessesTab();
92
+ await operateProcessesPage.clickProcessCompletedCheckbox();
93
+ await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(toolsInstanceKey));
94
+ await operateProcessesPage.clickProcessInstanceLink('MCP Process Definition Tools');
95
+ await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
96
+ });
97
+ for (const assertion of testCase.assertions) {
98
+ await _8_9_1.test.step(`Verify ${assertion.description}`, async () => {
99
+ await operateProcessInstancePage.assertProcessVariableContainsText(testCase.variable, assertion.text);
100
+ });
101
+ }
102
+ });
103
+ }
104
+ });
@@ -52,7 +52,7 @@ _8_9_1.test.describe('Cluster Setup Tests', () => {
52
52
  await clusterSecretsPage.createSetOfSecrets(clusterName, connectorSecrets_1.connectorSecretsValues);
53
53
  }
54
54
  });
55
- (0, _8_9_1.test)('Create Agentic Orchestration Cluster', async ({ page, loginPage, homePage, clusterPage, clusterDetailsPage, clusterSecretsPage, }, testInfo) => {
55
+ (0, _8_9_1.test)('Create Agentic Orchestration Cluster @tasklistV2', async ({ page, loginPage, homePage, clusterPage, clusterDetailsPage, clusterSecretsPage, }, testInfo) => {
56
56
  if (process.env.IS_PROD === 'true') {
57
57
  _8_9_1.test.skip(true, 'Skipping test because not required on PROD test org');
58
58
  }
@@ -78,6 +78,8 @@ _8_9_1.test.describe('Cluster Setup Tests', () => {
78
78
  await clusterDetailsPage.clickCloseModalButton();
79
79
  await clusterPage.clickConnectorSecretsTab(clusterName);
80
80
  await clusterSecretsPage.createSetOfSecrets(clusterName, (0, mcpSecrets_1.mcpSecretsValues)(mcpCredentials));
81
+ // Double validate that all MCP secrets are properly created
82
+ await clusterSecretsPage.assertSecretsOrCreate(clusterName, (0, mcpSecrets_1.mcpSecretsValues)(mcpCredentials));
81
83
  });
82
84
  (0, _8_9_1.test)('Create AWS Cluster', async ({ page, loginPage, homePage, clusterPage, clusterDetailsPage, clusterSecretsPage, }, testInfo) => {
83
85
  await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, users_1.testUsers.mainUser, (testInfo.workerIndex + 1) * 1000);
@@ -12,7 +12,7 @@ export declare function authSmAPI(): Promise<string>;
12
12
  export declare function authC8runAPI(name: string, password: string): Promise<void>;
13
13
  export declare function validateMcpServerHealth(serverUrl?: string): Promise<APIResponse>;
14
14
  export declare function deployProcess(filePath: string, authToken?: string, environment?: 'saas' | 'sm', clusterType?: string): Promise<number | null>;
15
- export declare function createProcessInstance(processDefinitionKey: string, authToken?: string, environment?: 'saas' | 'sm', clusterType?: string): Promise<string>;
15
+ export declare function createProcessInstance(processDefinitionKey: string, authToken?: string, environment?: 'saas' | 'sm', clusterType?: string, variables?: Record<string, unknown>): Promise<string>;
16
16
  export declare function createJsonClusterVariable(authToken?: string, environment?: 'saas' | 'sm', customVariableName?: string, customVariableValue?: string, clusterType?: string): Promise<void>;
17
17
  export declare function createStringClusterVariable(authToken?: string, environment?: 'saas' | 'sm', customVariableName?: string, customVariableValue?: string, clusterType?: string): Promise<void>;
18
18
  /**
@@ -269,7 +269,7 @@ async function deployProcess(filePath, authToken, environment, clusterType) {
269
269
  }
270
270
  }
271
271
  exports.deployProcess = deployProcess;
272
- async function createProcessInstance(processDefinitionKey, authToken, environment, clusterType) {
272
+ async function createProcessInstance(processDefinitionKey, authToken, environment, clusterType, variables) {
273
273
  apiRequestContext = await getApiRequestContext();
274
274
  const url = buildZeebeApiUrl('/v2/process-instances', environment, clusterType);
275
275
  const response = await apiRequestContext.post(url, {
@@ -278,7 +278,7 @@ async function createProcessInstance(processDefinitionKey, authToken, environmen
278
278
  },
279
279
  data: {
280
280
  processDefinitionKey: String(processDefinitionKey),
281
- variables: {},
281
+ variables: variables ?? {},
282
282
  },
283
283
  });
284
284
  (0, test_1.expect)(response.status()).toBe(200);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.262",
3
+ "version": "0.0.264",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",