@camunda/e2e-test-suite 0.0.487 → 0.0.489
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.
|
@@ -21,3 +21,4 @@ export declare function modelWebhookConnector(modelerCreatePage: ModelerCreatePa
|
|
|
21
21
|
export declare function assertLocatorVisibleWithRetry(page: Page, locator: Locator, text: string, maxRetries?: number): Promise<void>;
|
|
22
22
|
export declare function assertPageTextWithRetry(page: Page, text: string, notVisible?: boolean, timeout?: number, maxRetries?: number): Promise<void>;
|
|
23
23
|
export declare function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, connectorTemplatePage: ConnectorTemplatePage): Promise<void>;
|
|
24
|
+
export declare function modelDiagramFromFile(page: Page, modelerHomePage: ModelerHomePage, modelerCreatePage: ModelerCreatePage, processName: string, fileName: string): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.modelAndRunConnectorsTimerEventDiagram = exports.assertPageTextWithRetry = exports.assertLocatorVisibleWithRetry = exports.modelWebhookConnector = exports.modelIntermediateWebhookConnector = exports.modelRestConnector = exports.completeTaskWithRetry = exports.createAndRunProcess = exports.runMultipleProcesses = exports.deleteAllUserGroups = void 0;
|
|
3
|
+
exports.modelDiagramFromFile = exports.modelAndRunConnectorsTimerEventDiagram = exports.assertPageTextWithRetry = exports.assertLocatorVisibleWithRetry = exports.modelWebhookConnector = exports.modelIntermediateWebhookConnector = exports.modelRestConnector = exports.completeTaskWithRetry = exports.createAndRunProcess = exports.runMultipleProcesses = exports.deleteAllUserGroups = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const fileUpload_1 = require("../../utils/fileUpload");
|
|
6
6
|
const sleep_1 = require("../../utils/sleep");
|
|
@@ -305,3 +305,18 @@ async function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage, modeler
|
|
|
305
305
|
await modelerCreatePage.runProcessInstance();
|
|
306
306
|
}
|
|
307
307
|
exports.modelAndRunConnectorsTimerEventDiagram = modelAndRunConnectorsTimerEventDiagram;
|
|
308
|
+
async function modelDiagramFromFile(page, modelerHomePage, modelerCreatePage, processName, fileName) {
|
|
309
|
+
await modelerHomePage.clickDiagramTypeDropdown();
|
|
310
|
+
await modelerHomePage.clickUploadFilesButton();
|
|
311
|
+
await (0, fileUpload_1.uploadFile)(page, fileName + '.bpmn');
|
|
312
|
+
await modelerHomePage.clickProcessDiagram(fileName);
|
|
313
|
+
await modelerCreatePage.clickDiagramBreadcrumb();
|
|
314
|
+
await modelerCreatePage.clickEditDiagramNameButton();
|
|
315
|
+
await modelerCreatePage.enterDiagramName(processName);
|
|
316
|
+
await (0, sleep_1.sleep)(1000);
|
|
317
|
+
await modelerCreatePage.clickGeneralPropertiesPanel();
|
|
318
|
+
await modelerCreatePage.clickIdInput();
|
|
319
|
+
await modelerCreatePage.fillIdInput(processName);
|
|
320
|
+
await (0, sleep_1.sleep)(10000);
|
|
321
|
+
}
|
|
322
|
+
exports.modelDiagramFromFile = modelDiagramFromFile;
|
|
@@ -6,6 +6,7 @@ const _setup_1 = require("../../test-setup.js");
|
|
|
6
6
|
const sleep_1 = require("../../utils/sleep");
|
|
7
7
|
const KeycloakUtils_1 = require("../../pages/SM-8.7/KeycloakUtils");
|
|
8
8
|
const loggingUtils_1 = require("../../utils/loggingUtils");
|
|
9
|
+
const UtlitiesPage_1 = require("../../pages/SM-8.7/UtlitiesPage");
|
|
9
10
|
SM_8_7_1.test.describe.configure({ mode: 'parallel' });
|
|
10
11
|
SM_8_7_1.test.describe('Deploy and run a process in Play', () => {
|
|
11
12
|
SM_8_7_1.test.beforeEach(async ({ navigationPage, identityPage, identityTenantPage, keycloakLoginPage, keycloakAdminPage, }, testInfo) => {
|
|
@@ -17,7 +18,7 @@ SM_8_7_1.test.describe('Deploy and run a process in Play', () => {
|
|
|
17
18
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
18
19
|
(0, loggingUtils_1.cleanupTestLogging)();
|
|
19
20
|
});
|
|
20
|
-
(0, SM_8_7_1.test)('User Tasks and Service Task', async ({ modelerHomePage, modelerCreatePage, playPage, context, navigationPage, }) => {
|
|
21
|
+
(0, SM_8_7_1.test)('User Tasks and Service Task', async ({ page, modelerHomePage, modelerCreatePage, playPage, context, navigationPage, }) => {
|
|
21
22
|
SM_8_7_1.test.slow();
|
|
22
23
|
const randomString = await (0, _setup_1.generateRandomStringAsync)(3);
|
|
23
24
|
const processName = 'Play_Test_Process' + randomString;
|
|
@@ -27,39 +28,8 @@ SM_8_7_1.test.describe('Deploy and run a process in Play', () => {
|
|
|
27
28
|
await modelerHomePage.clickCreateNewProjectButton();
|
|
28
29
|
await modelerHomePage.createCrossComponentProjectFolder();
|
|
29
30
|
});
|
|
30
|
-
await SM_8_7_1.test.step('Add A BPMN Template To The Project', async () => {
|
|
31
|
-
await modelerHomePage.clickDiagramTypeDropdown();
|
|
32
|
-
await modelerHomePage.clickBpmnTemplateOption();
|
|
33
|
-
});
|
|
34
31
|
await SM_8_7_1.test.step('Create a BPMN Diagram with user tasks and service task', async () => {
|
|
35
|
-
await (0,
|
|
36
|
-
timeout: 120000,
|
|
37
|
-
});
|
|
38
|
-
await modelerCreatePage.enterDiagramName(processName);
|
|
39
|
-
await (0, sleep_1.sleep)(2000);
|
|
40
|
-
await modelerCreatePage.clickAppendElementButton();
|
|
41
|
-
await modelerCreatePage.clickAppendTaskButton();
|
|
42
|
-
await modelerCreatePage.clickChangeTypeButton();
|
|
43
|
-
await modelerCreatePage.clickUserTaskOption();
|
|
44
|
-
await modelerCreatePage.chooseImplementationOption('zeebeUserTask');
|
|
45
|
-
await modelerCreatePage.clickGeneralPropertiesPanel();
|
|
46
|
-
await modelerCreatePage.clickElemendIdInput();
|
|
47
|
-
await modelerCreatePage.fillElementIdInput('zeebe-user-task' + randomString);
|
|
48
|
-
await (0, sleep_1.sleep)(1000);
|
|
49
|
-
await modelerCreatePage.clickAppendElementButton();
|
|
50
|
-
await modelerCreatePage.clickAppendTaskButton();
|
|
51
|
-
await modelerCreatePage.clickChangeTypeButton();
|
|
52
|
-
await modelerCreatePage.clickServiceTaskOption();
|
|
53
|
-
await modelerCreatePage.clickGeneralPropertiesPanel();
|
|
54
|
-
await modelerCreatePage.clickElemendIdInput();
|
|
55
|
-
await modelerCreatePage.fillElementIdInput('service-task' + randomString);
|
|
56
|
-
await modelerCreatePage.clickTaskDefinitionPropertiesPanel();
|
|
57
|
-
await modelerCreatePage.clickJobTypeInput();
|
|
58
|
-
await modelerCreatePage.fillJobTypeInput('someJob' + randomString);
|
|
59
|
-
await (0, sleep_1.sleep)(1000);
|
|
60
|
-
await modelerCreatePage.clickAppendElementButton();
|
|
61
|
-
await modelerCreatePage.clickAppendEndEventButton();
|
|
62
|
-
await (0, sleep_1.sleep)(2000);
|
|
32
|
+
await (0, UtlitiesPage_1.modelDiagramFromFile)(page, modelerHomePage, modelerCreatePage, processName, 'Play_Test_User_Service_Task');
|
|
63
33
|
});
|
|
64
34
|
await SM_8_7_1.test.step('Open Play', async () => {
|
|
65
35
|
await modelerCreatePage.switchToPlay();
|
|
@@ -69,10 +39,10 @@ SM_8_7_1.test.describe('Deploy and run a process in Play', () => {
|
|
|
69
39
|
await playPage.dismissStartModal();
|
|
70
40
|
await playPage.clickStartInstanceButton();
|
|
71
41
|
await playPage.waitForInstanceDetailsToBeLoaded();
|
|
72
|
-
await playPage.waitForNextElementToBeActive('
|
|
42
|
+
await playPage.waitForNextElementToBeActive('play-user-task');
|
|
73
43
|
await playPage.waitForCompleteJobButtonToBeAvailable();
|
|
74
44
|
await playPage.clickCompleteJobButton();
|
|
75
|
-
await playPage.waitForNextElementToBeActive('service-task'
|
|
45
|
+
await playPage.waitForNextElementToBeActive('play-service-task');
|
|
76
46
|
await playPage.waitForCompleteJobButtonToBeAvailable();
|
|
77
47
|
await playPage.clickCompleteJobButton();
|
|
78
48
|
await playPage.waitForProcessToBeCompleted();
|
|
@@ -103,7 +73,11 @@ SM_8_7_1.test.describe('Deploy and run a process in Play', () => {
|
|
|
103
73
|
await modelerCreatePage.clickSecondPlacedGateway();
|
|
104
74
|
await modelerCreatePage.clickAppendElementButton();
|
|
105
75
|
await modelerCreatePage.clickAppendEndEventButton('parallelGateway');
|
|
106
|
-
await (0,
|
|
76
|
+
await (0, test_1.expect)(modelerCreatePage.generalPanel).toBeVisible({
|
|
77
|
+
timeout: 30000,
|
|
78
|
+
});
|
|
79
|
+
// Wait for modeler background auto-save to complete
|
|
80
|
+
await (0, sleep_1.sleep)(2000);
|
|
107
81
|
});
|
|
108
82
|
await SM_8_7_1.test.step('Open Play', async () => {
|
|
109
83
|
await modelerCreatePage.switchToPlay();
|
|
@@ -120,17 +94,23 @@ SM_8_7_1.test.describe('Deploy and run a process in Play', () => {
|
|
|
120
94
|
await playPage.clickSaveScenarioButton();
|
|
121
95
|
await playPage.enterScenarioName(scenarioName);
|
|
122
96
|
await playPage.confirmSaveScenario();
|
|
123
|
-
await (0,
|
|
97
|
+
await (0, test_1.expect)(playPage.saveScenarioModal).toBeHidden({ timeout: 10000 });
|
|
124
98
|
});
|
|
125
99
|
await SM_8_7_1.test.step('Update the saved scenario', async () => {
|
|
126
100
|
await modelerCreatePage.switchToImplementTab();
|
|
127
|
-
await (0,
|
|
101
|
+
await (0, test_1.expect)(modelerCreatePage.generalPanel).toBeVisible({
|
|
102
|
+
timeout: 30000,
|
|
103
|
+
});
|
|
128
104
|
await modelerCreatePage.clickFirstPlacedGateway();
|
|
129
105
|
await modelerCreatePage.clickAppendElementButton();
|
|
130
106
|
await modelerCreatePage.clickAppendTaskButton();
|
|
131
107
|
await modelerCreatePage.clickConnectToOtherElementButton();
|
|
132
108
|
await modelerCreatePage.clickSecondPlacedGateway();
|
|
133
|
-
await (0,
|
|
109
|
+
await (0, test_1.expect)(modelerCreatePage.generalPanel).toBeVisible({
|
|
110
|
+
timeout: 30000,
|
|
111
|
+
});
|
|
112
|
+
// Wait for modeler background auto-save to complete
|
|
113
|
+
await (0, sleep_1.sleep)(2000);
|
|
134
114
|
await modelerCreatePage.switchToPlay();
|
|
135
115
|
await modelerCreatePage.completePlayConfiguration();
|
|
136
116
|
await playPage.clickStartInstanceButton();
|
package/package.json
CHANGED
|
@@ -4889,40 +4889,47 @@ if [[ -n "$UW_DEFINITION_KEY" ]]; then
|
|
|
4889
4889
|
|
|
4890
4890
|
# Immediately suspend to catch initialization race condition
|
|
4891
4891
|
# Use retry logic to handle eventual consistency (batch may not be indexed yet)
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
echo "
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4892
|
+
# Batch 1 is kept ACTIVE so the main suspension endpoint test (below) can use it;
|
|
4893
|
+
# only run the immediate-suspension race-condition test on batches 2 and 3.
|
|
4894
|
+
if [[ $batch_num -ne 1 ]]; then
|
|
4895
|
+
echo " Attempting immediate suspension (race condition test)..."
|
|
4896
|
+
immediate_suspend_success=false
|
|
4897
|
+
for suspend_retry in 1 2 3; do
|
|
4898
|
+
immediate_suspend_response="$(call_api_json_no_tenant "POST" "/v2/batch-operations/$batch_key/suspension" "" 2>&1)"
|
|
4899
|
+
immediate_suspend_status="$(echo "$immediate_suspend_response" | extract_status)"
|
|
4900
|
+
immediate_suspend_body="$(echo "$immediate_suspend_response" | get_body)"
|
|
4901
|
+
immediate_suspend_error="$(echo "$immediate_suspend_body" | jq -r '.message // .error // .detail // empty' 2>/dev/null)"
|
|
4902
|
+
|
|
4903
|
+
if [[ "$immediate_suspend_status" == "204" ]]; then
|
|
4904
|
+
echo " ✓ Immediate suspension successful (attempt $suspend_retry/3, status: 204)"
|
|
4905
|
+
immediate_suspend_success=true
|
|
4906
|
+
break
|
|
4907
|
+
elif [[ "$immediate_suspend_status" == "404" ]]; then
|
|
4908
|
+
if [[ $suspend_retry -lt 3 ]]; then
|
|
4909
|
+
echo " Batch not yet indexed (404), retrying in 0.1s (attempt $suspend_retry/3)..."
|
|
4910
|
+
sleep 0.1
|
|
4911
|
+
else
|
|
4912
|
+
echo " Immediate suspension failed after 3 attempts (still getting 404)"
|
|
4913
|
+
fi
|
|
4908
4914
|
else
|
|
4909
|
-
echo " Immediate suspension
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
echo -e " ${RED}⚠ POTENTIAL RACE CONDITION DETECTED during immediate suspension of batch $batch_num!${NC}"
|
|
4917
|
-
immediate_suspend_success=true # Race condition detected is a "success" for our test
|
|
4915
|
+
echo " Immediate suspension status: $immediate_suspend_status"
|
|
4916
|
+
if [[ -n "$immediate_suspend_error" ]]; then
|
|
4917
|
+
echo " Immediate suspension error: $immediate_suspend_error"
|
|
4918
|
+
if [[ "$immediate_suspend_error" =~ "foreign-key constraint"|"BATCH_OPERATION_CHUNKS"|"ZeebeDbInconsistentException"|"concurrent modification"|"already exists" ]]; then
|
|
4919
|
+
echo -e " ${RED}⚠ POTENTIAL RACE CONDITION DETECTED during immediate suspension of batch $batch_num!${NC}"
|
|
4920
|
+
immediate_suspend_success=true # Race condition detected is a "success" for our test
|
|
4921
|
+
fi
|
|
4918
4922
|
fi
|
|
4923
|
+
break
|
|
4919
4924
|
fi
|
|
4920
|
-
|
|
4925
|
+
done
|
|
4926
|
+
|
|
4927
|
+
if [[ "$immediate_suspend_success" == "false" ]]; then
|
|
4928
|
+
echo " ⚠ Could not immediately suspend batch $batch_num (eventual consistency delay)"
|
|
4921
4929
|
fi
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
echo " ⚠ Could not immediately suspend batch $batch_num (eventual consistency delay)"
|
|
4930
|
+
else
|
|
4931
|
+
# Batch 1 stays ACTIVE so the main suspension endpoint test can test it
|
|
4932
|
+
immediate_suspend_success=false
|
|
4926
4933
|
fi
|
|
4927
4934
|
else
|
|
4928
4935
|
echo " Failed to get batch operation key"
|