@camunda/e2e-test-suite 0.0.832 → 0.0.834
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/ClusterPage.js +6 -1
- package/dist/pages/8.7/FormJsPage.js +1 -1
- package/dist/pages/8.7/ModelerCreatePage.js +20 -25
- package/dist/pages/8.7/ModelerHomePage.js +2 -2
- package/dist/tests/8.7/console-user-flows.spec.js +11 -0
- package/dist/tests/8.7/test-setup.spec.js +22 -7
- package/dist/utils/consoleApiHelpers.d.ts +1 -0
- package/dist/utils/consoleApiHelpers.js +23 -1
- package/package.json +1 -1
|
@@ -100,12 +100,17 @@ class ClusterPage {
|
|
|
100
100
|
this.clustersList = page
|
|
101
101
|
.getByRole('row')
|
|
102
102
|
.filter({ hasNotText: 'Generation' }); //Filter out header row
|
|
103
|
-
this.cluster = (clusterName) => this.clustersList
|
|
103
|
+
this.cluster = (clusterName) => this.clustersList
|
|
104
|
+
.filter({
|
|
105
|
+
has: page.getByRole('link', { name: clusterName, exact: true }),
|
|
106
|
+
})
|
|
107
|
+
.first();
|
|
104
108
|
this.clusterHealthiness = (clusterName) => this.cluster(clusterName).getByText(`Healthy`, {
|
|
105
109
|
exact: true,
|
|
106
110
|
});
|
|
107
111
|
this.clusterLink = (clusterName) => this.cluster(clusterName).getByRole('link', {
|
|
108
112
|
name: clusterName,
|
|
113
|
+
exact: true,
|
|
109
114
|
});
|
|
110
115
|
}
|
|
111
116
|
async clickClusterBanner() {
|
|
@@ -105,7 +105,7 @@ class FormJsPage {
|
|
|
105
105
|
await cluster.click();
|
|
106
106
|
await (0, test_1.expect)(this.dialog
|
|
107
107
|
.locator('label')
|
|
108
|
-
.filter({ hasText: clusterName })
|
|
108
|
+
.filter({ hasText: new RegExp(`^${clusterName}`) })
|
|
109
109
|
.getByRole('switch')).toBeChecked({ timeout: 30000 });
|
|
110
110
|
await (0, test_1.expect)(this.dialog).toHaveText(healthyRegex, {
|
|
111
111
|
timeout: healthCheckTimeout,
|
|
@@ -446,17 +446,14 @@ class ModelerCreatePage {
|
|
|
446
446
|
timeout: 30000,
|
|
447
447
|
});
|
|
448
448
|
//Select the correct cluster if multiple exist
|
|
449
|
-
const
|
|
450
|
-
|
|
449
|
+
const clusterLabel = this.deployDiagramDialog
|
|
450
|
+
.locator('label')
|
|
451
|
+
.filter({ hasText: new RegExp(`^${clusterName}`) });
|
|
452
|
+
await (0, test_1.expect)(clusterLabel).toBeVisible({ timeout: 30000 });
|
|
453
|
+
await clusterLabel.click();
|
|
454
|
+
await (0, test_1.expect)(clusterLabel.getByRole('switch')).toBeChecked({
|
|
451
455
|
timeout: 30000,
|
|
452
456
|
});
|
|
453
|
-
await cluster.click();
|
|
454
|
-
await (0, test_1.expect)(this.deployDiagramDialog
|
|
455
|
-
.locator('label')
|
|
456
|
-
.filter({
|
|
457
|
-
hasText: clusterName,
|
|
458
|
-
})
|
|
459
|
-
.getByRole('switch')).toBeChecked({ timeout: 30000 });
|
|
460
457
|
//Check healthy status of the selected cluster
|
|
461
458
|
const regex = new RegExp(`${clusterName}.*?HealthydevManage`);
|
|
462
459
|
await (0, test_1.expect)(this.deployDiagramDialog).toHaveText(regex, {
|
|
@@ -498,17 +495,14 @@ class ModelerCreatePage {
|
|
|
498
495
|
timeout: 30000,
|
|
499
496
|
});
|
|
500
497
|
//Select the correct cluster if multiple exist
|
|
501
|
-
const
|
|
502
|
-
|
|
498
|
+
const clusterLabel = this.dialog
|
|
499
|
+
.locator('label')
|
|
500
|
+
.filter({ hasText: new RegExp(`^${clusterName}`) });
|
|
501
|
+
await (0, test_1.expect)(clusterLabel).toBeVisible({ timeout: 30000 });
|
|
502
|
+
await clusterLabel.click();
|
|
503
|
+
await (0, test_1.expect)(clusterLabel.getByRole('switch')).toBeChecked({
|
|
503
504
|
timeout: 30000,
|
|
504
505
|
});
|
|
505
|
-
await cluster.click();
|
|
506
|
-
await (0, test_1.expect)(this.dialog
|
|
507
|
-
.locator('label')
|
|
508
|
-
.filter({
|
|
509
|
-
hasText: clusterName,
|
|
510
|
-
})
|
|
511
|
-
.getByRole('switch')).toBeChecked({ timeout: 30000 });
|
|
512
506
|
//Check healthy status of the selected cluster
|
|
513
507
|
const regex = new RegExp(`${clusterName}.*?HealthydevManage`);
|
|
514
508
|
await (0, test_1.expect)(this.dialog).toHaveText(regex, {
|
|
@@ -1068,7 +1062,7 @@ class ModelerCreatePage {
|
|
|
1068
1062
|
// before saving. This handles environments with multiple clusters.
|
|
1069
1063
|
const clusterLabel = configureEnvDialog
|
|
1070
1064
|
.locator('label')
|
|
1071
|
-
.filter({ hasText: clusterName });
|
|
1065
|
+
.filter({ hasText: new RegExp(`^${clusterName}`) });
|
|
1072
1066
|
const clusterSwitch = clusterLabel.getByRole('switch');
|
|
1073
1067
|
await (0, test_1.expect)(clusterLabel).toBeVisible({ timeout });
|
|
1074
1068
|
const alreadyChecked = (await clusterSwitch.getAttribute('aria-checked')) === 'true';
|
|
@@ -1118,13 +1112,14 @@ class ModelerCreatePage {
|
|
|
1118
1112
|
await (0, test_1.expect)(this.dialog).toBeVisible({ timeout: 30000 });
|
|
1119
1113
|
const healthCheckTimeout = 30000;
|
|
1120
1114
|
const healthyRegex = new RegExp(`${clusterName}.*?HealthydevManage`);
|
|
1121
|
-
const
|
|
1122
|
-
await (0, test_1.expect)(cluster).toBeVisible({ timeout: 30000 });
|
|
1123
|
-
await cluster.click();
|
|
1124
|
-
await (0, test_1.expect)(this.dialog
|
|
1115
|
+
const clusterLabel = this.dialog
|
|
1125
1116
|
.locator('label')
|
|
1126
|
-
.filter({ hasText: clusterName })
|
|
1127
|
-
|
|
1117
|
+
.filter({ hasText: new RegExp(`^${clusterName}`) });
|
|
1118
|
+
await (0, test_1.expect)(clusterLabel).toBeVisible({ timeout: 30000 });
|
|
1119
|
+
await clusterLabel.click();
|
|
1120
|
+
await (0, test_1.expect)(clusterLabel.getByRole('switch')).toBeChecked({
|
|
1121
|
+
timeout: 30000,
|
|
1122
|
+
});
|
|
1128
1123
|
await (0, test_1.expect)(this.dialog).toHaveText(healthyRegex, {
|
|
1129
1124
|
timeout: healthCheckTimeout,
|
|
1130
1125
|
});
|
|
@@ -109,7 +109,7 @@ class ModelerHomePage {
|
|
|
109
109
|
}
|
|
110
110
|
async selectCluster(clusterName) {
|
|
111
111
|
//Select the correct cluster if multiple exist
|
|
112
|
-
const cluster = this.dialog.getByText(clusterName);
|
|
112
|
+
const cluster = this.dialog.getByText(new RegExp(`^${clusterName}`));
|
|
113
113
|
await (0, test_1.expect)(cluster).toBeVisible({
|
|
114
114
|
timeout: 30000,
|
|
115
115
|
});
|
|
@@ -117,7 +117,7 @@ class ModelerHomePage {
|
|
|
117
117
|
await (0, test_1.expect)(this.dialog
|
|
118
118
|
.locator('label')
|
|
119
119
|
.filter({
|
|
120
|
-
hasText: clusterName,
|
|
120
|
+
hasText: new RegExp(`^${clusterName}`),
|
|
121
121
|
})
|
|
122
122
|
.getByRole('switch')).toBeChecked({ timeout: 30000 });
|
|
123
123
|
//Check healthy status of the selected cluster
|
|
@@ -22,6 +22,17 @@ _8_7_1.test.describe('Console User Flow Tests', () => {
|
|
|
22
22
|
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
23
23
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
24
24
|
});
|
|
25
|
+
(0, _8_7_1.test)('Create Cluster', async ({ homePage, clusterPage }) => {
|
|
26
|
+
_8_7_1.test.slow();
|
|
27
|
+
const newClusterName = 'UI Test Cluster';
|
|
28
|
+
await _8_7_1.test.step('Navigate to clusters and create cluster', async () => {
|
|
29
|
+
await homePage.clickClusters();
|
|
30
|
+
await clusterPage.createCluster(newClusterName);
|
|
31
|
+
});
|
|
32
|
+
await _8_7_1.test.step('Assert cluster is healthy', async () => {
|
|
33
|
+
await clusterPage.assertClusterHealthyStatusWithRetry(newClusterName, 300000, 1500000);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
25
36
|
//Waiting infra team to provide DNS configuration for email testing, skipping for now
|
|
26
37
|
_8_7_1.test.skip('Alert Trigger Flow - Email Notification', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, clusterPage, clusterDetailsPage, connectorSettingsPage, }) => {
|
|
27
38
|
_8_7_1.test.slow();
|
|
@@ -5,6 +5,7 @@ const _8_7_1 = require("../../fixtures/8.7");
|
|
|
5
5
|
const _setup_1 = require("../../test-setup.js");
|
|
6
6
|
const UtilitiesPage_1 = require("../../pages/8.7/UtilitiesPage");
|
|
7
7
|
const users_1 = require("../../utils/users");
|
|
8
|
+
const consoleApiHelpers_1 = require("../../utils/consoleApiHelpers");
|
|
8
9
|
_8_7_1.test.describe.configure({ mode: 'parallel' });
|
|
9
10
|
_8_7_1.test.describe('Cluster Setup Tests', () => {
|
|
10
11
|
_8_7_1.test.afterEach(async ({ page }, testInfo) => {
|
|
@@ -23,9 +24,16 @@ _8_7_1.test.describe('Cluster Setup Tests', () => {
|
|
|
23
24
|
_8_7_1.test.slow();
|
|
24
25
|
const clusterName = 'Test Cluster';
|
|
25
26
|
await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, users_1.testUsers.mainUser, (testInfo.workerIndex + 1) * 1000);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
if (process.env.IS_PROD === 'true') {
|
|
28
|
+
await clusterPage.createCluster(clusterName);
|
|
29
|
+
await clusterPage.assertClusterHealthyStatusWithRetry(clusterName);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
await (0, consoleApiHelpers_1.deleteClusterViaApi)(page, clusterName);
|
|
33
|
+
const clusterUuid = await (0, consoleApiHelpers_1.createClusterViaApi)(page, clusterName);
|
|
34
|
+
await (0, consoleApiHelpers_1.waitForClusterHealthyViaApi)(page, clusterUuid);
|
|
35
|
+
await homePage.clickClusters();
|
|
36
|
+
}
|
|
29
37
|
await clusterPage.clickClusterLink(clusterName);
|
|
30
38
|
await clusterDetailsPage.assertComponentsHealth();
|
|
31
39
|
});
|
|
@@ -34,10 +42,17 @@ _8_7_1.test.describe('Cluster Setup Tests', () => {
|
|
|
34
42
|
_8_7_1.test.slow();
|
|
35
43
|
const clusterName = 'AWS Cluster';
|
|
36
44
|
await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, users_1.testUsers.mainUser, (testInfo.workerIndex + 1) * 1000);
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
if (process.env.IS_PROD === 'true') {
|
|
46
|
+
await clusterPage.createCluster(clusterName, 'AWS');
|
|
47
|
+
// AWS clusters on SaaS INT routinely need 10+ min to reach Healthy.
|
|
48
|
+
await clusterPage.assertClusterHealthyStatusWithRetry(clusterName, 300000, 1500000);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
await (0, consoleApiHelpers_1.deleteClusterViaApi)(page, clusterName);
|
|
52
|
+
const clusterUuid = await (0, consoleApiHelpers_1.createClusterViaApi)(page, clusterName, 'AWS');
|
|
53
|
+
await (0, consoleApiHelpers_1.waitForClusterHealthyViaApi)(page, clusterUuid, 1500000);
|
|
54
|
+
await homePage.clickClusters();
|
|
55
|
+
}
|
|
41
56
|
await clusterPage.clickClusterLink(clusterName);
|
|
42
57
|
await clusterDetailsPage.assertComponentsHealth();
|
|
43
58
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Page } from '@playwright/test';
|
|
2
2
|
export declare function deleteClusterViaApi(page: Page, clusterName: string): Promise<void>;
|
|
3
3
|
export declare function createClusterViaApi(page: Page, clusterName: string, region?: string): Promise<string>;
|
|
4
|
+
export declare function ensureClusterViaApi(page: Page, clusterName: string, region?: string): Promise<string>;
|
|
4
5
|
export declare function waitForClusterHealthyViaApi(page: Page, clusterUuid: string, timeoutMs?: number): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.waitForClusterHealthyViaApi = exports.createClusterViaApi = exports.deleteClusterViaApi = void 0;
|
|
3
|
+
exports.waitForClusterHealthyViaApi = exports.ensureClusterViaApi = exports.createClusterViaApi = exports.deleteClusterViaApi = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const sleep_1 = require("./sleep");
|
|
6
6
|
const PLAN_TYPE_ID = '574cde5f-54ae-43c1-851a-e6fb4f03423a';
|
|
@@ -125,6 +125,28 @@ async function createClusterViaApi(page, clusterName, region = 'GCP') {
|
|
|
125
125
|
return clusterId;
|
|
126
126
|
}
|
|
127
127
|
exports.createClusterViaApi = createClusterViaApi;
|
|
128
|
+
async function ensureClusterViaApi(page, clusterName, region = 'GCP') {
|
|
129
|
+
// Versions with more than one Tasklist-mode Playwright project (e.g. 8.8,
|
|
130
|
+
// 8.9's chromium-v1/chromium-v2) run test-setup.spec.ts once per project,
|
|
131
|
+
// concurrently, against the same org -- and both target a cluster with
|
|
132
|
+
// this same name. Deleting-then-recreating unconditionally here would race
|
|
133
|
+
// with the sibling project's setup: whichever one runs its delete second
|
|
134
|
+
// rips out the cluster the other project already started using, silently
|
|
135
|
+
// orphaning any process instances/jobs created on it in the meantime.
|
|
136
|
+
//
|
|
137
|
+
// Each PR/nightly run gets a brand-new, empty org (see the
|
|
138
|
+
// create-organization/delete-organization jobs), so within a single run a
|
|
139
|
+
// cluster with this name can only mean one thing: the sibling project's
|
|
140
|
+
// setup already created it. Adopt it instead of destroying it -- whichever
|
|
141
|
+
// project's setup gets here first "wins" and creates it, the other one
|
|
142
|
+
// just reuses it.
|
|
143
|
+
const existing = await findClusterByName(page, clusterName);
|
|
144
|
+
if (existing) {
|
|
145
|
+
return existing.uuid;
|
|
146
|
+
}
|
|
147
|
+
return createClusterViaApi(page, clusterName, region);
|
|
148
|
+
}
|
|
149
|
+
exports.ensureClusterViaApi = ensureClusterViaApi;
|
|
128
150
|
async function waitForClusterHealthyViaApi(page, clusterUuid, timeoutMs = 1500000) {
|
|
129
151
|
const orgId = getOrgId();
|
|
130
152
|
const url = `${getConsoleBaseUrl()}/api/orgs/${orgId}/clusters/${clusterUuid}`;
|