@camunda/e2e-test-suite 0.0.245 → 0.0.247

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.
@@ -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, test_1.expect)(this.page.getByText(`${component}Healthy`, { exact: true })).toBeVisible({
353
- timeout: 15000,
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
- for (const clickTab of tabs) {
267
+ const maxRetries = 3;
268
+ for (let attempt = 0; attempt < maxRetries; attempt++) {
267
269
  try {
268
- await clickTab.call(this);
269
- await this.clusterVersionOption.click({ timeout: 60000 });
270
- return;
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
- console.error('Error clicking tab or cluster version option:', error);
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 = 420000) {
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: 10000 });
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);
@@ -46,7 +46,9 @@ const createIdentityUser = async (navigationPage, managementIdentity, username)
46
46
  await managementIdentity.clickUser(username);
47
47
  await managementIdentity.clickAssignedRolesTab();
48
48
  await managementIdentity.clickAssignRolesButton();
49
- await managementIdentity.clickOptimizeCheckbox();
49
+ if (process.env.IS_OPTIMIZE !== 'false') {
50
+ await managementIdentity.clickOptimizeCheckbox();
51
+ }
50
52
  await managementIdentity.clickModelerCheckbox();
51
53
  await managementIdentity.clickConsoleCheckbox();
52
54
  await managementIdentity.clickIdentityCheckbox();
@@ -46,7 +46,9 @@ const createIdentityUser = async (navigationPage, managementIdentity, username)
46
46
  await managementIdentity.clickUser(username);
47
47
  await managementIdentity.clickAssignedRolesTab();
48
48
  await managementIdentity.clickAssignRolesButton();
49
- await managementIdentity.clickOptimizeCheckbox();
49
+ if (process.env.IS_OPTIMIZE !== 'false') {
50
+ await managementIdentity.clickOptimizeCheckbox();
51
+ }
50
52
  await managementIdentity.clickModelerCheckbox();
51
53
  await managementIdentity.clickConsoleCheckbox();
52
54
  await managementIdentity.clickIdentityCheckbox();
@@ -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();
@@ -47,10 +47,12 @@ SM_8_8_1.test.describe('Identity User Flow Tests', () => {
47
47
  await managementIdentityPage.clickUser(testUser);
48
48
  await managementIdentityPage.clickAssignedRolesTab();
49
49
  });
50
- await SM_8_8_1.test.step('Remove Access from Optimize', async () => {
51
- await managementIdentityPage.clickDeleteAccessButton('Grants full access to Optimize');
52
- await managementIdentityPage.clickConfirmDeleteButton();
53
- });
50
+ if (node_process_1.default.env.IS_OPTIMIZE !== 'false') {
51
+ await SM_8_8_1.test.step('Remove Access from Optimize', async () => {
52
+ await managementIdentityPage.clickDeleteAccessButton('Grants full access to Optimize');
53
+ await managementIdentityPage.clickConfirmDeleteButton();
54
+ });
55
+ }
54
56
  await SM_8_8_1.test.step('Remove Access from Web Modeler', async () => {
55
57
  await managementIdentityPage.clickDeleteAccessButton('Grants full access to Web Modeler');
56
58
  await managementIdentityPage.clickConfirmDeleteButton();
@@ -78,33 +80,39 @@ SM_8_8_1.test.describe('Identity User Flow Tests', () => {
78
80
  timeout: 60000,
79
81
  });
80
82
  });
81
- await SM_8_8_1.test.step('Ensure Optimize is not Accessible', async () => {
82
- await navigationPage.goToOptimize(undefined, credentials);
83
- await (0, test_1.expect)(optimizeHomePage.optimizeBanner).not.toBeVisible({
84
- timeout: 60000,
85
- });
86
- await (0, test_1.expect)(page.getByText('User has no authorization to access Optimize. Please check your Identity configuration')).toBeVisible({
87
- timeout: 60000,
83
+ if (node_process_1.default.env.IS_OPTIMIZE !== 'false') {
84
+ await SM_8_8_1.test.step('Ensure Optimize is not Accessible', async () => {
85
+ await navigationPage.goToOptimize(undefined, credentials);
86
+ await (0, test_1.expect)(optimizeHomePage.optimizeBanner).not.toBeVisible({
87
+ timeout: 60000,
88
+ });
89
+ await (0, test_1.expect)(page.getByText('User has no authorization to access Optimize. Please check your Identity configuration')).toBeVisible({
90
+ timeout: 60000,
91
+ });
88
92
  });
89
- });
93
+ }
90
94
  await SM_8_8_1.test.step('Grant Optimize, Web Modeler and Console App Permission to Test User', async () => {
91
95
  await navigationPage.goToManagementIdentity();
92
96
  await managementIdentityPage.clickUsersLink();
93
97
  await managementIdentityPage.clickUser(testUser);
94
98
  await managementIdentityPage.clickAssignedRolesTab();
95
99
  await managementIdentityPage.clickAssignRolesButton();
96
- await managementIdentityPage.clickOptimizeCheckbox();
100
+ if (node_process_1.default.env.IS_OPTIMIZE !== 'false') {
101
+ await managementIdentityPage.clickOptimizeCheckbox();
102
+ }
97
103
  await managementIdentityPage.clickModelerCheckbox();
98
104
  await managementIdentityPage.clickConsoleCheckbox();
99
105
  await managementIdentityPage.clickAddButton();
100
106
  await (0, sleep_1.sleep)(60000);
101
107
  });
102
- await SM_8_8_1.test.step('Ensure Optimize is Accessible', async () => {
103
- await navigationPage.goToOptimize(undefined, credentials);
104
- await (0, test_1.expect)(optimizeHomePage.optimizeBanner).toBeVisible({
105
- timeout: 180000,
108
+ if (node_process_1.default.env.IS_OPTIMIZE !== 'false') {
109
+ await SM_8_8_1.test.step('Ensure Optimize is Accessible', async () => {
110
+ await navigationPage.goToOptimize(undefined, credentials);
111
+ await (0, test_1.expect)(optimizeHomePage.optimizeBanner).toBeVisible({
112
+ timeout: 180000,
113
+ });
106
114
  });
107
- });
115
+ }
108
116
  await SM_8_8_1.test.step('Ensure Modeler is Accessible', async () => {
109
117
  await navigationPage.goToModeler(undefined, credentials);
110
118
  await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({