@camunda/e2e-test-suite 0.0.4 → 0.0.6

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.
@@ -109,7 +109,7 @@ class IdentityPage {
109
109
  name: 'create group',
110
110
  });
111
111
  this.authorizationsTab = page.getByRole('tab', { name: 'Authorizations' });
112
- this.tenantTab = page.locator('a').filter({ hasText: 'Tenants' });
112
+ this.tenantTab = page.getByRole('banner').locator('a').filter({ hasText: 'Tenants' });
113
113
  this.licenseKeyTagNonProduction = page
114
114
  .getByText('Non-production license')
115
115
  .first();
@@ -103,7 +103,7 @@ class IdentityTenantPage {
103
103
  async createTenant(tenantName) {
104
104
  await (0, sleep_1.sleep)(1000); // Need to pause for the table to render
105
105
  const tenant = this.rows.filter({ hasText: tenantName }).first();
106
- if (await tenant.isVisible({ timeout: 1000 })) {
106
+ if (await tenant.isVisible({ timeout: 3000 })) {
107
107
  await this.deleteTenant(tenantName, tenant);
108
108
  }
109
109
  await this.clickCreateTenantMainButton();
@@ -115,7 +115,6 @@ class IdentityTenantPage {
115
115
  await (0, test_1.expect)(this.page.getByText('Tenant created')).toBeVisible({
116
116
  timeout: 60000,
117
117
  });
118
- await (0, sleep_1.sleep)(5000); // Creating a tenant takes a while, so we wait for 5 seconds
119
118
  }
120
119
  async deleteTenant(tenantName, tenant) {
121
120
  console.log(`Tenant ${tenantName} already exists, deleting.`);
@@ -134,7 +133,9 @@ class IdentityTenantPage {
134
133
  }
135
134
  }
136
135
  async assignUserToTenant(tenantName, user, userEmail) {
137
- await this.page.getByText(tenantName).first().click();
136
+ const tenant = this.rows.filter({ hasText: tenantName }).first();
137
+ await (0, test_1.expect)(tenant).toBeVisible();
138
+ await tenant.click();
138
139
  await this.clickAssignedUsersTab();
139
140
  await this.clickAssignUsersButton();
140
141
  await this.clickSearchUsersInput();
@@ -146,7 +147,9 @@ class IdentityTenantPage {
146
147
  });
147
148
  }
148
149
  async removeUserFromTenant(tenantName) {
149
- await this.page.getByText(tenantName).first().click();
150
+ const tenant = this.rows.filter({ hasText: tenantName }).first();
151
+ await (0, test_1.expect)(tenant).toBeVisible();
152
+ await tenant.click();
150
153
  await this.clickAssignedUsersTab();
151
154
  await this.clickRemoveUserButton();
152
155
  await this.clickRemoveButton();
@@ -174,14 +177,13 @@ class IdentityTenantPage {
174
177
  await (0, test_1.expect)(this.page.getByText('Applications assigned')).toBeVisible({
175
178
  timeout: 60000,
176
179
  });
177
- await (0, sleep_1.sleep)(1000); // Need to pause to allow identity to update
178
180
  }
179
181
  }
180
182
  async clickAssignedApplicationsTab() {
181
- await this.assignedApplicationsTab.click({ timeout: 60000 });
183
+ await this.assignedApplicationsTab.click();
182
184
  }
183
185
  async clickSearchApplicationsInput() {
184
- await this.searchApplicationsInput.click({ timeout: 60000 });
186
+ await this.searchApplicationsInput.click();
185
187
  }
186
188
  async fillSearchApplicationsInput(clientName) {
187
189
  await this.searchApplicationsInput.fill(clientName);
@@ -17,5 +17,6 @@ declare class OperateProcessInstancePage {
17
17
  activeUserTaskIconVisibleAssertion(taskName: string): Promise<void>;
18
18
  activeUserTaskIconNotVisibleAssertion(taskName: string): Promise<void>;
19
19
  tenantNameAssertion(name: string): Promise<void>;
20
+ assertTextVisible(text: string): Promise<void>;
20
21
  }
21
22
  export { OperateProcessInstancePage };
@@ -125,5 +125,15 @@ class OperateProcessInstancePage {
125
125
  async tenantNameAssertion(name) {
126
126
  await (0, test_1.expect)(this.page.getByRole('cell', { name: name, exact: true })).toBeVisible({ timeout: 60000 });
127
127
  }
128
+ async assertTextVisible(text) {
129
+ await (0, sleep_1.sleep)(2000); // moving too fast here means the text is not displayed.. clicking the row would fix this but there is no testId on the row so that would be flaky
130
+ await this.page.reload();
131
+ await (0, test_1.expect)(this.page.getByTestId('variables-list')).toBeVisible({
132
+ timeout: 30000,
133
+ });
134
+ await (0, test_1.expect)(this.page.getByText(text)).toBeVisible({
135
+ timeout: 60000,
136
+ });
137
+ }
128
138
  }
129
139
  exports.OperateProcessInstancePage = OperateProcessInstancePage;
@@ -173,6 +173,7 @@ SM_8_7_1.test.describe.parallel('Connectors User Flow Tests', () => {
173
173
  await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
174
174
  const result = await operateProcessInstancePage.assertEitherIncidentOrCompletedIconVisible();
175
175
  (0, test_1.expect)(result).toBe('completed');
176
+ await (0, sleep_1.sleep)(1000); // moving too fast here means the text is not displayed.. clicking the row would fix this but there is no testId on the row so that would be flaky
176
177
  await page.reload();
177
178
  await (0, test_1.expect)(page.getByTestId('variables-list')).toBeVisible({
178
179
  timeout: 90000,
@@ -7,7 +7,7 @@ const sleep_1 = require("../../utils/sleep");
7
7
  const UtlitiesPage_1 = require("../../pages/SM-8.7/UtlitiesPage");
8
8
  const keycloak_1 = require("../../utils/keycloak");
9
9
  if (process.env.IS_MT === 'true') {
10
- SM_8_7_1.test.describe.configure({ mode: 'parallel' });
10
+ SM_8_7_1.test.describe.configure({ mode: 'serial' });
11
11
  SM_8_7_1.test.describe('MT Enabled User Flows Test', () => {
12
12
  SM_8_7_1.test.beforeEach(async ({ navigationPage, identityPage, keycloakLoginPage, keycloakAdminPage, context, identityTenantPage, }) => {
13
13
  await context.clearCookies();
@@ -15,9 +15,11 @@ if (process.env.IS_MT === 'true') {
15
15
  const user2 = 'bart' + (await (0, _setup_1.generateRandomStringAsync)(3)).toLowerCase();
16
16
  navigationPage.user1 = user1;
17
17
  navigationPage.user2 = user2;
18
- await (0, keycloak_1.createUser)(navigationPage, identityPage, keycloakLoginPage, keycloakAdminPage, user1, 'lisa', identityTenantPage);
18
+ navigationPage.user1password = 'test-password';
19
+ navigationPage.user2password = 'test-password';
20
+ await (0, keycloak_1.createUser)(navigationPage, identityPage, keycloakLoginPage, keycloakAdminPage, navigationPage.user1, navigationPage.user1password, identityTenantPage);
19
21
  await context.clearCookies();
20
- await (0, keycloak_1.createUser)(navigationPage, identityPage, keycloakLoginPage, keycloakAdminPage, user2, 'bart', identityTenantPage);
22
+ await (0, keycloak_1.createUser)(navigationPage, identityPage, keycloakLoginPage, keycloakAdminPage, navigationPage.user2, navigationPage.user2password, identityTenantPage);
21
23
  await context.clearCookies();
22
24
  await (0, keycloak_1.setupKeycloakUser)(navigationPage, identityPage, keycloakLoginPage, keycloakAdminPage, identityTenantPage);
23
25
  });
@@ -83,10 +85,9 @@ if (process.env.IS_MT === 'true') {
83
85
  await SM_8_7_1.test.step('Logout and Login with "bart" User', async () => {
84
86
  await optimizeHomePage.clickOpenUserSettingsButton();
85
87
  await optimizeHomePage.clickLogoutButton();
86
- await loginPage.login(navigationPage.user1, 'test-password');
88
+ await loginPage.login(navigationPage.user1, navigationPage.user1password);
87
89
  });
88
90
  await SM_8_7_1.test.step('Open Cross Component Test Project', async () => {
89
- await context.clearCookies();
90
91
  await navigationPage.goToModeler();
91
92
  await modelerHomePage.clickCreateNewProjectButton();
92
93
  await modelerHomePage.createCrossComponentProjectFolder();
@@ -142,7 +143,6 @@ if (process.env.IS_MT === 'true') {
142
143
  await identityTenantPage.assignClientToTenant('Operate');
143
144
  });
144
145
  await SM_8_7_1.test.step('Open Cross Component Test Project', async () => {
145
- await context.clearCookies();
146
146
  await navigationPage.goToModeler();
147
147
  await modelerHomePage.clickCreateNewProjectButton();
148
148
  await modelerHomePage.createCrossComponentProjectFolder();
@@ -163,12 +163,7 @@ if (process.env.IS_MT === 'true') {
163
163
  await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
164
164
  const result = await operateProcessInstancePage.assertEitherIncidentOrCompletedIconVisible();
165
165
  (0, test_1.expect)(result).toBe('completed');
166
- await (0, test_1.expect)(page.getByTestId('variables-list')).toBeVisible({
167
- timeout: 30000,
168
- });
169
- await (0, test_1.expect)(page.getByText('"Awesome!"')).toBeVisible({
170
- timeout: 60000,
171
- });
166
+ await operateProcessInstancePage.assertTextVisible('"Awesome!"');
172
167
  await operateProcessInstancePage.tenantNameAssertion(tenantName);
173
168
  });
174
169
  await SM_8_7_1.test.step('Assert Process has been successfully imported in Optimize', async () => {
@@ -193,10 +188,9 @@ if (process.env.IS_MT === 'true') {
193
188
  await SM_8_7_1.test.step('Logout and Login with "lisa" User', async () => {
194
189
  await identityTenantPage.clickOpenSidebarButton();
195
190
  await identityTenantPage.clickLogoutButton();
196
- await loginPage.login(navigationPage.user2, 'test-password');
191
+ await loginPage.login(navigationPage.user2, navigationPage.user2password);
197
192
  });
198
193
  await SM_8_7_1.test.step('Open Cross Component Test Project', async () => {
199
- await context.clearCookies();
200
194
  await navigationPage.goToModeler();
201
195
  await modelerHomePage.clickCreateNewProjectButton();
202
196
  await modelerHomePage.createCrossComponentProjectFolder();
@@ -232,7 +226,6 @@ if (process.env.IS_MT === 'true') {
232
226
  await SM_8_7_1.test.step('Assert Process has been successfully imported in Optimize', async () => {
233
227
  await navigationPage.goToOptimize();
234
228
  await optimizeHomePage.clickDashboardLink();
235
- await (0, sleep_1.sleep)(60000);
236
229
  await optimizeDashboardPage.processAssertion(processName, {
237
230
  timeout: 300000,
238
231
  });
@@ -253,10 +246,9 @@ if (process.env.IS_MT === 'true') {
253
246
  await SM_8_7_1.test.step('Logout and Login with "lisa" User', async () => {
254
247
  await identityTenantPage.clickOpenSidebarButton();
255
248
  await identityTenantPage.clickLogoutButton();
256
- await loginPage.login(navigationPage.user2, 'test-password');
249
+ await loginPage.login(navigationPage.user2, navigationPage.user2password);
257
250
  });
258
251
  await SM_8_7_1.test.step('Open Cross Component Test Project', async () => {
259
- await context.clearCookies();
260
252
  await navigationPage.goToModeler();
261
253
  await modelerHomePage.clickCreateNewProjectButton();
262
254
  await modelerHomePage.createCrossComponentProjectFolder();
@@ -273,14 +265,9 @@ if (process.env.IS_MT === 'true') {
273
265
  await SM_8_7_1.test.step('View Process Instance in Operate & assert process is complete', async () => {
274
266
  await navigationPage.goToOperate();
275
267
  await operateHomePage.clickProcessesTab();
276
- await operateProcessesPage.clickProcessInstanceLink(processName);
268
+ await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
277
269
  await operateProcessInstancePage.completedIconAssertion();
278
- await (0, test_1.expect)(page.getByTestId('variables-list')).toBeVisible({
279
- timeout: 30000,
280
- });
281
- await (0, test_1.expect)(page.getByText('"Awesome!"')).toBeVisible({
282
- timeout: 60000,
283
- });
270
+ await operateProcessInstancePage.assertTextVisible('"Awesome!"');
284
271
  await operateProcessInstancePage.tenantNameAssertion(tenantName);
285
272
  });
286
273
  await SM_8_7_1.test.step('Assert Process has been successfully imported in Optimize', async () => {
@@ -388,17 +375,15 @@ if (process.env.IS_MT === 'true') {
388
375
  await SM_8_7_1.test.step('View Process Instances in Operate, and Assert Process Complete in Operate with Correct Tenant', async () => {
389
376
  await navigationPage.goToOperate();
390
377
  await operateHomePage.clickProcessesTab();
391
- await operateProcessesPage.clickProcessCompletedCheckbox();
392
- await operateProcessesPage.clickProcessInstanceLink(processName1);
378
+ await operateProcessesPage.clickProcessInstanceLink(processName1, 'completed');
393
379
  await operateProcessInstancePage.completedIconAssertion();
394
- await (0, test_1.expect)(page.getByText('"Awesome!"')).toBeVisible({
395
- timeout: 60000,
396
- });
380
+ await operateProcessInstancePage.assertTextVisible('"Awesome!"');
397
381
  await operateProcessInstancePage.tenantNameAssertion(tenantName1);
398
382
  await operateHomePage.clickProcessesTab();
399
- await operateProcessesPage.clickProcessCompletedCheckbox();
400
- await operateProcessesPage.clickProcessInstanceLink(processName2);
383
+ await operateProcessesPage.clickProcessInstanceLink(processName2, 'completed');
401
384
  await operateProcessInstancePage.completedIconAssertion();
385
+ await (0, sleep_1.sleep)(2000); // moving too fast here means the text is not displayed.. clicking the row would fix this but there is no testId on the row so that would be flaky
386
+ await page.reload();
402
387
  await (0, test_1.expect)(page.getByText('"Awesome!"')).toBeVisible({
403
388
  timeout: 60000,
404
389
  });
@@ -460,6 +445,7 @@ if (process.env.IS_MT === 'true') {
460
445
  });
461
446
  });
462
447
  await SM_8_7_1.test.step('Delete Tenant Access For Demo User', async () => {
448
+ await context.clearCookies();
463
449
  await navigationPage.goToIdentity();
464
450
  await identityTenantPage.removeUserFromTenant(tenantName);
465
451
  });
@@ -94,10 +94,8 @@ SM_8_7_1.test.describe.parallel('Smoke Tests', () => {
94
94
  await (0, test_1.expect)(optimizeReportPage.versionSelection).toBeVisible({
95
95
  timeout: 30000,
96
96
  });
97
- if (process.env.IS_RBA === 'true') {
98
- await optimizeReportPage.clickVersionSelection();
99
- await optimizeReportPage.clickAlwaysDisplayLatestSelection();
100
- }
97
+ await optimizeReportPage.clickVersionSelection();
98
+ await optimizeReportPage.clickAlwaysDisplayLatestSelection();
101
99
  await optimizeReportPage.clickBlankReportButton();
102
100
  await optimizeReportPage.clickCreateReportLink();
103
101
  await (0, test_1.expect)(optimizeReportPage.selectDropdown).toBeVisible({
@@ -66,6 +66,5 @@ const createIdentityUser = async (navigationPage, identityPage, identityTenantPa
66
66
  if (process.env.IS_MT === 'true') {
67
67
  await identityPage.clickTenantTab();
68
68
  await identityTenantPage.assignUserToTenant('default', username, username + '@camunda.com');
69
- await identityTenantPage.assignClientToTenant('web-modeler');
70
69
  }
71
70
  };
@@ -258,8 +258,26 @@ function getCallerInfo() {
258
258
  // IntelliJ detects links when absolute paths are used. Return absolute by default.
259
259
  // If you really want relative paths, set LOG_CALLER_RELATIVE_PATH=true.
260
260
  const useRelative = process.env.LOG_CALLER_RELATIVE_PATH === 'true';
261
+ // Skip the first few lines which are typically the Error constructor and logging functions
262
+ let skipCount = 0;
261
263
  for (const line of stackLines) {
262
- if (!line.includes('loggingUtils.ts') && line.includes('at')) {
264
+ // Skip Error constructor
265
+ if (line.includes('Error') || line.includes('getCallerInfo')) {
266
+ skipCount++;
267
+ continue;
268
+ }
269
+ // Skip logging utility functions
270
+ if (line.includes('loggingUtils') ||
271
+ line.includes('logSuccess') ||
272
+ line.includes('logError') ||
273
+ line.includes('createLoggedInstance') ||
274
+ line.includes('patchPrototypeForLogging') ||
275
+ line.includes('withLogging')) {
276
+ skipCount++;
277
+ continue;
278
+ }
279
+ // If we've skipped enough lines and this line contains 'at', it's likely our caller
280
+ if (skipCount >= 2 && line.includes('at')) {
263
281
  const match = line.match(/\(([^)]+)\)/) || line.match(/at ([^ ]+)/);
264
282
  if (match) {
265
283
  let filePath = match[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",