@camunda/e2e-test-suite 0.0.833 → 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.
@@ -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.filter({ hasText: clusterName }).first();
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 cluster = this.deployDiagramDialog.getByText(clusterName);
450
- await (0, test_1.expect)(cluster).toBeVisible({
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 cluster = this.dialog.getByText(clusterName);
502
- await (0, test_1.expect)(cluster).toBeVisible({
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 cluster = this.dialog.getByText(clusterName);
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
- .getByRole('switch')).toBeChecked({ timeout: 30000 });
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
- await homePage.clickClusters();
27
- await clusterPage.createCluster(clusterName);
28
- await clusterPage.assertClusterHealthyStatusWithRetry(clusterName);
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
- await homePage.clickClusters();
38
- await clusterPage.createCluster(clusterName, 'AWS');
39
- // AWS clusters on SaaS INT routinely need 10+ min to reach Healthy.
40
- await clusterPage.assertClusterHealthyStatusWithRetry(clusterName, 300000, 1500000);
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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.833",
3
+ "version": "0.0.834",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",