@camunda/e2e-test-suite 0.0.246 → 0.0.248
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.7/ClusterDetailsPage.js +8 -2
- package/dist/pages/8.7/ClusterPage.d.ts +1 -1
- package/dist/pages/8.7/ClusterPage.js +29 -9
- package/dist/pages/8.7/FormJsPage.js +3 -0
- package/dist/pages/8.7/ModelerCreatePage.d.ts +2 -1
- package/dist/pages/8.7/ModelerCreatePage.js +18 -1
- package/dist/pages/8.7/TaskDetailsPage.js +3 -0
- package/dist/pages/SM-8.7/UtlitiesPage.js +3 -1
- package/dist/tests/8.7/connectors-user-flows.spec.js +1 -1
- package/dist/tests/8.7/play.spec.js +2 -1
- package/dist/tests/8.7/web-modeler-user-flows.spec.js +1 -0
- package/dist/utils/mailSlurpClient.js +15 -2
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ const test_1 = require("@playwright/test");
|
|
|
5
5
|
const sleep_1 = require("../../utils/sleep");
|
|
6
6
|
const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
|
|
7
7
|
const ClientCredentialsDetailsPage_1 = require("../8.7/ClientCredentialsDetailsPage");
|
|
8
|
+
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
8
9
|
class ClusterDetailsPage {
|
|
9
10
|
page;
|
|
10
11
|
apiTab;
|
|
@@ -349,8 +350,13 @@ class ClusterDetailsPage {
|
|
|
349
350
|
}
|
|
350
351
|
async assertComponentsHealth(components = ['Zeebe', 'Tasklist', 'Operate', 'Optimize']) {
|
|
351
352
|
for (const component of components) {
|
|
352
|
-
await (0,
|
|
353
|
-
|
|
353
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.page.getByText(`${component}Healthy`, { exact: true }), {
|
|
354
|
+
visibilityTimeout: 60000,
|
|
355
|
+
totalTimeout: 400000,
|
|
356
|
+
maxRetries: 7,
|
|
357
|
+
preAction: async () => {
|
|
358
|
+
await this.page.reload();
|
|
359
|
+
},
|
|
354
360
|
});
|
|
355
361
|
}
|
|
356
362
|
}
|
|
@@ -46,7 +46,7 @@ declare class ClusterPage {
|
|
|
46
46
|
clickClustersBreadcrumb(clusterName: string): Promise<void>;
|
|
47
47
|
clickClusterLink(name: string): Promise<void>;
|
|
48
48
|
clickConnectorSecretesTab(clusterName: string): Promise<void>;
|
|
49
|
-
clickClusterOption(): Promise<void>;
|
|
49
|
+
clickClusterOption(version: string): Promise<void>;
|
|
50
50
|
createClusterIfNotExists(clusterName: string, region?: string): Promise<void>;
|
|
51
51
|
assertClusterHealthyStatusWithRetry(name: string, visibilityTimeout?: number, totalTimeout?: number): Promise<void>;
|
|
52
52
|
clickAlphaTab(): Promise<void>;
|
|
@@ -5,6 +5,7 @@ const test_1 = require("@playwright/test");
|
|
|
5
5
|
const sleep_1 = require("../../utils/sleep");
|
|
6
6
|
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
7
7
|
const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
|
|
8
|
+
const clusterVersions_1 = require("../../utils/clusterVersions");
|
|
8
9
|
class ClusterPage {
|
|
9
10
|
page;
|
|
10
11
|
defaultClusterType = 'G3-Dev';
|
|
@@ -175,7 +176,7 @@ class ClusterPage {
|
|
|
175
176
|
await this.clickClusterType();
|
|
176
177
|
await this.page.getByRole('tab', { name: region }).click();
|
|
177
178
|
await this.selectSubRegion(region);
|
|
178
|
-
await this.clickClusterOption();
|
|
179
|
+
await this.clickClusterOption(process.env.CLUSTER_VERSION);
|
|
179
180
|
await this.clickCreateClusterButton();
|
|
180
181
|
await this.logClusterCreationInfo(name);
|
|
181
182
|
await this.clickClustersBreadcrumb(name);
|
|
@@ -256,21 +257,39 @@ class ClusterPage {
|
|
|
256
257
|
},
|
|
257
258
|
});
|
|
258
259
|
}
|
|
259
|
-
async clickClusterOption() {
|
|
260
|
+
async clickClusterOption(version) {
|
|
260
261
|
const tabs = [
|
|
261
262
|
this.clickDevTab,
|
|
262
263
|
this.clickQAGenerationsTab,
|
|
263
264
|
this.clickStableTab,
|
|
264
265
|
this.clickAlphaTab,
|
|
265
266
|
];
|
|
266
|
-
|
|
267
|
+
const maxRetries = 3;
|
|
268
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
267
269
|
try {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
270
|
+
if (version === clusterVersions_1.ClusterVersion.EIGHT_SEVEN_SNAPSHOT) {
|
|
271
|
+
await this.clickDevTab();
|
|
272
|
+
await this.clusterVersionOption.scrollIntoViewIfNeeded();
|
|
273
|
+
await (0, test_1.expect)(this.clusterVersionOption).toBeVisible({ timeout: 60000 });
|
|
274
|
+
await this.clusterVersionOption.click({ timeout: 60000 });
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
for (const clickTab of tabs) {
|
|
279
|
+
try {
|
|
280
|
+
await clickTab.call(this);
|
|
281
|
+
await this.clusterVersionOption.click({ timeout: 30000 });
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
catch (error) {
|
|
285
|
+
console.log('Version option not found in this tab, trying next tab if available...');
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
271
289
|
}
|
|
272
290
|
catch (error) {
|
|
273
|
-
|
|
291
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
292
|
+
console.error('Error clicking tab or cluster version option: ' + errorMessage);
|
|
274
293
|
}
|
|
275
294
|
}
|
|
276
295
|
throw new Error('Failed to find cluster generation');
|
|
@@ -286,14 +305,14 @@ class ClusterPage {
|
|
|
286
305
|
await this.assertClusterHealthyStatusWithRetry(clusterName, 300000);
|
|
287
306
|
}
|
|
288
307
|
}
|
|
289
|
-
async assertClusterHealthyStatusWithRetry(name, visibilityTimeout = 100000, totalTimeout =
|
|
308
|
+
async assertClusterHealthyStatusWithRetry(name, visibilityTimeout = 100000, totalTimeout = 600000) {
|
|
290
309
|
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.clusterHealthiness(name), {
|
|
291
310
|
visibilityTimeout: visibilityTimeout,
|
|
292
311
|
totalTimeout: totalTimeout,
|
|
293
312
|
maxRetries: 5,
|
|
294
313
|
preAction: async () => {
|
|
295
314
|
await this.page.reload();
|
|
296
|
-
await (0, test_1.expect)(this.cluster(name)).toBeVisible({ timeout:
|
|
315
|
+
await (0, test_1.expect)(this.cluster(name)).toBeVisible({ timeout: 30000 });
|
|
297
316
|
},
|
|
298
317
|
});
|
|
299
318
|
console.log('Cluster is healthy:', name);
|
|
@@ -302,6 +321,7 @@ class ClusterPage {
|
|
|
302
321
|
await this.alphaTab.click();
|
|
303
322
|
}
|
|
304
323
|
async clickDevTab() {
|
|
324
|
+
await (0, test_1.expect)(this.devTab).toBeVisible({ timeout: 30000 });
|
|
305
325
|
await this.devTab.click();
|
|
306
326
|
}
|
|
307
327
|
async clickStableTab() {
|
|
@@ -125,6 +125,9 @@ class FormJsPage {
|
|
|
125
125
|
await this.selectCluster(clusterName);
|
|
126
126
|
await this.clickDeploySubButton();
|
|
127
127
|
await (0, test_1.expect)(this.deploySuccessNotification).toBeVisible({ timeout: 30000 });
|
|
128
|
+
await (0, test_1.expect)(this.deploySuccessNotification).not.toBeVisible({
|
|
129
|
+
timeout: 30000,
|
|
130
|
+
});
|
|
128
131
|
}
|
|
129
132
|
}
|
|
130
133
|
exports.FormJsPage = FormJsPage;
|
|
@@ -197,7 +197,8 @@ declare class ModelerCreatePage {
|
|
|
197
197
|
clickJobTypeInput(): Promise<void>;
|
|
198
198
|
fillJobTypeInput(name: string): Promise<void>;
|
|
199
199
|
switchToPlay(): Promise<void>;
|
|
200
|
-
completePlayConfiguration(): Promise<void>;
|
|
200
|
+
completePlayConfiguration(clusterName: string): Promise<void>;
|
|
201
|
+
selectCluster(clusterName: string): Promise<void>;
|
|
201
202
|
embedForm(formName: string): Promise<void>;
|
|
202
203
|
fillStartEventVariablesForDocHandling(zeebeUrl: string, zeebeClientId: string, zeebeClientSecret: string): Promise<void>;
|
|
203
204
|
fillZeebeClientId(clientId: string): Promise<void>;
|
|
@@ -314,6 +314,7 @@ class ModelerCreatePage {
|
|
|
314
314
|
await (0, test_1.expect)(this.generalPanel).toBeVisible({
|
|
315
315
|
timeout: 180000,
|
|
316
316
|
});
|
|
317
|
+
await (0, sleep_1.sleep)(1000);
|
|
317
318
|
await this.enterDiagramName(processName);
|
|
318
319
|
await (0, sleep_1.sleep)(10000);
|
|
319
320
|
if (processId.length > 0) {
|
|
@@ -980,7 +981,7 @@ class ModelerCreatePage {
|
|
|
980
981
|
async switchToPlay() {
|
|
981
982
|
await this.playTab.click();
|
|
982
983
|
}
|
|
983
|
-
async completePlayConfiguration() {
|
|
984
|
+
async completePlayConfiguration(clusterName) {
|
|
984
985
|
const timeout = 30000;
|
|
985
986
|
let attempts = 0;
|
|
986
987
|
const maxRetries = 2;
|
|
@@ -988,6 +989,7 @@ class ModelerCreatePage {
|
|
|
988
989
|
try {
|
|
989
990
|
if (attempts > 0)
|
|
990
991
|
await this.switchToPlay(); // Call switchToPlay on subsequent attempts
|
|
992
|
+
await this.selectCluster(clusterName);
|
|
991
993
|
await this.continueToPlayButton.click({ timeout });
|
|
992
994
|
await (0, test_1.expect)(this.page.getByText('Play environment is ready')).toBeVisible({ timeout: 90000 });
|
|
993
995
|
return; // Exit if successful
|
|
@@ -1000,6 +1002,21 @@ class ModelerCreatePage {
|
|
|
1000
1002
|
}
|
|
1001
1003
|
}
|
|
1002
1004
|
}
|
|
1005
|
+
async selectCluster(clusterName) {
|
|
1006
|
+
await (0, test_1.expect)(this.dialog).toBeVisible({ timeout: 30000 });
|
|
1007
|
+
const healthCheckTimeout = 30000;
|
|
1008
|
+
const healthyRegex = new RegExp(`${clusterName}.*?HealthydevManage`);
|
|
1009
|
+
const cluster = this.dialog.getByText(clusterName);
|
|
1010
|
+
await (0, test_1.expect)(cluster).toBeVisible({ timeout: 30000 });
|
|
1011
|
+
await cluster.click();
|
|
1012
|
+
await (0, test_1.expect)(this.dialog
|
|
1013
|
+
.locator('label')
|
|
1014
|
+
.filter({ hasText: clusterName })
|
|
1015
|
+
.getByRole('switch')).toBeChecked({ timeout: 30000 });
|
|
1016
|
+
await (0, test_1.expect)(this.dialog).toHaveText(healthyRegex, {
|
|
1017
|
+
timeout: healthCheckTimeout,
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1003
1020
|
async embedForm(formName) {
|
|
1004
1021
|
await this.clickEmbedFormButton();
|
|
1005
1022
|
await this.clickForm(formName);
|
|
@@ -203,7 +203,10 @@ class TaskDetailsPage {
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
async fillTextInput(value) {
|
|
206
|
+
await (0, test_1.expect)(this.textInput).toBeVisible({ timeout: 90000 });
|
|
207
|
+
await this.textInput.click();
|
|
206
208
|
await this.textInput.fill(value, { timeout: 90000 });
|
|
209
|
+
(0, test_1.expect)(await this.textInput.inputValue()).toBe(value);
|
|
207
210
|
}
|
|
208
211
|
async fillTextBox(text) {
|
|
209
212
|
await this.textBox.fill(text);
|
|
@@ -127,12 +127,14 @@ async function modelRestConnector(modelerCreatePage, connectorSettingsPage, conn
|
|
|
127
127
|
});
|
|
128
128
|
await connectorSettingsPage.clickResultVariableInput();
|
|
129
129
|
await connectorSettingsPage.fillResultVariableInput('result');
|
|
130
|
+
await (0, sleep_1.sleep)(5000);
|
|
130
131
|
}
|
|
131
132
|
await connectorSettingsPage.clickResultExpressionInput();
|
|
132
133
|
await connectorSettingsPage.fillResultExpressionInput(resultExpression);
|
|
134
|
+
await (0, sleep_1.sleep)(5000);
|
|
133
135
|
await modelerCreatePage.clickAppendElementButton();
|
|
134
136
|
await modelerCreatePage.clickAppendEndEventButton();
|
|
135
|
-
await (0, sleep_1.sleep)(
|
|
137
|
+
await (0, sleep_1.sleep)(10000); // trying to run the process to fast causes it to miss the process id
|
|
136
138
|
}
|
|
137
139
|
exports.modelRestConnector = modelRestConnector;
|
|
138
140
|
async function modelIntermediateWebhookConnector(modelerCreatePage, connectorMarketplacePage, processName, webhookId) {
|
|
@@ -324,7 +324,7 @@ _8_7_1.test.describe('Connectors User Flow Tests', () => {
|
|
|
324
324
|
timeout: 120000,
|
|
325
325
|
});
|
|
326
326
|
await modelerCreatePage.clickViewProcessInstanceLink();
|
|
327
|
-
const operateTab = await page.waitForEvent('popup');
|
|
327
|
+
const operateTab = await page.waitForEvent('popup', { timeout: 30000 });
|
|
328
328
|
const operateTabProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(operateTab);
|
|
329
329
|
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateTabProcessInstancePage, operateTabProcessInstancePage.completedIcon, 'Completed icon', 60000);
|
|
330
330
|
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateTab, operateTab.getByTestId('variables-list'), 'Variable list', 30000);
|
|
@@ -7,6 +7,7 @@ const sleep_1 = require("../../utils/sleep");
|
|
|
7
7
|
const UtilitiesPage_1 = require("../../pages/8.7/UtilitiesPage");
|
|
8
8
|
const users_1 = require("../../utils/users");
|
|
9
9
|
const testUser = (0, users_1.getTestUser)('twentyFourthUser');
|
|
10
|
+
const defaultClusterName = 'Test Cluster';
|
|
10
11
|
_8_7_1.test.describe.configure({ mode: 'parallel' });
|
|
11
12
|
_8_7_1.test.describe('Deploy and run a process in Play', () => {
|
|
12
13
|
_8_7_1.test.beforeEach(async ({ page, loginPage }, testInfo) => {
|
|
@@ -72,7 +73,7 @@ _8_7_1.test.describe('Deploy and run a process in Play', () => {
|
|
|
72
73
|
});
|
|
73
74
|
await _8_7_1.test.step('Open Play', async () => {
|
|
74
75
|
await modelerCreatePage.switchToPlay();
|
|
75
|
-
await modelerCreatePage.completePlayConfiguration();
|
|
76
|
+
await modelerCreatePage.completePlayConfiguration(defaultClusterName);
|
|
76
77
|
});
|
|
77
78
|
await _8_7_1.test.step('Start and complete the process instance in Play', async () => {
|
|
78
79
|
await playPage.dismissStartModal();
|
|
@@ -638,6 +638,7 @@ _8_7_1.test.describe('Web Modeler User Flow Tests', () => {
|
|
|
638
638
|
await (0, test_1.expect)(formJsPage.textFieldInForm).toBeVisible();
|
|
639
639
|
await (0, sleep_1.sleep)(5000);
|
|
640
640
|
await formJsPage.deployForm(clusterName);
|
|
641
|
+
await (0, sleep_1.sleep)(5000);
|
|
641
642
|
});
|
|
642
643
|
await _8_7_1.test.step('Add A BPMN Template To The Project', async () => {
|
|
643
644
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
@@ -17,7 +17,20 @@ async function createInbox(emailAddress, expriesIn = 1200000) {
|
|
|
17
17
|
}
|
|
18
18
|
exports.createInbox = createInbox;
|
|
19
19
|
async function deleteInbox(id) {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
try {
|
|
21
|
+
console.log(`Deleting inbox ${id}`);
|
|
22
|
+
await exports.mailSlurp.deleteInbox(id);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
if (error instanceof Error &&
|
|
26
|
+
(error.message.includes('404') ||
|
|
27
|
+
error.message.includes('does not exist'))) {
|
|
28
|
+
console.log('Failed to create inbox, could be a timing issue on MailSlurp side: ' +
|
|
29
|
+
String(error));
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
throw new Error('Failed to delete inbox: ' + String(error));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
22
35
|
}
|
|
23
36
|
exports.deleteInbox = deleteInbox;
|