@camunda/e2e-test-suite 0.0.298 → 0.0.300

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.
@@ -216,6 +216,8 @@ class ClusterSecretsPage {
216
216
  await (0, test_1.expect)(this.createNewSecretButton).toBeVisible({
217
217
  timeout: 60000,
218
218
  });
219
+ await this.page.reload();
220
+ await (0, sleep_1.sleep)(5000);
219
221
  }
220
222
  }
221
223
  exports.ClusterSecretsPage = ClusterSecretsPage;
@@ -225,53 +225,76 @@ class ConsoleOrganizationPage {
225
225
  await this.confirmButton.click({ timeout: 60000 });
226
226
  }
227
227
  async clickSettingsTab() {
228
- await this.settingsTab.click({ timeout: 120000 });
228
+ await this.settingsTab.click({ timeout: 30000 });
229
229
  try {
230
230
  await (0, test_1.expect)(this.page.getByRole('heading', { name: 'Alpha features' })).toBeVisible({
231
231
  timeout: 120000,
232
232
  });
233
233
  }
234
234
  catch (error) {
235
- await this.settingsTab.click({ timeout: 120000 });
235
+ await this.settingsTab.click({ timeout: 30000 });
236
236
  }
237
237
  }
238
238
  async clickOptInButton() {
239
239
  await this.optInButton.click({ timeout: 60000 });
240
240
  }
241
241
  async enableAlphaFeature(name) {
242
- await (0, test_1.expect)(this.rows.first()).toBeVisible({ timeout: 10000 });
243
- const alphaFeature = this.rows.filter({ hasText: name }).first();
244
- if ((await alphaFeature.count()) < 1) {
245
- console.error(`No alpha feature(${name}) is found.`);
246
- return;
247
- }
248
- //Opt-in The Alpha Feature
249
- const alphaFeatureOptInButton = alphaFeature.getByRole('button', {
250
- name: 'Opt in to enable',
251
- });
252
- if (await alphaFeatureOptInButton.isVisible({ timeout: 10000 })) {
253
- await alphaFeatureOptInButton.click({ timeout: 90000 });
254
- await this.optInAICheckbox.scrollIntoViewIfNeeded();
255
- await this.optInAICheckbox.check({ timeout: 90000 });
256
- await (0, sleep_1.sleep)(3000);
257
- }
258
- //Enable Alpha Feature
259
- const toggleText = await alphaFeature
260
- .locator('[class= "cds--toggle__text"]')
261
- .textContent();
262
- console.info(`Previous feature(${name}) setting is ${toggleText}.`);
263
- if (toggleText == 'Enabled') {
264
- console.log(`Feature ${name} is already enabled.`);
265
- return;
266
- }
267
- if (toggleText == 'Disabled') {
268
- await alphaFeature
269
- .locator('[class= "cds--toggle__switch"]')
270
- .first()
271
- .click();
272
- await (0, sleep_1.sleep)(10000);
242
+ const maxRetries = 3;
243
+ for (let retries = 0; retries < maxRetries; retries++) {
244
+ try {
245
+ await this.clickSettingsTab();
246
+ await this.optInToAlphaFeatures();
247
+ await (0, sleep_1.sleep)(30000);
248
+ await this.page.reload();
249
+ await this.clickSettingsTab();
250
+ await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.rows.first(), {
251
+ visibilityTimeout: 15000,
252
+ totalTimeout: 90000,
253
+ postAction: async () => {
254
+ await this.page.reload();
255
+ },
256
+ });
257
+ const alphaFeature = this.rows.filter({ hasText: name }).first();
258
+ if ((await alphaFeature.count()) < 1) {
259
+ console.error(`No alpha feature(${name}) is found.`);
260
+ return;
261
+ }
262
+ //Opt-in The Alpha Feature
263
+ const alphaFeatureOptInButton = alphaFeature.getByRole('button', {
264
+ name: 'Opt in to enable',
265
+ });
266
+ if (await alphaFeatureOptInButton.isVisible({ timeout: 10000 })) {
267
+ await alphaFeatureOptInButton.click({ timeout: 30000 });
268
+ await this.optInAICheckbox.scrollIntoViewIfNeeded();
269
+ await this.optInAICheckbox.check({ timeout: 30000 });
270
+ await (0, sleep_1.sleep)(3000);
271
+ }
272
+ //Enable Alpha Feature
273
+ const toggleText = await alphaFeature
274
+ .locator('[class= "cds--toggle__text"]')
275
+ .textContent();
276
+ console.info(`Previous feature(${name}) setting is ${toggleText}.`);
277
+ if (toggleText == 'Enabled') {
278
+ console.log(`Feature ${name} is already enabled.`);
279
+ return;
280
+ }
281
+ if (toggleText == 'Disabled') {
282
+ await alphaFeature
283
+ .locator('[class= "cds--toggle__switch"]')
284
+ .first()
285
+ .click();
286
+ await (0, sleep_1.sleep)(10000);
287
+ }
288
+ await (0, test_1.expect)(alphaFeature.locator('[class= "cds--toggle__text"]')).toHaveText('Enabled');
289
+ return;
290
+ }
291
+ catch (error) {
292
+ console.error(`Click attempt ${retries + 1} failed: ${error}`);
293
+ await this.page.reload();
294
+ await (0, sleep_1.sleep)(10000);
295
+ }
273
296
  }
274
- await (0, test_1.expect)(alphaFeature.locator('[class= "cds--toggle__text"]')).toHaveText('Enabled');
297
+ throw new Error(`Failed to eanble alpha feature ${name} after ${maxRetries} attempts.`);
275
298
  }
