@camunda/e2e-test-suite 0.0.643 → 0.0.645
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.10/ModelerCreatePage.d.ts +2 -1
- package/dist/pages/8.10/ModelerCreatePage.js +7 -1
- package/dist/pages/8.10/OperateProcessInstancePage.d.ts +1 -0
- package/dist/pages/8.10/OperateProcessInstancePage.js +7 -0
- package/dist/resources/test-api-v2-complete.sh +11 -7
- package/dist/tests/8.10/web-modeler-user-flows.spec.js +40 -0
- package/package.json +1 -1
- package/resources/test-api-v2-complete.sh +11 -7
|
@@ -16,6 +16,7 @@ declare class ModelerCreatePage {
|
|
|
16
16
|
readonly renameDiagramNameButton: Locator;
|
|
17
17
|
readonly diagramNameInput: Locator;
|
|
18
18
|
readonly variableInput: Locator;
|
|
19
|
+
readonly businessIdInput: Locator;
|
|
19
20
|
readonly embedFormButton: Locator;
|
|
20
21
|
readonly embedButton: Locator;
|
|
21
22
|
readonly newForm: Locator;
|
|
@@ -137,7 +138,7 @@ declare class ModelerCreatePage {
|
|
|
137
138
|
clickStartInstanceSubButton(): Promise<void>;
|
|
138
139
|
runProcessInstance(clusterName: string, variables?: string, formVariables?: {
|
|
139
140
|
[key: string]: string;
|
|
140
|
-
}, textToVisible?: string, hasDeploymentPermission?: boolean): Promise<void>;
|
|
141
|
+
}, textToVisible?: string, hasDeploymentPermission?: boolean, businessId?: string): Promise<void>;
|
|
141
142
|
selectCluster(clusterName: string): Promise<void>;
|
|
142
143
|
clickViewProcessInstanceLink(): Promise<void>;
|
|
143
144
|
clickNameInput(): Promise<void>;
|
|
@@ -22,6 +22,7 @@ class ModelerCreatePage {
|
|
|
22
22
|
renameDiagramNameButton;
|
|
23
23
|
diagramNameInput;
|
|
24
24
|
variableInput;
|
|
25
|
+
businessIdInput;
|
|
25
26
|
embedFormButton;
|
|
26
27
|
embedButton;
|
|
27
28
|
newForm;
|
|
@@ -149,6 +150,7 @@ class ModelerCreatePage {
|
|
|
149
150
|
this.renameDiagramNameButton = page.getByText('Rename');
|
|
150
151
|
this.diagramNameInput = page.locator('[data-test="editable-input"]');
|
|
151
152
|
this.variableInput = page.locator('textarea#variables-json');
|
|
153
|
+
this.businessIdInput = page.locator('[id^="business-id-input"]');
|
|
152
154
|
this.embedFormButton = page.getByRole('button', { name: 'Link form' });
|
|
153
155
|
this.embedButton = page.locator('[data-test="confirm-move"]');
|
|
154
156
|
this.newForm = page
|
|
@@ -534,7 +536,7 @@ class ModelerCreatePage {
|
|
|
534
536
|
async clickStartInstanceSubButton() {
|
|
535
537
|
await this.deployAndRunSubButton.click({ timeout: 30000 });
|
|
536
538
|
}
|
|
537
|
-
async runProcessInstance(clusterName, variables = '', formVariables = {}, textToVisible = '', hasDeploymentPermission = true) {
|
|
539
|
+
async runProcessInstance(clusterName, variables = '', formVariables = {}, textToVisible = '', hasDeploymentPermission = true, businessId = '') {
|
|
538
540
|
const maxRetries = 10;
|
|
539
541
|
const retryDelayMs = 20000;
|
|
540
542
|
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
@@ -560,6 +562,10 @@ class ModelerCreatePage {
|
|
|
560
562
|
await this.fillStartFormNumber(formVariables.startNumber);
|
|
561
563
|
}
|
|
562
564
|
}
|
|
565
|
+
if (businessId.length > 0) {
|
|
566
|
+
await (0, test_1.expect)(this.businessIdInput).toBeVisible({ timeout: 60000 });
|
|
567
|
+
await this.businessIdInput.fill(businessId);
|
|
568
|
+
}
|
|
563
569
|
if (textToVisible.length > 0) {
|
|
564
570
|
await (0, test_1.expect)(this.dialog.getByText(textToVisible)).toBeVisible({
|
|
565
571
|
timeout: 30000,
|
|
@@ -23,5 +23,6 @@ declare class OperateProcessInstancePage {
|
|
|
23
23
|
clickDiagramTask(taskName: string): Promise<void>;
|
|
24
24
|
assertActiveTokenIsPresent(): Promise<void>;
|
|
25
25
|
assertDetailsPopoverIsVisible(): Promise<void>;
|
|
26
|
+
assertBusinessIdVisible(businessId: string): Promise<void>;
|
|
26
27
|
}
|
|
27
28
|
export { OperateProcessInstancePage };
|
|
@@ -136,5 +136,12 @@ class OperateProcessInstancePage {
|
|
|
136
136
|
timeout: 60000,
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
|
+
async assertBusinessIdVisible(businessId) {
|
|
140
|
+
const instanceHeader = this.page.getByTestId('instance-header');
|
|
141
|
+
await (0, test_1.expect)(instanceHeader.getByText('Business ID')).toBeVisible({
|
|
142
|
+
timeout: 60000,
|
|
143
|
+
});
|
|
144
|
+
await (0, test_1.expect)(instanceHeader.getByText(businessId, { exact: true })).toBeVisible({ timeout: 60000 });
|
|
145
|
+
}
|
|
139
146
|
}
|
|
140
147
|
exports.OperateProcessInstancePage = OperateProcessInstancePage;
|
|
@@ -10799,15 +10799,19 @@ BPMN_EOF
|
|
|
10799
10799
|
|
|
10800
10800
|
if [[ "$J2_RESTORE_SUCCESS" == "true" ]]; then
|
|
10801
10801
|
# Wait for authorization change to propagate
|
|
10802
|
-
sleep
|
|
10802
|
+
sleep 5
|
|
10803
10803
|
TEST_CLIENT_TOKEN="$(get_client_token "$TEST_CLIENT_ID" "$TEST_CLIENT_SECRET")"
|
|
10804
|
-
|
|
10804
|
+
|
|
10805
10805
|
# Step 6: HAPPY PATH - Create document as $CLIENT_ID client (should succeed)
|
|
10806
10806
|
echo -e "\n${BLUE}Step 6: HAPPY PATH - Creating document as '$CLIENT_ID' client (expecting 201)${NC}"
|
|
10807
|
-
|
|
10808
|
-
# Retry up to 5 times with
|
|
10807
|
+
|
|
10808
|
+
# Retry up to 5 times with increasing delay; refresh token on each retry to
|
|
10809
|
+
# handle auth-cache propagation delays (permission store may lag behind token).
|
|
10809
10810
|
happy_doc_status=""
|
|
10810
10811
|
for retry in 1 2 3 4 5; do
|
|
10812
|
+
# Refresh token on each attempt — the permission change may not be reflected
|
|
10813
|
+
# in the Keycloak token cache until a new token is issued.
|
|
10814
|
+
TEST_CLIENT_TOKEN="$(get_client_token "$TEST_CLIENT_ID" "$TEST_CLIENT_SECRET")"
|
|
10811
10815
|
DOC_TEST_CONTENT2="Authorization test document - with permission - $(date)"
|
|
10812
10816
|
DOC_TEST_FILENAME2="auth-test-doc-happy-$(date +%s)-retry$retry.txt"
|
|
10813
10817
|
DOC_TEST_TEMPFILE2="/tmp/$DOC_TEST_FILENAME2"
|
|
@@ -10864,12 +10868,12 @@ BPMN_EOF
|
|
|
10864
10868
|
break
|
|
10865
10869
|
else
|
|
10866
10870
|
if [[ $retry -lt 5 ]]; then
|
|
10867
|
-
echo " Retrying after
|
|
10868
|
-
sleep
|
|
10871
|
+
echo " Retrying after 3 seconds..."
|
|
10872
|
+
sleep 3
|
|
10869
10873
|
fi
|
|
10870
10874
|
fi
|
|
10871
10875
|
done
|
|
10872
|
-
|
|
10876
|
+
|
|
10873
10877
|
# If all retries failed
|
|
10874
10878
|
if [[ "$happy_doc_status" != "201" && "$happy_doc_status" != "200" ]]; then
|
|
10875
10879
|
echo -e "${RED}✗ UNEXPECTED: Document creation failed after 5 retries with permission restored${NC}"
|
|
@@ -366,6 +366,46 @@ _8_10_1.test.describe('Web Modeler User Flow Tests', () => {
|
|
|
366
366
|
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateProcessInstancePage, operateProcessInstancePage.completedIcon, 'Completed icon', 60000, false, 5);
|
|
367
367
|
});
|
|
368
368
|
});
|
|
369
|
+
(0, _8_10_1.test)('Deploy and run process with run configuration and verify in Operate', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, }) => {
|
|
370
|
+
_8_10_1.test.slow();
|
|
371
|
+
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
372
|
+
const processName = 'Run_Config_Process_' + randomString;
|
|
373
|
+
const businessId = `bid-${Date.now()}-${randomString}`;
|
|
374
|
+
const variables = '{"orderNumber": "A12BH98", "amount": 185.34}';
|
|
375
|
+
await _8_10_1.test.step('Navigate to Web Modeler', async () => {
|
|
376
|
+
await (0, test_1.expect)(homePage.camundaComponentsButton).toBeVisible({
|
|
377
|
+
timeout: 120000,
|
|
378
|
+
});
|
|
379
|
+
await appsPage.clickCamundaApps();
|
|
380
|
+
await appsPage.clickModeler();
|
|
381
|
+
await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
|
|
382
|
+
timeout: 180000,
|
|
383
|
+
});
|
|
384
|
+
});
|
|
385
|
+
await _8_10_1.test.step('Open Cross Component Test Project and Create a BPMN Diagram Template', async () => {
|
|
386
|
+
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
387
|
+
await modelerHomePage.clickDiagramTypeDropdown();
|
|
388
|
+
await modelerHomePage.clickBpmnTemplateOption();
|
|
389
|
+
});
|
|
390
|
+
await _8_10_1.test.step('Model a simple job worker diagram', async () => {
|
|
391
|
+
await modelerCreatePage.modelJobWorkerDiagram(processName);
|
|
392
|
+
});
|
|
393
|
+
await _8_10_1.test.step('Deploy and run process with variables and Business ID', async () => {
|
|
394
|
+
await modelerCreatePage.runProcessInstance(clusterName, variables, {}, '', true, businessId);
|
|
395
|
+
});
|
|
396
|
+
await _8_10_1.test.step('View process instance in Operate and assert run configuration is visible', async () => {
|
|
397
|
+
await (0, test_1.expect)(modelerCreatePage.viewProcessInstanceLink).toBeVisible({
|
|
398
|
+
timeout: 180000,
|
|
399
|
+
});
|
|
400
|
+
await modelerCreatePage.clickViewProcessInstanceLink();
|
|
401
|
+
const operateTab = await page.waitForEvent('popup', { timeout: 60000 });
|
|
402
|
+
const operateTabOperateProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(operateTab);
|
|
403
|
+
await operateTabOperateProcessInstancePage.closePopOverIfVisible();
|
|
404
|
+
await operateTabOperateProcessInstancePage.assertBusinessIdVisible(businessId);
|
|
405
|
+
await operateTabOperateProcessInstancePage.assertProcessVariableContainsText('orderNumber', '"A12BH98"');
|
|
406
|
+
await operateTabOperateProcessInstancePage.assertProcessVariableContainsText('amount', '185.34');
|
|
407
|
+
});
|
|
408
|
+
});
|
|
369
409
|
(0, _8_10_1.test)('Conditional Events - Deploy, verify in Operate and verify process in Optimize dashboard @tasklistV2', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, }) => {
|
|
370
410
|
_8_10_1.test.slow();
|
|
371
411
|
const bpmnFileName = 'Conditional_Events_All.bpmn';
|
package/package.json
CHANGED
|
@@ -10799,15 +10799,19 @@ BPMN_EOF
|
|
|
10799
10799
|
|
|
10800
10800
|
if [[ "$J2_RESTORE_SUCCESS" == "true" ]]; then
|
|
10801
10801
|
# Wait for authorization change to propagate
|
|
10802
|
-
sleep
|
|
10802
|
+
sleep 5
|
|
10803
10803
|
TEST_CLIENT_TOKEN="$(get_client_token "$TEST_CLIENT_ID" "$TEST_CLIENT_SECRET")"
|
|
10804
|
-
|
|
10804
|
+
|
|
10805
10805
|
# Step 6: HAPPY PATH - Create document as $CLIENT_ID client (should succeed)
|
|
10806
10806
|
echo -e "\n${BLUE}Step 6: HAPPY PATH - Creating document as '$CLIENT_ID' client (expecting 201)${NC}"
|
|
10807
|
-
|
|
10808
|
-
# Retry up to 5 times with
|
|
10807
|
+
|
|
10808
|
+
# Retry up to 5 times with increasing delay; refresh token on each retry to
|
|
10809
|
+
# handle auth-cache propagation delays (permission store may lag behind token).
|
|
10809
10810
|
happy_doc_status=""
|
|
10810
10811
|
for retry in 1 2 3 4 5; do
|
|
10812
|
+
# Refresh token on each attempt — the permission change may not be reflected
|
|
10813
|
+
# in the Keycloak token cache until a new token is issued.
|
|
10814
|
+
TEST_CLIENT_TOKEN="$(get_client_token "$TEST_CLIENT_ID" "$TEST_CLIENT_SECRET")"
|
|
10811
10815
|
DOC_TEST_CONTENT2="Authorization test document - with permission - $(date)"
|
|
10812
10816
|
DOC_TEST_FILENAME2="auth-test-doc-happy-$(date +%s)-retry$retry.txt"
|
|
10813
10817
|
DOC_TEST_TEMPFILE2="/tmp/$DOC_TEST_FILENAME2"
|
|
@@ -10864,12 +10868,12 @@ BPMN_EOF
|
|
|
10864
10868
|
break
|
|
10865
10869
|
else
|
|
10866
10870
|
if [[ $retry -lt 5 ]]; then
|
|
10867
|
-
echo " Retrying after
|
|
10868
|
-
sleep
|
|
10871
|
+
echo " Retrying after 3 seconds..."
|
|
10872
|
+
sleep 3
|
|
10869
10873
|
fi
|
|
10870
10874
|
fi
|
|
10871
10875
|
done
|
|
10872
|
-
|
|
10876
|
+
|
|
10873
10877
|
# If all retries failed
|
|
10874
10878
|
if [[ "$happy_doc_status" != "201" && "$happy_doc_status" != "200" ]]; then
|
|
10875
10879
|
echo -e "${RED}✗ UNEXPECTED: Document creation failed after 5 retries with permission restored${NC}"
|