@camunda/e2e-test-suite 0.0.1695 → 0.0.1697
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/pages/8.11/ClusterDetailsPage.d.ts +8 -1
- package/dist/pages/8.11/ClusterDetailsPage.js +32 -5
- package/dist/pages/8.11/ClusterPage.d.ts +42 -2
- package/dist/pages/8.11/ClusterPage.js +228 -31
- package/dist/pages/SM-8.10/OCIdentityClusterVariablesPage.d.ts +5 -5
- package/dist/pages/SM-8.10/OCIdentityClusterVariablesPage.js +19 -11
- package/dist/pages/SM-8.10/TaskPanelPage.d.ts +1 -1
- package/dist/pages/SM-8.10/TaskPanelPage.js +6 -5
- package/dist/pages/SM-8.11/OCIdentityClusterVariablesPage.d.ts +5 -5
- package/dist/pages/SM-8.11/OCIdentityClusterVariablesPage.js +19 -11
- package/dist/pages/SM-8.11/TaskPanelPage.d.ts +1 -1
- package/dist/pages/SM-8.11/TaskPanelPage.js +6 -5
- package/dist/resources/cluster_variables/cluster_variable_global_scope.bpmn +4 -4
- package/dist/resources/cluster_variables/cluster_variable_json_readonly.bpmn +4 -4
- package/dist/resources/cluster_variables/cluster_variable_string_readonly.bpmn +4 -4
- package/dist/resources/cluster_variables/cluster_variable_tenant_json_readonly.bpmn +4 -4
- package/dist/resources/cluster_variables/cluster_variable_tenant_string_readonly.bpmn +4 -4
- package/dist/tests/8.11/console-cluster-duplication-api-clients.spec.d.ts +1 -0
- package/dist/tests/8.11/console-cluster-duplication-api-clients.spec.js +154 -0
- package/dist/tests/8.11/console-cluster-duplication.spec.d.ts +1 -0
- package/dist/tests/8.11/console-cluster-duplication.spec.js +460 -0
- package/dist/tests/SM-8.10/cluster-variables-tenant.spec.d.ts +1 -0
- package/dist/tests/SM-8.10/cluster-variables-tenant.spec.js +198 -0
- package/dist/tests/SM-8.10/cluster-variables.spec.js +2 -2
- package/dist/tests/SM-8.10/optimize-api-tests.spec.d.ts +1 -0
- package/dist/tests/SM-8.10/optimize-api-tests.spec.js +468 -0
- package/dist/tests/SM-8.11/cluster-variables-tenant.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/cluster-variables-tenant.spec.js +198 -0
- package/dist/tests/SM-8.11/cluster-variables.spec.js +2 -2
- package/dist/tests/SM-8.11/optimize-api-tests.spec.d.ts +1 -0
- package/dist/tests/SM-8.11/optimize-api-tests.spec.js +468 -0
- package/dist/tests/SM-8.9/cluster-variables-tenant.spec.js +2 -2
- package/dist/tests/SM-8.9/cluster-variables.spec.js +2 -2
- package/dist/utils/apiHelpers.d.ts +4 -0
- package/dist/utils/apiHelpers.js +29 -4
- package/package.json +1 -1
- package/resources/cluster_variables/cluster_variable_global_scope.bpmn +4 -4
- package/resources/cluster_variables/cluster_variable_json_readonly.bpmn +4 -4
- package/resources/cluster_variables/cluster_variable_string_readonly.bpmn +4 -4
- package/resources/cluster_variables/cluster_variable_tenant_json_readonly.bpmn +4 -4
- package/resources/cluster_variables/cluster_variable_tenant_string_readonly.bpmn +4 -4
|
@@ -0,0 +1,198 @@
|
|
|
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 randomName_1 = require("../../utils/randomName");
|
|
7
|
+
const TENANT_ID = '<default>';
|
|
8
|
+
const TENANT_CLUSTER_VAR_NAMES = {
|
|
9
|
+
ORIGINAL_JSON: 'ORIGINAL_API_INFO',
|
|
10
|
+
UPDATABLE_JSON: 'UPDATABLE_API_INFO',
|
|
11
|
+
ORIGINAL_STRING: 'ORIGINAL_APP_VERSION',
|
|
12
|
+
UPDATABLE_STRING: 'UPDATABLE_APP_VERSION',
|
|
13
|
+
};
|
|
14
|
+
const clusterVariableJsonValue = process.env.CLUSTER_VARIABLE_JSON_VALUE || process.env.CLUSTER_VARIABLE_JSON;
|
|
15
|
+
const clusterVariableStringValue = process.env.CLUSTER_VARIABLE_STRING_VALUE || 'v1.0.0';
|
|
16
|
+
function getConfigByType(type) {
|
|
17
|
+
const configs = {
|
|
18
|
+
JSON: {
|
|
19
|
+
processName: 'Tenant Cluster Variable Original JSON',
|
|
20
|
+
processNameUpdatable: 'Tenant Cluster Variable Updatable JSON',
|
|
21
|
+
taskName: 'Preview JSON tenant cluster variables',
|
|
22
|
+
taskElementId: 'Activity_TenantJsonPreview',
|
|
23
|
+
originalVariableName: TENANT_CLUSTER_VAR_NAMES.ORIGINAL_JSON,
|
|
24
|
+
updatableVariableName: TENANT_CLUSTER_VAR_NAMES.UPDATABLE_JSON,
|
|
25
|
+
originalValue: originalJsonClusterVariableValue,
|
|
26
|
+
operateVariableName: 'URL',
|
|
27
|
+
randomValuePrefix: 'https://updated.tenant.api.com',
|
|
28
|
+
},
|
|
29
|
+
String: {
|
|
30
|
+
processName: 'Tenant Cluster Variable Original String',
|
|
31
|
+
processNameUpdatable: 'Tenant Cluster Variable Updatable String',
|
|
32
|
+
taskName: 'Preview String tenant cluster variable',
|
|
33
|
+
taskElementId: 'Activity_TenantStringPreview',
|
|
34
|
+
originalVariableName: TENANT_CLUSTER_VAR_NAMES.ORIGINAL_STRING,
|
|
35
|
+
updatableVariableName: TENANT_CLUSTER_VAR_NAMES.UPDATABLE_STRING,
|
|
36
|
+
originalValue: originalStringClusterVariableValue,
|
|
37
|
+
operateVariableName: 'APP_VERSION_VALUE',
|
|
38
|
+
randomValuePrefix: 'v3.0.0-tenant-updated',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
return configs[type];
|
|
42
|
+
}
|
|
43
|
+
let authToken;
|
|
44
|
+
let originalJsonClusterVariableValue;
|
|
45
|
+
let originalStringClusterVariableValue;
|
|
46
|
+
let jsonProcessKeyDisplay;
|
|
47
|
+
let jsonProcessKeyUpdate;
|
|
48
|
+
let stringProcessKeyDisplay;
|
|
49
|
+
let stringProcessKeyUpdate;
|
|
50
|
+
if (process.env.IS_MT === 'true') {
|
|
51
|
+
SM_8_10_1.test.describe.configure({ mode: 'parallel' });
|
|
52
|
+
SM_8_10_1.test.describe('Tenant-Scoped Cluster Variables User Flows', () => {
|
|
53
|
+
SM_8_10_1.test.beforeAll(async () => {
|
|
54
|
+
authToken = await (0, apiHelpers_1.authSmAPI)();
|
|
55
|
+
if (!clusterVariableJsonValue) {
|
|
56
|
+
throw new Error('Neither CLUSTER_VARIABLE_JSON_VALUE nor CLUSTER_VARIABLE_JSON env var is set');
|
|
57
|
+
}
|
|
58
|
+
const jsonValue = JSON.parse(clusterVariableJsonValue);
|
|
59
|
+
await Promise.all([
|
|
60
|
+
(0, apiHelpers_1.createTenantClusterVariable)(authToken, 'sm', TENANT_ID, TENANT_CLUSTER_VAR_NAMES.ORIGINAL_JSON, jsonValue),
|
|
61
|
+
(0, apiHelpers_1.createTenantClusterVariable)(authToken, 'sm', TENANT_ID, TENANT_CLUSTER_VAR_NAMES.UPDATABLE_JSON, jsonValue),
|
|
62
|
+
(0, apiHelpers_1.createTenantClusterVariable)(authToken, 'sm', TENANT_ID, TENANT_CLUSTER_VAR_NAMES.ORIGINAL_STRING, clusterVariableStringValue),
|
|
63
|
+
(0, apiHelpers_1.createTenantClusterVariable)(authToken, 'sm', TENANT_ID, TENANT_CLUSTER_VAR_NAMES.UPDATABLE_STRING, clusterVariableStringValue),
|
|
64
|
+
]);
|
|
65
|
+
originalJsonClusterVariableValue = jsonValue;
|
|
66
|
+
originalStringClusterVariableValue = clusterVariableStringValue;
|
|
67
|
+
const deployments = [
|
|
68
|
+
{
|
|
69
|
+
path: './resources/cluster_variables/cluster_variable_tenant_json_readonly.bpmn',
|
|
70
|
+
assignTo: 'jsonProcessKeyDisplay',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
path: './resources/cluster_variables/cluster_variable_tenant_json_mutable.bpmn',
|
|
74
|
+
assignTo: 'jsonProcessKeyUpdate',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
path: './resources/cluster_variables/cluster_variable_json_form.form',
|
|
78
|
+
assignTo: null,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
path: './resources/cluster_variables/cluster_variable_tenant_string_readonly.bpmn',
|
|
82
|
+
assignTo: 'stringProcessKeyDisplay',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
path: './resources/cluster_variables/cluster_variable_tenant_string_mutable.bpmn',
|
|
86
|
+
assignTo: 'stringProcessKeyUpdate',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
path: './resources/cluster_variables/cluster_variable_string_form.form',
|
|
90
|
+
assignTo: null,
|
|
91
|
+
},
|
|
92
|
+
];
|
|
93
|
+
const deploymentResults = await Promise.all(deployments.map((d) => (0, apiHelpers_1.deployProcess)(d.path, authToken)));
|
|
94
|
+
jsonProcessKeyDisplay = deploymentResults[0];
|
|
95
|
+
jsonProcessKeyUpdate = deploymentResults[1];
|
|
96
|
+
stringProcessKeyDisplay = deploymentResults[3];
|
|
97
|
+
stringProcessKeyUpdate = deploymentResults[4];
|
|
98
|
+
});
|
|
99
|
+
SM_8_10_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
|
|
100
|
+
await navigationPage.goToOperate((testInfo.workerIndex + 1) * 1000);
|
|
101
|
+
});
|
|
102
|
+
SM_8_10_1.test.afterEach(async ({ page }, testInfo) => {
|
|
103
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
104
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
105
|
+
});
|
|
106
|
+
SM_8_10_1.test.describe('Tenant cluster variable', () => {
|
|
107
|
+
const testConfigs = [
|
|
108
|
+
{
|
|
109
|
+
type: 'JSON',
|
|
110
|
+
processKeyDisplay: () => jsonProcessKeyDisplay,
|
|
111
|
+
processKeyUpdate: () => jsonProcessKeyUpdate,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
type: 'String',
|
|
115
|
+
processKeyDisplay: () => stringProcessKeyDisplay,
|
|
116
|
+
processKeyUpdate: () => stringProcessKeyUpdate,
|
|
117
|
+
},
|
|
118
|
+
];
|
|
119
|
+
for (const config of testConfigs) {
|
|
120
|
+
(0, SM_8_10_1.test)(`User views ${config.type} tenant cluster variable in Tasklist from readonly process and completes task`, async ({ navigationPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, taskPanelPage, taskDetailsPage, }) => {
|
|
121
|
+
SM_8_10_1.test.slow();
|
|
122
|
+
const derived = getConfigByType(config.type);
|
|
123
|
+
const instanceKey = await (0, apiHelpers_1.createProcessInstance)(String(config.processKeyDisplay()), authToken);
|
|
124
|
+
await SM_8_10_1.test.step('User can access the process on operate', async () => {
|
|
125
|
+
await operateHomePage.clickProcessesTab();
|
|
126
|
+
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(instanceKey));
|
|
127
|
+
await operateProcessesPage.clickProcessInstanceLink(String(instanceKey));
|
|
128
|
+
await operateProcessInstancePage.assertActiveTokenIsPresent();
|
|
129
|
+
});
|
|
130
|
+
await SM_8_10_1.test.step(`User can view the process with ${config.type} tenant cluster variable on tasklist`, async () => {
|
|
131
|
+
await navigationPage.goToTasklist();
|
|
132
|
+
await taskPanelPage.openTask(derived.taskName, true, derived.taskElementId);
|
|
133
|
+
await taskDetailsPage.clickAssignToMeButton();
|
|
134
|
+
});
|
|
135
|
+
await SM_8_10_1.test.step(`User can view the value of ${config.type} tenant cluster variable and complete the task`, async () => {
|
|
136
|
+
if (config.type === 'JSON') {
|
|
137
|
+
for (const value of Object.values(derived.originalValue)) {
|
|
138
|
+
await taskDetailsPage.assertTextIsPresent(String(value));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
await taskDetailsPage.assertTextIsPresent(String(derived.originalValue));
|
|
143
|
+
}
|
|
144
|
+
await taskDetailsPage.clickCompleteTaskButton();
|
|
145
|
+
});
|
|
146
|
+
await SM_8_10_1.test.step('User can assert the process is completed on Operate', async () => {
|
|
147
|
+
await navigationPage.goToOperate();
|
|
148
|
+
await operateHomePage.clickProcessesTab();
|
|
149
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
150
|
+
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(instanceKey));
|
|
151
|
+
await operateProcessesPage.clickProcessInstanceLink(String(instanceKey), 'completed');
|
|
152
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
for (const config of testConfigs) {
|
|
157
|
+
(0, SM_8_10_1.test)(`User updates ${config.type} tenant cluster variable in Admin UI and verifies changes in Operate`, async ({ navigationPage, ocIdentityHomePage, ocIdentityClusterVariablesPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
|
|
158
|
+
SM_8_10_1.test.slow();
|
|
159
|
+
const derived = getConfigByType(config.type);
|
|
160
|
+
const randomRawValue = await (0, randomName_1.randomNameAgregator)(derived.randomValuePrefix);
|
|
161
|
+
const newValue = config.type === 'JSON'
|
|
162
|
+
? JSON.stringify({
|
|
163
|
+
endpoint: randomRawValue,
|
|
164
|
+
timeout_ms: '5000',
|
|
165
|
+
array: ['updated_item1', 'updated_item2'],
|
|
166
|
+
})
|
|
167
|
+
: JSON.stringify(randomRawValue);
|
|
168
|
+
await SM_8_10_1.test.step('User navigates to Admin UI', async () => {
|
|
169
|
+
await navigationPage.goToOCAdmin();
|
|
170
|
+
});
|
|
171
|
+
await SM_8_10_1.test.step('User navigates to Cluster Variables tab', async () => {
|
|
172
|
+
await ocIdentityHomePage.clickClusterVariablesTab();
|
|
173
|
+
});
|
|
174
|
+
await SM_8_10_1.test.step(`User verifies ${config.type} tenant cluster variable exists`, async () => {
|
|
175
|
+
await ocIdentityClusterVariablesPage.assertVariableExists(derived.updatableVariableName, TENANT_ID);
|
|
176
|
+
});
|
|
177
|
+
await SM_8_10_1.test.step(`User updates the ${config.type} tenant cluster variable value`, async () => {
|
|
178
|
+
await ocIdentityClusterVariablesPage.editVariable(derived.updatableVariableName, newValue, TENANT_ID);
|
|
179
|
+
});
|
|
180
|
+
await SM_8_10_1.test.step(`User creates a process instance with the updated ${config.type} tenant cluster variable`, async () => {
|
|
181
|
+
const instanceKey = await (0, apiHelpers_1.createProcessInstance)(String(config.processKeyUpdate()), authToken);
|
|
182
|
+
await SM_8_10_1.test.step('User navigates to the process instance on Operate', async () => {
|
|
183
|
+
await navigationPage.goToOperate();
|
|
184
|
+
await operateHomePage.clickProcessesTab();
|
|
185
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
186
|
+
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(instanceKey));
|
|
187
|
+
await operateProcessesPage.clickProcessInstanceLink(String(instanceKey), 'completed');
|
|
188
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
189
|
+
});
|
|
190
|
+
await SM_8_10_1.test.step(`User verifies the updated ${config.type} tenant cluster variable value is present in process variables`, async () => {
|
|
191
|
+
await operateProcessInstancePage.assertProcessVariableContainsText(derived.operateVariableName, randomRawValue);
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
}
|
|
@@ -20,7 +20,7 @@ function getConfigByType(type) {
|
|
|
20
20
|
processName: 'Cluster Variable Original JSON',
|
|
21
21
|
processNameUpdatable: 'Cluster Variable Updatable JSON',
|
|
22
22
|
taskName: 'Preview JSON cluster variables',
|
|
23
|
-
taskElementId: '
|
|
23
|
+
taskElementId: 'Activity_ClusterJsonPreview',
|
|
24
24
|
originalVariableName: CLUSTER_VAR_NAMES.ORIGINAL_JSON,
|
|
25
25
|
updatableVariableName: CLUSTER_VAR_NAMES.UPDATABLE_JSON,
|
|
26
26
|
originalValue: originalJsonClusterVariableValue,
|
|
@@ -31,7 +31,7 @@ function getConfigByType(type) {
|
|
|
31
31
|
processName: 'Cluster Variable Original String',
|
|
32
32
|
processNameUpdatable: 'Cluster Variable Updatable String',
|
|
33
33
|
taskName: 'Preview String cluster variable',
|
|
34
|
-
taskElementId: '
|
|
34
|
+
taskElementId: 'Activity_ClusterStringPreview',
|
|
35
35
|
originalVariableName: CLUSTER_VAR_NAMES.ORIGINAL_STRING,
|
|
36
36
|
updatableVariableName: CLUSTER_VAR_NAMES.UPDATABLE_STRING,
|
|
37
37
|
originalValue: originalStringClusterVariableValue,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|