@camunda/e2e-test-suite 0.0.416 → 0.0.418
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/SM-8.8/ModelerCreatePage.js +1 -0
- package/dist/pages/SM-8.8/OperateProcessesPage.js +45 -0
- package/dist/pages/SM-8.8/optimizeReportUtils.d.ts +1 -1
- package/dist/pages/SM-8.8/optimizeReportUtils.js +33 -12
- package/dist/tests/8.10/test-setup.spec.js +3 -7
- package/dist/tests/SM-8.8/smoke-tests.spec.js +1 -1
- package/package.json +1 -1
|
@@ -245,6 +245,7 @@ class ModelerCreatePage {
|
|
|
245
245
|
this.openDetailsPanel = page.getByTitle('Open Details Panel');
|
|
246
246
|
}
|
|
247
247
|
async deployProcessInstance() {
|
|
248
|
+
await (0, sleep_1.sleep)(2000);
|
|
248
249
|
await this.clickDeployButton();
|
|
249
250
|
await this.clickDeploySubButton();
|
|
250
251
|
await (0, test_1.expect)(this.page.getByText('Process successfully deployed')).toBeVisible({
|
|
@@ -49,6 +49,7 @@ class OperateProcessesPage {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
async uncheckCheckbox(checkbox) {
|
|
52
|
+
await (0, test_1.expect)(checkbox).toBeVisible({ timeout: constants_1._1_SECOND_IN_MS * 10 });
|
|
52
53
|
if (await checkbox.isChecked()) {
|
|
53
54
|
await checkbox.click();
|
|
54
55
|
await (0, test_1.expect)(checkbox).toBeChecked({
|
|
@@ -58,17 +59,39 @@ class OperateProcessesPage {
|
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
async clickProcessActiveCheckbox() {
|
|
62
|
+
await (0, test_1.expect)(this.processActiveCheckbox).toBeVisible({
|
|
63
|
+
timeout: constants_1._1_SECOND_IN_MS * 10,
|
|
64
|
+
});
|
|
61
65
|
if (!(await this.processActiveCheckbox.isChecked({ timeout: 60000 }))) {
|
|
62
66
|
await this.processActiveCheckbox.click({ timeout: 120000 });
|
|
67
|
+
await (0, test_1.expect)(this.processActiveCheckbox).toBeChecked({
|
|
68
|
+
checked: true,
|
|
69
|
+
timeout: constants_1._1_SECOND_IN_MS * 15,
|
|
70
|
+
});
|
|
63
71
|
}
|
|
64
72
|
}
|
|
65
73
|
async clickProcessCompletedCheckbox() {
|
|
74
|
+
await (0, test_1.expect)(this.processCompletedCheckbox).toBeVisible({
|
|
75
|
+
timeout: constants_1._1_SECOND_IN_MS * 10,
|
|
76
|
+
});
|
|
66
77
|
if (!(await this.processCompletedCheckbox.isChecked({ timeout: 60000 }))) {
|
|
67
78
|
await this.processCompletedCheckbox.click({ timeout: 120000 });
|
|
79
|
+
await (0, test_1.expect)(this.processCompletedCheckbox).toBeChecked({
|
|
80
|
+
checked: true,
|
|
81
|
+
timeout: constants_1._1_SECOND_IN_MS * 15,
|
|
82
|
+
});
|
|
68
83
|
}
|
|
69
84
|
}
|
|
70
85
|
async clickProcessIncidentsCheckbox() {
|
|
86
|
+
await (0, test_1.expect)(this.processIncidentsCheckbox).toBeVisible({
|
|
87
|
+
timeout: constants_1._1_SECOND_IN_MS * 10,
|
|
88
|
+
});
|
|
89
|
+
const wasChecked = await this.processIncidentsCheckbox.isChecked();
|
|
71
90
|
await this.processIncidentsCheckbox.click({ timeout: 90000 });
|
|
91
|
+
await (0, test_1.expect)(this.processIncidentsCheckbox).toBeChecked({
|
|
92
|
+
checked: !wasChecked,
|
|
93
|
+
timeout: constants_1._1_SECOND_IN_MS * 15,
|
|
94
|
+
});
|
|
72
95
|
}
|
|
73
96
|
async uncheckCompletedCheckbox() {
|
|
74
97
|
await this.uncheckCheckbox(this.processCompletedCheckbox);
|
|
@@ -77,14 +100,33 @@ class OperateProcessesPage {
|
|
|
77
100
|
await this.uncheckCheckbox(this.processActiveCheckbox);
|
|
78
101
|
}
|
|
79
102
|
async clickRunningProcessInstancesCheckbox() {
|
|
103
|
+
await (0, test_1.expect)(this.processRunningInstancesCheckbox).toBeVisible({
|
|
104
|
+
timeout: constants_1._1_SECOND_IN_MS * 10,
|
|
105
|
+
});
|
|
106
|
+
const wasChecked = await this.processRunningInstancesCheckbox.isChecked();
|
|
80
107
|
await this.processRunningInstancesCheckbox.click({ timeout: 90000 });
|
|
108
|
+
await (0, test_1.expect)(this.processRunningInstancesCheckbox).toBeChecked({
|
|
109
|
+
checked: !wasChecked,
|
|
110
|
+
timeout: constants_1._1_SECOND_IN_MS * 15,
|
|
111
|
+
});
|
|
81
112
|
}
|
|
82
113
|
async clickFinishedProcessInstancesCheckbox() {
|
|
114
|
+
await (0, test_1.expect)(this.processFinishedInstancesCheckbox).toBeVisible({
|
|
115
|
+
timeout: constants_1._1_SECOND_IN_MS * 10,
|
|
116
|
+
});
|
|
117
|
+
const wasChecked = await this.processFinishedInstancesCheckbox.isChecked();
|
|
83
118
|
await this.processFinishedInstancesCheckbox.click({ timeout: 90000 });
|
|
119
|
+
await (0, test_1.expect)(this.processFinishedInstancesCheckbox).toBeChecked({
|
|
120
|
+
checked: !wasChecked,
|
|
121
|
+
timeout: constants_1._1_SECOND_IN_MS * 15,
|
|
122
|
+
});
|
|
84
123
|
}
|
|
85
124
|
async toggleActiveCheckboxOn() {
|
|
86
125
|
await this.uncheckCompletedCheckbox();
|
|
87
126
|
await this.clickProcessIncidentsCheckbox();
|
|
127
|
+
await (0, test_1.expect)(this.processActiveCheckbox).toBeVisible({
|
|
128
|
+
timeout: constants_1._1_SECOND_IN_MS * 10,
|
|
129
|
+
});
|
|
88
130
|
if (await this.processActiveCheckbox.isChecked({ timeout: constants_1._1_SECOND_IN_MS })) {
|
|
89
131
|
await this.uncheckCheckbox(this.processActiveCheckbox);
|
|
90
132
|
await (0, sleep_1.sleep)(200); // Required to skip the debounce protection on the frontend
|
|
@@ -97,6 +139,9 @@ class OperateProcessesPage {
|
|
|
97
139
|
async toggleCompletedCheckbox() {
|
|
98
140
|
await this.uncheckActiveCheckbox();
|
|
99
141
|
await this.clickProcessIncidentsCheckbox();
|
|
142
|
+
await (0, test_1.expect)(this.processCompletedCheckbox).toBeVisible({
|
|
143
|
+
timeout: constants_1._1_SECOND_IN_MS * 10,
|
|
144
|
+
});
|
|
100
145
|
if (await this.processCompletedCheckbox.isChecked({ timeout: constants_1._1_SECOND_IN_MS })) {
|
|
101
146
|
await this.uncheckCheckbox(this.processCompletedCheckbox);
|
|
102
147
|
await (0, sleep_1.sleep)(200); // Required to skip the debounce protection on the frontend
|
|
@@ -2,5 +2,5 @@ import { Locator, Page } from '@playwright/test';
|
|
|
2
2
|
import { OptimizeCollectionsPage } from '../SM-8.8/OptimizeCollectionsPage';
|
|
3
3
|
import { OptimizeReportPage } from '../SM-8.8/OptimizeReportPage';
|
|
4
4
|
import { OptimizeHomePage } from '../SM-8.8/OptimizeHomePage';
|
|
5
|
-
export declare const createReportForProcess: (optimizeCollectionsPage: OptimizeCollectionsPage, optimizeReportPage: OptimizeReportPage, processName: string) => Promise<void>;
|
|
5
|
+
export declare const createReportForProcess: (page: Page, optimizeCollectionsPage: OptimizeCollectionsPage, optimizeReportPage: OptimizeReportPage, processName: string) => Promise<void>;
|
|
6
6
|
export declare const assertReportWithRefreshes: (page: Page, optimizeHomePage: OptimizeHomePage, optimizeCollectionsPage: OptimizeCollectionsPage, optimizeReportPage: OptimizeReportPage, reportName: string, locator: Locator, text: string) => Promise<void>;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.assertReportWithRefreshes = exports.createReportForProcess = void 0;
|
|
4
|
-
const test_1 = require("@playwright/test");
|
|
5
4
|
const UtilitiesPage_1 = require("../SM-8.8/UtilitiesPage");
|
|
6
|
-
const createReportForProcess = async (optimizeCollectionsPage, optimizeReportPage, processName) => {
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const createReportForProcess = async (page, optimizeCollectionsPage, optimizeReportPage, processName) => {
|
|
6
|
+
const TOTAL_TIMEOUT_MS = 3 * 60 * 1000; // 3 minutes
|
|
7
|
+
const startTime = Date.now();
|
|
8
|
+
let attempt = 0;
|
|
9
|
+
let found = false;
|
|
10
|
+
while (Date.now() - startTime < TOTAL_TIMEOUT_MS) {
|
|
11
|
+
attempt++;
|
|
9
12
|
try {
|
|
10
13
|
await optimizeCollectionsPage.clickCreateNewButton();
|
|
11
14
|
await optimizeCollectionsPage.clickReportOption();
|
|
12
15
|
await optimizeReportPage.clickProcessSelectionButton();
|
|
13
16
|
await optimizeReportPage.waitUntilUserTaskProcessIsVisible(processName);
|
|
17
|
+
found = true;
|
|
14
18
|
break;
|
|
15
19
|
}
|
|
16
20
|
catch (error) {
|
|
@@ -20,28 +24,45 @@ const createReportForProcess = async (optimizeCollectionsPage, optimizeReportPag
|
|
|
20
24
|
catch (cancelError) {
|
|
21
25
|
// Page may have been closed due to test timeout, ignore
|
|
22
26
|
}
|
|
23
|
-
|
|
27
|
+
console.log(`createReportForProcess attempt ${attempt} failed for "${processName}". Reloading page...`);
|
|
28
|
+
await page.reload();
|
|
29
|
+
await page.waitForLoadState('load', { timeout: 10000 }).catch(() => {
|
|
30
|
+
// Safe to ignore: reload may trigger slow load, we'll retry the whole flow
|
|
31
|
+
});
|
|
32
|
+
await new Promise((resolve) => setTimeout(resolve, 3000));
|
|
24
33
|
}
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
}
|
|
35
|
+
if (!found) {
|
|
36
|
+
throw new Error(`createReportForProcess: Process "${processName}" not found after ${attempt} attempts (${TOTAL_TIMEOUT_MS / 1000}s timeout)`);
|
|
27
37
|
}
|
|
28
38
|
};
|
|
29
39
|
exports.createReportForProcess = createReportForProcess;
|
|
30
40
|
const assertReportWithRefreshes = async (page, optimizeHomePage, optimizeCollectionsPage, optimizeReportPage, reportName, locator, text) => {
|
|
31
|
-
|
|
32
|
-
|
|
41
|
+
const TOTAL_TIMEOUT_MS = 3 * 60 * 1000; // 3 minutes
|
|
42
|
+
const startTime = Date.now();
|
|
43
|
+
let attempt = 0;
|
|
44
|
+
let found = false;
|
|
45
|
+
while (Date.now() - startTime < TOTAL_TIMEOUT_MS) {
|
|
46
|
+
attempt++;
|
|
33
47
|
try {
|
|
34
48
|
await optimizeHomePage.clickCollectionsLink();
|
|
35
49
|
await (0, UtilitiesPage_1.assertPageTextWithRetry)(page, reportName, false);
|
|
36
50
|
await optimizeCollectionsPage.clickMostRecentProcessReport(reportName);
|
|
37
51
|
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(page, locator, text, 0);
|
|
52
|
+
found = true;
|
|
38
53
|
break;
|
|
39
54
|
}
|
|
40
55
|
catch (error) {
|
|
41
|
-
|
|
56
|
+
console.log(`assertReportWithRefreshes attempt ${attempt} failed for "${reportName}". Reloading page...`);
|
|
57
|
+
await page.reload();
|
|
58
|
+
await page.waitForLoadState('load', { timeout: 10000 }).catch(() => {
|
|
59
|
+
// Safe to ignore: reload may trigger slow load, we'll retry the whole flow
|
|
60
|
+
});
|
|
61
|
+
await new Promise((resolve) => setTimeout(resolve, 3000));
|
|
42
62
|
}
|
|
43
|
-
|
|
44
|
-
|
|
63
|
+
}
|
|
64
|
+
if (!found) {
|
|
65
|
+
throw new Error(`assertReportWithRefreshes: Report "${reportName}" assertion failed after ${attempt} attempts (${TOTAL_TIMEOUT_MS / 1000}s timeout)`);
|
|
45
66
|
}
|
|
46
67
|
};
|
|
47
68
|
exports.assertReportWithRefreshes = assertReportWithRefreshes;
|
|
@@ -13,12 +13,8 @@ _8_10_1.test.describe('Cluster Setup Tests', () => {
|
|
|
13
13
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
14
14
|
});
|
|
15
15
|
(0, _8_10_1.test)('Enable Alpha Features', async ({ page, loginPage, consoleOrganizationsPage, homePage, }, testInfo) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
if (process.env.IS_AG === 'true') {
|
|
20
|
-
_8_10_1.test.skip(true, 'Skipping test because not required when IS_AG is true');
|
|
21
|
-
}
|
|
16
|
+
_8_10_1.test.skip(process.env.IS_PROD === 'true', 'Skipping test because not required on PROD test org');
|
|
17
|
+
_8_10_1.test.skip(process.env.IS_AG === 'true', 'Skipping test because not required when IS_AG is true');
|
|
22
18
|
await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, users_1.testUsers.mainUser, (testInfo.workerIndex + 1) * 1000);
|
|
23
19
|
await homePage.clickOrganization();
|
|
24
20
|
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(page, consoleOrganizationsPage.settingsTab, 'settings tab', 60000, false, 2);
|
|
@@ -47,9 +43,9 @@ _8_10_1.test.describe('Cluster Setup Tests', () => {
|
|
|
47
43
|
}
|
|
48
44
|
});
|
|
49
45
|
(0, _8_10_1.test)('Create AWS Cluster', async ({ page, loginPage, homePage, clusterPage, clusterDetailsPage, clusterSecretsPage, }, testInfo) => {
|
|
50
|
-
await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, users_1.testUsers.mainUser, (testInfo.workerIndex + 1) * 1000);
|
|
51
46
|
_8_10_1.test.slow();
|
|
52
47
|
const clusterName = 'AWS Cluster';
|
|
48
|
+
await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, users_1.testUsers.mainUser, (testInfo.workerIndex + 1) * 1000);
|
|
53
49
|
await homePage.clickClusters();
|
|
54
50
|
await clusterPage.createCluster(clusterName, 'AWS');
|
|
55
51
|
await clusterPage.assertClusterHealthyStatusWithRetry(clusterName, 300000);
|
|
@@ -100,7 +100,7 @@ SM_8_8_1.test.describe.parallel('Smoke Tests', () => {
|
|
|
100
100
|
if (process.env.IS_OPTIMIZE !== 'false') {
|
|
101
101
|
await navigationPage.goToOptimize();
|
|
102
102
|
await optimizeHomePage.clickCollectionsLink();
|
|
103
|
-
await (0, optimizeReportUtils_1.createReportForProcess)(optimizeCollectionsPage, optimizeReportPage, processName);
|
|
103
|
+
await (0, optimizeReportUtils_1.createReportForProcess)(page, optimizeCollectionsPage, optimizeReportPage, processName);
|
|
104
104
|
await optimizeReportPage.clickUserTaskProcess(processName);
|
|
105
105
|
await (0, test_1.expect)(optimizeReportPage.versionSelection).toBeEnabled({
|
|
106
106
|
timeout: 30000,
|