@camunda/e2e-test-suite 0.0.457 → 0.0.459

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.
@@ -32,6 +32,7 @@ import { OCIdentityHomePage } from '../pages/8.10/OCIdentityHomePage';
32
32
  import { OCIdentityMappingRulesPage } from '../pages/8.10/OCIdentityMappingRulesPage';
33
33
  import { OCIdentityRolesPage } from '../pages/8.10/OCIdentityRolesPage';
34
34
  import { OCIdentityAuthorizationsPage } from '../pages/8.10/OCIdentityAuthorizationsPage';
35
+ import { OCIdentityClusterVariablesPage } from '../pages/8.10/OCIdentityClusterVariablesPage';
35
36
  import { ClientCredentialsDetailsPage } from '../pages/8.10/ClientCredentialsDetailsPage';
36
37
  type PlaywrightFixtures = {
37
38
  makeAxeBuilder: () => AxeBuilder;
@@ -68,6 +69,7 @@ type PlaywrightFixtures = {
68
69
  ocIdentityMappingRulesPage: OCIdentityMappingRulesPage;
69
70
  ocIdentityRolesPage: OCIdentityRolesPage;
70
71
  ocIdentityAuthorizationsPage: OCIdentityAuthorizationsPage;
72
+ ocIdentityClusterVariablesPage: OCIdentityClusterVariablesPage;
71
73
  clientCredentialsDetailsPage: ClientCredentialsDetailsPage;
72
74
  overrideTrackingScripts: void;
73
75
  };
@@ -39,6 +39,7 @@ const OCIdentityHomePage_1 = require("../pages/8.10/OCIdentityHomePage");
39
39
  const OCIdentityMappingRulesPage_1 = require("../pages/8.10/OCIdentityMappingRulesPage");
40
40
  const OCIdentityRolesPage_1 = require("../pages/8.10/OCIdentityRolesPage");
41
41
  const OCIdentityAuthorizationsPage_1 = require("../pages/8.10/OCIdentityAuthorizationsPage");
42
+ const OCIdentityClusterVariablesPage_1 = require("../pages/8.10/OCIdentityClusterVariablesPage");
42
43
  const ClientCredentialsDetailsPage_1 = require("../pages/8.10/ClientCredentialsDetailsPage");
43
44
  const test = test_1.test.extend({
44
45
  makeAxeBuilder: async ({ page }, use) => {
@@ -151,6 +152,9 @@ const test = test_1.test.extend({
151
152
  ocIdentityGroupsPage: async ({ page }, use) => {
152
153
  await use(new OCIdentityGroupsPage_1.OCIdentityGroupsPage(page));
153
154
  },
155
+ ocIdentityClusterVariablesPage: async ({ page }, use) => {
156
+ await use(new OCIdentityClusterVariablesPage_1.OCIdentityClusterVariablesPage(page));
157
+ },
154
158
  clientCredentialsDetailsPage: async ({ page }, use) => {
155
159
  await use(new ClientCredentialsDetailsPage_1.ClientCredentialsDetailsPage(page));
156
160
  },
@@ -15,7 +15,7 @@ class ClientCredentialsDetailsPage {
15
15
  }
16
16
  async isOpen(clientName) {
17
17
  await (0, test_1.expect)(this.clientNameHeading(clientName)).toBeVisible({
18
- timeout: 30000,
18
+ timeout: 60000,
19
19
  });
20
20
  }
21
21
  async getOperateUrl() {
@@ -137,7 +137,7 @@ class ClusterDetailsPage {
137
137
  this.orchestrationClusterCheckbox = page
138
138
  .locator('label')
139
139
  .filter({ hasText: /^Orchestration Cluster API$/ });
140
- this.clientCredentialsLink = (clientCredentials) => page.getByRole('cell', { name: clientCredentials });
140
+ this.clientCredentialsLink = (clientCredentials) => page.getByRole('cell', { name: clientCredentials }).locator('a');
141
141
  this.reviewUpdateButton = page.getByRole('button', { name: 'Review Update' });
142
142
  this.updateAvailableDialog = page
143
143
  .locator('.cds--modal-container')
@@ -0,0 +1,20 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ export declare class OCIdentityClusterVariablesPage {
3
+ private page;
4
+ readonly variablesList: Locator;
5
+ readonly editVariableButton: (variableName: string) => Locator;
6
+ readonly editVariableModal: Locator;
7
+ readonly variableValueField: Locator;
8
+ readonly saveVariableButton: Locator;
9
+ readonly closeEditVariableModal: Locator;
10
+ readonly cancelButton: Locator;
11
+ readonly variableRow: (variableName: string) => Locator;
12
+ readonly monacoEditor: Locator;
13
+ readonly monacoEditorTextArea: Locator;
14
+ readonly successMessage: Locator;
15
+ readonly editMenuItem: Locator;
16
+ constructor(page: Page);
17
+ editVariable(variableName: string, newValue: string): Promise<void>;
18
+ assertVariableExists(variableName: string): Promise<void>;
19
+ assertVariableValue(variableName: string, expectedValue: string): Promise<void>;
20
+ }
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OCIdentityClusterVariablesPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ class OCIdentityClusterVariablesPage {
6
+ page;
7
+ variablesList;
8
+ editVariableButton;
9
+ editVariableModal;
10
+ variableValueField;
11
+ saveVariableButton;
12
+ closeEditVariableModal;
13
+ cancelButton;
14
+ variableRow;
15
+ monacoEditor;
16
+ monacoEditorTextArea;
17
+ successMessage;
18
+ editMenuItem;
19
+ constructor(page) {
20
+ this.page = page;
21
+ this.variablesList = page.locator('table.cds--data-table');
22
+ this.variableRow = (variableName) => this.variablesList
23
+ .locator('tbody')
24
+ .getByRole('row')
25
+ .filter({ hasText: variableName });
26
+ this.editVariableButton = (variableName) => this.variableRow(variableName).getByRole('button', { name: 'Options' });
27
+ this.editVariableModal = page.getByRole('dialog', {
28
+ name: /Edit.*variable/i,
29
+ });
30
+ this.variableValueField = this.editVariableModal.getByRole('textbox', {
31
+ name: 'Editor content',
32
+ });
33
+ this.saveVariableButton = this.editVariableModal.locator('.cds--modal-footer button.cds--btn--primary');
34
+ this.closeEditVariableModal = this.editVariableModal.getByRole('button', {
35
+ name: 'Close',
36
+ });
37
+ this.cancelButton = this.editVariableModal.getByRole('button', {
38
+ name: 'Cancel',
39
+ });
40
+ this.monacoEditor = this.editVariableModal.locator('.monaco-editor');
41
+ this.monacoEditorTextArea = this.monacoEditor.locator('textarea.inputarea');
42
+ this.successMessage = this.page.getByText('Cluster variable updated');
43
+ this.editMenuItem = this.page
44
+ .locator('button[role="menuitem"]')
45
+ .filter({ hasText: /^Edit$/ });
46
+ }
47
+ async editVariable(variableName, newValue) {
48
+ await this.editVariableButton(variableName).click();
49
+ await (0, test_1.expect)(this.editMenuItem).toBeVisible();
50
+ await this.editMenuItem.click();
51
+ await (0, test_1.expect)(this.variableValueField).toBeVisible();
52
+ await (0, test_1.expect)(this.monacoEditor).toBeVisible();
53
+ await this.monacoEditor.click();
54
+ await this.monacoEditorTextArea.clear();
55
+ await this.monacoEditorTextArea.fill(newValue);
56
+ await (0, test_1.expect)(this.saveVariableButton).toBeEnabled();
57
+ await this.saveVariableButton.click();
58
+ await (0, test_1.expect)(this.successMessage).toBeVisible();
59
+ await (0, test_1.expect)(this.editVariableModal).toBeHidden();
60
+ }
61
+ async assertVariableExists(variableName) {
62
+ await (0, test_1.expect)(this.variableRow(variableName)).toBeVisible();
63
+ }
64
+ async assertVariableValue(variableName, expectedValue) {
65
+ const row = this.variableRow(variableName);
66
+ await (0, test_1.expect)(row).toContainText(expectedValue);
67
+ }
68
+ }
69
+ exports.OCIdentityClusterVariablesPage = OCIdentityClusterVariablesPage;
@@ -5,6 +5,7 @@ declare class OCIdentityHomePage {
5
5
  readonly adminBanner: Locator;
6
6
  readonly rolesTab: Locator;
7
7
  readonly authorizationsTab: Locator;
8
+ readonly clusterVariablesTab: Locator;
8
9
  readonly licenseKeyTagNonProduction: Locator;
9
10
  readonly licenseKeyTagNonCommercial: Locator;
10
11
  readonly licenseKeyTagProduction: Locator;
@@ -14,5 +15,6 @@ declare class OCIdentityHomePage {
14
15
  clickAuthorizationsTab(): Promise<void>;
15
16
  clickRolesTab(): Promise<void>;
16
17
  clickGroupsTab(): Promise<void>;
18
+ clickClusterVariablesTab(): Promise<void>;
17
19
  }
18
20
  export { OCIdentityHomePage };
@@ -8,6 +8,7 @@ class OCIdentityHomePage {
8
8
  adminBanner;
9
9
  rolesTab;
10
10
  authorizationsTab;
11
+ clusterVariablesTab;
11
12
  licenseKeyTagNonProduction;
12
13
  licenseKeyTagNonCommercial;
13
14
  licenseKeyTagProduction;
@@ -33,6 +34,16 @@ class OCIdentityHomePage {
33
34
  .getByLabel('Admin')
34
35
  .locator('a')
35
36
  .filter({ hasText: /^Authorizations$/ });
37
+ this.clusterVariablesTab = page
38
+ .getByRole('banner')
39
+ .getByLabel('Admin')
40
+ .locator('a')
41
+ .filter({ hasText: /Cluster variables/i })
42
+ .or(page
43
+ .getByRole('banner')
44
+ .getByLabel('Admin')
45
+ .locator('a')
46
+ .filter({ hasText: /Variables/i }));
36
47
  this.licenseKeyTagNonProduction = page
37
48
  .getByText('Non-production license')
38
49
  .first();
@@ -53,5 +64,9 @@ class OCIdentityHomePage {
53
64
  await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.groupsTab);
54
65
  await this.groupsTab.click({ timeout: 30000 });
55
66
  }
67
+ async clickClusterVariablesTab() {
68
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.clusterVariablesTab);
69
+ await this.clusterVariablesTab.click({ timeout: 30000 });
70
+ }
56
71
  }
57
72
  exports.OCIdentityHomePage = OCIdentityHomePage;
@@ -45,4 +45,21 @@ _8_10_1.test.describe('AWS Connectors User Flows', () => {
45
45
  await operateProcessInstancePage.assertProcessVariableContainsText('retrievedChunks', 'sourceUri');
46
46
  });
47
47
  });
48
+ (0, _8_10_1.test)('AWS AgentCore Runtime - Invoke deployed agent and receive response', async ({ operateHomePage, operateProcessInstancePage, operateProcessesPage, }) => {
49
+ _8_10_1.test.slow();
50
+ const processKey = await (0, apiHelpers_1.deployProcess)('./resources/connectors/aws/agentcore-runtime.bpmn', authToken);
51
+ if (processKey == null) {
52
+ throw new Error('Failed to deploy AgentCore Runtime process');
53
+ }
54
+ const instanceKey = await (0, apiHelpers_1.createProcessInstance)(String(processKey), authToken);
55
+ await _8_10_1.test.step('Process completes and agentResponse output variable is present', async () => {
56
+ await (0, sleep_1.sleep)(15000);
57
+ await operateHomePage.clickProcessesTab();
58
+ await operateProcessesPage.clickProcessCompletedCheckbox();
59
+ await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(instanceKey));
60
+ await operateProcessesPage.clickProcessInstanceLink('AWS AgentCore Runtime');
61
+ await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
62
+ await (0, test_1.expect)(operateProcessInstancePage.connectorResultVariableName('agentResponse')).toBeVisible({ timeout: 30000 });
63
+ });
64
+ });
48
65
  });
@@ -4,18 +4,92 @@ const _8_10_1 = require("../../fixtures/8.10");
4
4
  const UtilitiesPage_1 = require("../../pages/8.10/UtilitiesPage");
5
5
  const _setup_1 = require("../../test-setup.js");
6
6
  const apiHelpers_1 = require("../../utils/apiHelpers");
7
- const sleep_1 = require("../../utils/sleep");
8
7
  const users_1 = require("../../utils/users");
8
+ const randomName_1 = require("../../utils/randomName");
9
+ const CLUSTER_VAR_NAMES = {
10
+ ORIGINAL_JSON: 'ORIGINAL_API_INFO',
11
+ UPDATABLE_JSON: 'UPDATABLE_API_INFO',
12
+ ORIGINAL_STRING: 'ORIGINAL_APP_VERSION',
13
+ UPDATABLE_STRING: 'UPDATABLE_APP_VERSION',
14
+ };
15
+ function getConfigByType(type) {
16
+ const configs = {
17
+ JSON: {
18
+ processName: 'Cluster Variable Original JSON',
19
+ processNameUpdatable: 'Cluster Variable Updatable JSON',
20
+ taskName: 'Preview JSON cluster variables',
21
+ originalVariableName: CLUSTER_VAR_NAMES.ORIGINAL_JSON,
22
+ updatableVariableName: CLUSTER_VAR_NAMES.UPDATABLE_JSON,
23
+ originalValue: originalJsonClusterVariableValue,
24
+ operateVariableName: 'URL',
25
+ randomValuePrefix: 'https://updated.api.com',
26
+ },
27
+ String: {
28
+ processName: 'Cluster Variable Original String',
29
+ processNameUpdatable: 'Cluster Variable Updatable String',
30
+ taskName: 'Preview String cluster variable',
31
+ originalVariableName: CLUSTER_VAR_NAMES.ORIGINAL_STRING,
32
+ updatableVariableName: CLUSTER_VAR_NAMES.UPDATABLE_STRING,
33
+ originalValue: originalStringClusterVariableValue,
34
+ operateVariableName: 'APP_VERSION_VALUE',
35
+ randomValuePrefix: 'v3.0.0-updated',
36
+ },
37
+ };
38
+ return configs[type];
39
+ }
9
40
  const testUser = (0, users_1.getTestUser)('sixteenthUser');
10
41
  let authToken;
11
- let jsonClusterVariableValue;
42
+ let originalJsonClusterVariableValue;
43
+ let originalStringClusterVariableValue;
44
+ let jsonProcessKeyDisplay;
45
+ let jsonProcessKeyUpdate;
46
+ let stringProcessKeyDisplay;
47
+ let stringProcessKeyUpdate;
12
48
  _8_10_1.test.describe.configure({ mode: 'parallel' });
13
49
  _8_10_1.test.describe('Cluster Variables User Flows', () => {
14
50
  const clusterName = 'Test Cluster';
15
51
  _8_10_1.test.beforeAll(async () => {
16
52
  authToken = await (0, apiHelpers_1.authSaasAPI)();
17
- await (0, apiHelpers_1.createGlobalClusterVariable)(authToken);
18
- jsonClusterVariableValue = JSON.parse(process.env.CLUSTER_VARIABLE_JSON_VALUE);
53
+ await Promise.all([
54
+ (0, apiHelpers_1.createJsonClusterVariable)(authToken, 'saas', CLUSTER_VAR_NAMES.ORIGINAL_JSON, process.env.CLUSTER_VARIABLE_JSON_VALUE),
55
+ (0, apiHelpers_1.createJsonClusterVariable)(authToken, 'saas', CLUSTER_VAR_NAMES.UPDATABLE_JSON, process.env.CLUSTER_VARIABLE_JSON_VALUE),
56
+ (0, apiHelpers_1.createStringClusterVariable)(authToken, 'saas', CLUSTER_VAR_NAMES.ORIGINAL_STRING, process.env.CLUSTER_VARIABLE_STRING_VALUE),
57
+ (0, apiHelpers_1.createStringClusterVariable)(authToken, 'saas', CLUSTER_VAR_NAMES.UPDATABLE_STRING, process.env.CLUSTER_VARIABLE_STRING_VALUE),
58
+ ]);
59
+ originalJsonClusterVariableValue = JSON.parse(process.env.CLUSTER_VARIABLE_JSON_VALUE);
60
+ originalStringClusterVariableValue =
61
+ process.env.CLUSTER_VARIABLE_STRING_VALUE;
62
+ const deployments = [
63
+ {
64
+ path: './resources/cluster_variables/cluster_variable_json_readonly.bpmn',
65
+ assignTo: 'jsonProcessKeyDisplay',
66
+ },
67
+ {
68
+ path: './resources/cluster_variables/cluster_variable_json_mutable.bpmn',
69
+ assignTo: 'jsonProcessKeyUpdate',
70
+ },
71
+ {
72
+ path: './resources/cluster_variables/cluster_variable_json_form.form',
73
+ assignTo: null,
74
+ },
75
+ {
76
+ path: './resources/cluster_variables/cluster_variable_string_readonly.bpmn',
77
+ assignTo: 'stringProcessKeyDisplay',
78
+ },
79
+ {
80
+ path: './resources/cluster_variables/cluster_variable_string_mutable.bpmn',
81
+ assignTo: 'stringProcessKeyUpdate',
82
+ },
83
+ {
84
+ path: './resources/cluster_variables/cluster_variable_string_form.form',
85
+ assignTo: null,
86
+ },
87
+ ];
88
+ const deploymentResults = await Promise.all(deployments.map((d) => (0, apiHelpers_1.deployProcess)(d.path, authToken)));
89
+ jsonProcessKeyDisplay = deploymentResults[0];
90
+ jsonProcessKeyUpdate = deploymentResults[1];
91
+ stringProcessKeyDisplay = deploymentResults[3];
92
+ stringProcessKeyUpdate = deploymentResults[4];
19
93
  });
20
94
  _8_10_1.test.beforeEach(async ({ page, appsPage, loginPage }, testInfo) => {
21
95
  await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
@@ -27,43 +101,102 @@ _8_10_1.test.describe('Cluster Variables User Flows', () => {
27
101
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
28
102
  });
29
103
  _8_10_1.test.describe('Global cluster variable', () => {
30
- (0, _8_10_1.test)('User deploys a process and accesses global cluster variable on Tasklist', async ({ appsPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, taskPanelPage, taskDetailsPage, }) => {
31
- _8_10_1.test.slow();
32
- await (0, apiHelpers_1.deployProcess)('./resources/cluster_variables/preview_cluster_variables.form', authToken);
33
- await (0, sleep_1.sleep)(2000);
34
- const processKey = await (0, apiHelpers_1.deployProcess)('./resources/cluster_variables/cluster_variable_global_scope.bpmn', authToken);
35
- if (processKey == null) {
36
- throw new Error('Failed to deploy process or missing processDefinitionKey');
37
- }
38
- const instanceKey = await (0, apiHelpers_1.createProcessInstance)(String(processKey), authToken);
39
- await _8_10_1.test.step('User can access the process on operate', async () => {
40
- await operateHomePage.clickProcessesTab();
41
- await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(instanceKey));
42
- await operateProcessesPage.clickProcessInstanceLink(`Cluster Variable Global scope - API INFO`);
43
- await operateProcessInstancePage.assertActiveTokenIsPresent();
104
+ const testConfigs = [
105
+ {
106
+ type: 'JSON',
107
+ processKeyDisplay: () => jsonProcessKeyDisplay,
108
+ processKeyUpdate: () => jsonProcessKeyUpdate,
109
+ },
110
+ {
111
+ type: 'String',
112
+ processKeyDisplay: () => stringProcessKeyDisplay,
113
+ processKeyUpdate: () => stringProcessKeyUpdate,
114
+ },
115
+ ];
116
+ for (const config of testConfigs) {
117
+ (0, _8_10_1.test)(`User views ${config.type} cluster variable in Tasklist from readonly process and completes task`, async ({ appsPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, taskPanelPage, taskDetailsPage, }) => {
118
+ _8_10_1.test.slow();
119
+ const derived = getConfigByType(config.type);
120
+ const instanceKey = await (0, apiHelpers_1.createProcessInstance)(String(config.processKeyDisplay()), authToken);
121
+ await _8_10_1.test.step('User can access the process on operate', async () => {
122
+ await operateHomePage.clickProcessesTab();
123
+ await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(instanceKey));
124
+ await operateProcessesPage.clickProcessInstanceLink(derived.processName);
125
+ await operateProcessInstancePage.assertActiveTokenIsPresent();
126
+ });
127
+ await _8_10_1.test.step(`User can view the process with ${config.type} cluster variable on tasklist`, async () => {
128
+ await appsPage.clickCamundaApps();
129
+ await appsPage.clickTasklist(clusterName);
130
+ await taskPanelPage.taskListPageBanner.waitFor({
131
+ state: 'visible',
132
+ timeout: 30000,
133
+ });
134
+ await taskPanelPage.openTask(derived.taskName);
135
+ await taskDetailsPage.clickAssignToMeButton();
136
+ });
137
+ await _8_10_1.test.step(`User can view the value of ${config.type} cluster variable and complete the task`, async () => {
138
+ if (config.type === 'JSON') {
139
+ for (const value of Object.values(derived.originalValue)) {
140
+ await taskDetailsPage.assertTextIsPresent(String(value));
141
+ }
142
+ }
143
+ else {
144
+ await taskDetailsPage.assertTextIsPresent(String(derived.originalValue));
145
+ }
146
+ await taskDetailsPage.clickCompleteTaskButton();
147
+ });
148
+ await _8_10_1.test.step('User can assert the process is completed on Operate', async () => {
149
+ await appsPage.clickCamundaApps();
150
+ await appsPage.clickOperate(clusterName);
151
+ await operateHomePage.clickProcessesTab();
152
+ await operateProcessesPage.clickProcessCompletedCheckbox();
153
+ await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(instanceKey));
154
+ await operateProcessesPage.clickProcessInstanceLink(derived.processName);
155
+ await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
156
+ });
44
157
  });
45
- await _8_10_1.test.step('User can view the process with cluster variables on tasklist', async () => {
46
- await appsPage.clickCamundaApps();
47
- await appsPage.clickTasklist(clusterName);
48
- await (0, sleep_1.sleep)(5000);
49
- await taskPanelPage.openTask(`Preview cluster variables form`);
50
- await taskDetailsPage.clickAssignToMeButton();
158
+ }
159
+ for (const config of testConfigs) {
160
+ (0, _8_10_1.test)(`User updates ${config.type} cluster variable in Admin UI and verifies changes in Operate`, async ({ appsPage, ocIdentityHomePage, ocIdentityClusterVariablesPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
161
+ _8_10_1.test.slow();
162
+ const derived = getConfigByType(config.type);
163
+ const randomRawValue = await (0, randomName_1.randomNameAgregator)(derived.randomValuePrefix);
164
+ const newValue = config.type === 'JSON'
165
+ ? JSON.stringify({
166
+ endpoint: randomRawValue,
167
+ timeout_ms: '5000',
168
+ array: ['updated_item1', 'updated_item2'],
169
+ })
170
+ : JSON.stringify(randomRawValue);
171
+ await _8_10_1.test.step('User navigates to Admin UI', async () => {
172
+ await appsPage.clickCamundaApps();
173
+ await appsPage.clickAdmin(clusterName);
174
+ });
175
+ await _8_10_1.test.step('User navigates to Cluster Variables tab', async () => {
176
+ await ocIdentityHomePage.clickClusterVariablesTab();
177
+ });
178
+ await _8_10_1.test.step(`User verifies ${config.type} cluster variable exists`, async () => {
179
+ await ocIdentityClusterVariablesPage.assertVariableExists(derived.updatableVariableName);
180
+ });
181
+ await _8_10_1.test.step(`User updates the ${config.type} cluster variable value`, async () => {
182
+ await ocIdentityClusterVariablesPage.editVariable(derived.updatableVariableName, newValue);
183
+ });
184
+ await _8_10_1.test.step(`User creates a process instance with the updated ${config.type} cluster variable`, async () => {
185
+ const instanceKey = await (0, apiHelpers_1.createProcessInstance)(String(config.processKeyUpdate()), authToken);
186
+ await _8_10_1.test.step('User navigates to the process instance on Operate', async () => {
187
+ await appsPage.clickCamundaApps();
188
+ await appsPage.clickOperate(clusterName);
189
+ await operateHomePage.clickProcessesTab();
190
+ await operateProcessesPage.clickProcessCompletedCheckbox();
191
+ await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(instanceKey));
192
+ await operateProcessesPage.clickProcessInstanceLink(derived.processNameUpdatable);
193
+ await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
194
+ });
195
+ await _8_10_1.test.step(`User verifies the updated ${config.type} cluster variable value is present in process variables`, async () => {
196
+ await operateProcessInstancePage.assertProcessVariableContainsText(derived.operateVariableName, randomRawValue);
197
+ });
198
+ });
51
199
  });
52
- await _8_10_1.test.step('User can view the values of cluster variables and complete the task', async () => {
53
- for (const [, value] of Object.entries(jsonClusterVariableValue)) {
54
- await taskDetailsPage.assertTextIsPresent(String(value));
55
- }
56
- await taskDetailsPage.clickCompleteTaskButton();
57
- });
58
- await _8_10_1.test.step('User can assert the process is completed on Operate', async () => {
59
- await appsPage.clickCamundaApps();
60
- await appsPage.clickOperate(clusterName);
61
- await operateHomePage.clickProcessesTab();
62
- await operateProcessesPage.clickProcessCompletedCheckbox();
63
- await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(instanceKey));
64
- await operateProcessesPage.clickProcessInstanceLink(`Cluster Variable Global scope - API INFO`);
65
- await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
66
- });
67
- });
200
+ }
68
201
  });
69
202
  });
@@ -11,11 +11,15 @@ _8_10_1.test.describe.configure({ mode: 'parallel' });
11
11
  _8_10_1.test.describe('Operate access requires authentication @tasklistV2', () => {
12
12
  let clientName;
13
13
  const clusterName = 'Test Cluster';
14
- _8_10_1.test.afterEach(async ({ page, clusterDetailsPage }, testInfo) => {
14
+ _8_10_1.test.afterEach(async ({ page, homePage, clusterPage, clusterDetailsPage }, testInfo) => {
15
15
  await (0, _setup_1.captureScreenshot)(page, testInfo);
16
16
  await (0, _setup_1.captureFailureVideo)(page, testInfo);
17
- await clusterDetailsPage.clickAPITab();
18
- await clusterDetailsPage.deleteAPIClientsIfExist(clientName);
17
+ if (clientName) {
18
+ await homePage.clickClusters();
19
+ await clusterPage.clickClusterLink(clusterName);
20
+ await clusterDetailsPage.clickAPITab();
21
+ await clusterDetailsPage.deleteAPIClientsIfExist(clientName);
22
+ }
19
23
  });
20
24
  _8_10_1.test.beforeEach(async ({ page, loginPage }, testInfo) => {
21
25
  await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
@@ -41,6 +41,7 @@ _8_10_1.test.describe('Cluster Setup Tests', () => {
41
41
  await clusterSecretsPage.createSetOfSecrets(clusterName, connectorSecrets_1.azureSecretsValues);
42
42
  await clusterSecretsPage.createSetOfSecrets(clusterName, connectorSecrets_1.connectorSecretsValues);
43
43
  await clusterSecretsPage.createSetOfSecrets(clusterName, connectorSecrets_1.bedrockKbSecretsValues);
44
+ await clusterSecretsPage.createSetOfSecrets(clusterName, connectorSecrets_1.agentcoreSecretsValues);
44
45
  }
45
46
  });
46
47
  (0, _8_10_1.test)('Create AWS Cluster', async ({ page, loginPage, homePage, clusterPage, clusterDetailsPage, clusterSecretsPage, }, testInfo) => {
@@ -17,14 +17,6 @@ export declare function deployProcess(filePath: string, authToken?: string, envi
17
17
  export declare function createProcessInstance(processDefinitionKey: string, authToken?: string, environment?: 'saas' | 'sm', clusterType?: string, variables?: Record<string, unknown>): Promise<string>;
18
18
  export declare function createJsonClusterVariable(authToken?: string, environment?: 'saas' | 'sm', customVariableName?: string, customVariableValue?: string, clusterType?: string): Promise<void>;
19
19
  export declare function createStringClusterVariable(authToken?: string, environment?: 'saas' | 'sm', customVariableName?: string, customVariableValue?: string, clusterType?: string): Promise<void>;
20
- /**
21
- * @deprecated This function will be removed when SM-8.9 cluster variables test is updated.
22
- * Use createJsonClusterVariable() for JSON variables or
23
- * createStringClusterVariable() for String variables instead.
24
- *
25
- * Maintained for backward compatibility with tests/SM-8.9/cluster-variables.spec.ts
26
- */
27
- export declare function createGlobalClusterVariable(authToken: string, environment?: 'saas' | 'sm'): Promise<Record<string, unknown>>;
28
20
  interface ReportDefinition {
29
21
  key: string;
30
22
  filter?: unknown[];
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.updateCollectionScope = exports.createSingleProcessReport = exports.createDashboard = exports.createCollection = exports.getOptimizeCoockie = exports.createGlobalClusterVariable = exports.createStringClusterVariable = exports.createJsonClusterVariable = exports.createProcessInstance = exports.deployProcess = exports.validateMcpServerHealth = exports.authC8runAPI = exports.authSmAPI = exports.authSaasAPI = exports.authAPI = exports.buildZeebeApiUrl = exports.sendRequestAndAssertResponse = exports.assertResponseStatus = exports.getApiRequestContext = void 0;
6
+ exports.updateCollectionScope = exports.createSingleProcessReport = exports.createDashboard = exports.createCollection = exports.getOptimizeCoockie = exports.createStringClusterVariable = exports.createJsonClusterVariable = exports.createProcessInstance = exports.deployProcess = exports.validateMcpServerHealth = exports.authC8runAPI = exports.authSmAPI = exports.authSaasAPI = exports.authAPI = exports.buildZeebeApiUrl = exports.sendRequestAndAssertResponse = exports.assertResponseStatus = exports.getApiRequestContext = void 0;
7
7
  const test_1 = require("@playwright/test");
8
8
  const sleep_1 = require("./sleep");
9
9
  const fs_1 = __importDefault(require("fs"));
@@ -350,19 +350,6 @@ async function createStringClusterVariable(authToken, environment = 'saas', cust
350
350
  await createClusterVariableInternal(authToken ?? '', environment, variableName, variableValue, 'String', clusterType);
351
351
  }
352
352
  exports.createStringClusterVariable = createStringClusterVariable;
353
- /**
354
- * @deprecated This function will be removed when SM-8.9 cluster variables test is updated.
355
- * Use createJsonClusterVariable() for JSON variables or
356
- * createStringClusterVariable() for String variables instead.
357
- *
358
- * Maintained for backward compatibility with tests/SM-8.9/cluster-variables.spec.ts
359
- */
360
- async function createGlobalClusterVariable(authToken, environment = 'saas') {
361
- const variableValue = process.env.CLUSTER_VARIABLE_JSON_VALUE;
362
- await createJsonClusterVariable(authToken, environment, 'ORIGINAL_API_INFO', variableValue);
363
- return JSON.parse(variableValue);
364
- }
365
- exports.createGlobalClusterVariable = createGlobalClusterVariable;
366
353
  async function getOptimizeCoockie(page) {
367
354
  await (0, utils_1.loginToApp)(process.env.CAMUNDA_OPTIMIZE_BASE_URL, page);
368
355
  const context = page.context();
@@ -18,6 +18,10 @@ export declare const bedrockKbSecretsValues: {
18
18
  name: string;
19
19
  value: string;
20
20
  }[];
21
+ export declare const agentcoreSecretsValues: {
22
+ name: string;
23
+ value: string;
24
+ }[];
21
25
  export declare const connectorSecretsValues: {
22
26
  name: string;
23
27
  value: string;
@@ -31,6 +35,10 @@ export declare const allConnectorSecrets: {
31
35
  name: string;
32
36
  value: string;
33
37
  }[];
38
+ AgentCore: {
39
+ name: string;
40
+ value: string;
41
+ }[];
34
42
  GCP: {
35
43
  name: string;
36
44
  value: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.allConnectorSecrets = exports.connectorSecretsValues = exports.bedrockKbSecretsValues = exports.azureSecretsValues = exports.gcpSecretsValues = exports.openAiSecretsValues = exports.awsSecretsValues = void 0;
3
+ exports.allConnectorSecrets = exports.connectorSecretsValues = exports.agentcoreSecretsValues = exports.bedrockKbSecretsValues = exports.azureSecretsValues = exports.gcpSecretsValues = exports.openAiSecretsValues = exports.awsSecretsValues = void 0;
4
4
  exports.awsSecretsValues = [
5
5
  { name: 'IDP_AWS_REGION', value: process.env.IDP_AWS_REGION },
6
6
  { name: 'IDP_AWS_BUCKET_NAME', value: process.env.IDP_AWS_BUCKET_NAME },
@@ -139,6 +139,24 @@ exports.bedrockKbSecretsValues = [
139
139
  value: process.env.BEDROCK_KB_KNOWLEDGE_BASE_ID,
140
140
  },
141
141
  ];
142
+ exports.agentcoreSecretsValues = [
143
+ {
144
+ name: 'AGENTCORE_AWS_ACCESS_KEY',
145
+ value: process.env.AGENTCORE_AWS_ACCESS_KEY,
146
+ },
147
+ {
148
+ name: 'AGENTCORE_AWS_SECRET_KEY',
149
+ value: process.env.AGENTCORE_AWS_SECRET_KEY,
150
+ },
151
+ {
152
+ name: 'AGENTCORE_AWS_REGION',
153
+ value: process.env.AGENTCORE_AWS_REGION,
154
+ },
155
+ {
156
+ name: 'AGENTCORE_AGENT_RUNTIME_ARN',
157
+ value: process.env.AGENTCORE_AGENT_RUNTIME_ARN,
158
+ },
159
+ ];
142
160
  exports.connectorSecretsValues = [
143
161
  {
144
162
  name: 'endpoint_url',
@@ -150,6 +168,7 @@ exports.connectorSecretsValues = [
150
168
  exports.allConnectorSecrets = {
151
169
  AWS: exports.awsSecretsValues,
152
170
  BedrockKB: exports.bedrockKbSecretsValues,
171
+ AgentCore: exports.agentcoreSecretsValues,
153
172
  GCP: exports.gcpSecretsValues,
154
173
  Azure: [...exports.azureSecretsValues, ...exports.openAiSecretsValues],
155
174
  Connectors: exports.connectorSecretsValues,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.457",
3
+ "version": "0.0.459",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,70 @@
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"
8
+ id="Definitions_1"
9
+ targetNamespace="http://bpmn.io/schema/bpmn"
10
+ exporter="Camunda Web Modeler"
11
+ exporterVersion="1.0.0"
12
+ modeler:executionPlatform="Camunda Cloud"
13
+ modeler:executionPlatformVersion="8.10.0">
14
+ <bpmn:process id="aws_agentcore_runtime" name="AWS AgentCore Runtime" isExecutable="true">
15
+ <bpmn:startEvent id="StartEvent_1">
16
+ <bpmn:outgoing>Flow_1</bpmn:outgoing>
17
+ </bpmn:startEvent>
18
+ <bpmn:sequenceFlow id="Flow_1" sourceRef="StartEvent_1" targetRef="AgentCoreTask" />
19
+ <bpmn:serviceTask id="AgentCoreTask" name="Invoke Agent Runtime"
20
+ zeebe:modelerTemplate="io.camunda.connectors.aws.bedrock.agentcore.runtime.v1"
21
+ zeebe:modelerTemplateVersion="1">
22
+ <bpmn:extensionElements>
23
+ <zeebe:taskDefinition type="io.camunda:aws-bedrock-agentcore-runtime:1" retries="3" />
24
+ <zeebe:ioMapping>
25
+ <zeebe:input source="credentials" target="authentication.type" />
26
+ <zeebe:input source="{{secrets.AGENTCORE_AWS_ACCESS_KEY}}" target="authentication.accessKey" />
27
+ <zeebe:input source="{{secrets.AGENTCORE_AWS_SECRET_KEY}}" target="authentication.secretKey" />
28
+ <zeebe:input source="{{secrets.AGENTCORE_AWS_REGION}}" target="configuration.region" />
29
+ <zeebe:input source="{{secrets.AGENTCORE_AGENT_RUNTIME_ARN}}" target="input.agentRuntimeArn" />
30
+ <zeebe:input source="={inputText: &quot;What is the capital of France?&quot;}" target="input.payload" />
31
+ </zeebe:ioMapping>
32
+ <zeebe:taskHeaders>
33
+ <zeebe:header key="elementTemplateVersion" value="1" />
34
+ <zeebe:header key="elementTemplateId" value="io.camunda.connectors.aws.bedrock.agentcore.runtime.v1" />
35
+ <zeebe:header key="resultVariable" value="agentCoreResult" />
36
+ <zeebe:header key="resultExpression" value="={agentResponse: response, sessionId: sessionId}" />
37
+ <zeebe:header key="retryBackoff" value="PT0S" />
38
+ </zeebe:taskHeaders>
39
+ </bpmn:extensionElements>
40
+ <bpmn:incoming>Flow_1</bpmn:incoming>
41
+ <bpmn:outgoing>Flow_2</bpmn:outgoing>
42
+ </bpmn:serviceTask>
43
+ <bpmn:sequenceFlow id="Flow_2" sourceRef="AgentCoreTask" targetRef="EndEvent_1" />
44
+ <bpmn:endEvent id="EndEvent_1">
45
+ <bpmn:incoming>Flow_2</bpmn:incoming>
46
+ </bpmn:endEvent>
47
+ </bpmn:process>
48
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
49
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="aws_agentcore_runtime">
50
+ <bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1">
51
+ <dc:Bounds x="152" y="82" width="36" height="36" />
52
+ </bpmndi:BPMNShape>
53
+ <bpmndi:BPMNShape id="AgentCoreTask_di" bpmnElement="AgentCoreTask">
54
+ <dc:Bounds x="240" y="60" width="100" height="80" />
55
+ <bpmndi:BPMNLabel />
56
+ </bpmndi:BPMNShape>
57
+ <bpmndi:BPMNShape id="EndEvent_1_di" bpmnElement="EndEvent_1">
58
+ <dc:Bounds x="392" y="82" width="36" height="36" />
59
+ </bpmndi:BPMNShape>
60
+ <bpmndi:BPMNEdge id="Flow_1_di" bpmnElement="Flow_1">
61
+ <di:waypoint x="188" y="100" />
62
+ <di:waypoint x="240" y="100" />
63
+ </bpmndi:BPMNEdge>
64
+ <bpmndi:BPMNEdge id="Flow_2_di" bpmnElement="Flow_2">
65
+ <di:waypoint x="340" y="100" />
66
+ <di:waypoint x="392" y="100" />
67
+ </bpmndi:BPMNEdge>
68
+ </bpmndi:BPMNPlane>
69
+ </bpmndi:BPMNDiagram>
70
+ </bpmn:definitions>