@camunda/e2e-test-suite 0.0.298 → 0.0.299
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:
|
|
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:
|
|
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
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
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
|
-
|
|
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) => {
|
|
@@ -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) => {
|