276
299
  async scrollToOptInCheckbox() {
277
300
  await this.page.locator('.ps-contract-scroll').evaluate((el) => {
@@ -178,6 +178,7 @@ async function modelIntermediateWebhookConnector(modelerCreatePage, connectorMar
178
178
  await modelerCreatePage.fillCorrelationKeyProcessInput('"test"');
179
179
  await modelerCreatePage.clickCorrelationKeyPayloadInput();
180
180
  await modelerCreatePage.fillCorrelationKeyPayloadInput('"test"');
181
+ await (0, sleep_1.sleep)(1000);
181
182
  await modelerCreatePage.clickAppendElementButton();
182
183
  await modelerCreatePage.clickAppendEndEventButton();
183
184
  await (0, sleep_1.sleep)(1000); // trying to run the process to fast causes it to miss the process id
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const test_1 = require("@playwright/test");
4
4
  const _8_10_1 = require("../../fixtures/8.10");
5
5
  const _setup_1 = require("../../test-setup.js");
6
- const sleep_1 = require("../../utils/sleep");
7
6
  const connectorSecrets_1 = require("../../utils/connectorSecrets");
8
7
  const UtilitiesPage_1 = require("../../pages/8.10/UtilitiesPage");
9
8
  const users_1 = require("../../utils/users");
@@ -20,11 +19,6 @@ _8_10_1.test.describe('Cluster Setup Tests', () => {
20
19
  await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, users_1.testUsers.mainUser, (testInfo.workerIndex + 1) * 1000);
21
20
  await homePage.clickOrganization();
22
21
  await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(page, consoleOrganizationsPage.settingsTab, 'settings tab', 60000, false, 2);
23
- await consoleOrganizationsPage.clickSettingsTab();
24
- await consoleOrganizationsPage.optInToAlphaFeatures();
25
- await (0, sleep_1.sleep)(30000);
26
- await page.reload();
27
- await consoleOrganizationsPage.clickSettingsTab();
28
22
  await consoleOrganizationsPage.enableAlphaFeature('AI-powered features');
29
23
  });
30
24
  (0, _8_10_1.test)('Create Default Cluster', async ({ page, loginPage, homePage, clusterPage, clusterDetailsPage, clusterSecretsPage, }, testInfo) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.298",
3
+ "version": "0.0.300",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",