@camunda/e2e-test-suite 0.0.7 → 0.0.8
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.
|
@@ -104,7 +104,8 @@ class IdentityTenantPage {
|
|
|
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
106
|
if (await tenant.isVisible({ timeout: 3000 })) {
|
|
107
|
-
|
|
107
|
+
return;
|
|
108
|
+
// await this.deleteTenant(tenantName, tenant);
|
|
108
109
|
}
|
|
109
110
|
await this.clickCreateTenantMainButton();
|
|
110
111
|
await this.clickEnterTenantNameInput();
|
|
@@ -8,7 +8,7 @@ const UtlitiesPage_1 = require("../../pages/SM-8.7/UtlitiesPage");
|
|
|
8
8
|
const keycloak_1 = require("../../utils/keycloak");
|
|
9
9
|
const loggingUtils_1 = require("../../utils/loggingUtils");
|
|
10
10
|
if (process.env.IS_MT === 'true') {
|
|
11
|
-
SM_8_7_1.test.describe.configure({ mode: '
|
|
11
|
+
SM_8_7_1.test.describe.configure({ mode: 'parallel' });
|
|
12
12
|
SM_8_7_1.test.describe('MT Enabled User Flows Test', () => {
|
|
13
13
|
SM_8_7_1.test.beforeEach(async ({ navigationPage, identityPage, keycloakLoginPage, keycloakAdminPage, context, identityTenantPage, }, testInfo) => {
|
|
14
14
|
(0, loggingUtils_1.setupTestLogging)(testInfo);
|
|
@@ -12,6 +12,20 @@ SM_8_7_1.test.describe.parallel('Smoke Tests', () => {
|
|
|
12
12
|
SM_8_7_1.test.beforeEach(async ({ navigationPage, identityPage, identityTenantPage, keycloakLoginPage, keycloakAdminPage, }, testInfo) => {
|
|
13
13
|
(0, loggingUtils_1.setupTestLogging)(testInfo);
|
|
14
14
|
await (0, keycloak_1.setupKeycloakUser)(navigationPage, identityPage, keycloakLoginPage, keycloakAdminPage, identityTenantPage);
|
|
15
|
+
if (process.env.IS_MT === 'true') {
|
|
16
|
+
const mt_connectors_tenant = [
|
|
17
|
+
'Tenant_Main_Connectors',
|
|
18
|
+
'Tenant_Second_Connectors',
|
|
19
|
+
'Tenant_1_Connectors',
|
|
20
|
+
'Tenant_2_Connectors',
|
|
21
|
+
];
|
|
22
|
+
for (const tenant of mt_connectors_tenant) {
|
|
23
|
+
await navigationPage.goToIdentity();
|
|
24
|
+
await identityTenantPage.createTenant(tenant);
|
|
25
|
+
await identityTenantPage.assignUserToTenant(tenant, navigationPage.activeUser, navigationPage.activeUser + '@camunda.com');
|
|
26
|
+
await identityTenantPage.assignClientToTenant('Zeebe');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
15
29
|
});
|
|
16
30
|
SM_8_7_1.test.afterEach(async ({ page }, testInfo) => {
|
|
17
31
|
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
@@ -32,12 +32,22 @@ process.once('exit', () => {
|
|
|
32
32
|
SLOW_CALL_THRESHOLD_MS +
|
|
33
33
|
' ms) ─────\x1b[0m');
|
|
34
34
|
const top = slowCalls.sort((a, b) => b.duration - a.duration).slice(0, 10);
|
|
35
|
-
for (const { name, duration, callsite } of top) {
|
|
35
|
+
for (const { name, duration, callsite, testContext, callStack } of top) {
|
|
36
36
|
// Do NOT wrap the path itself in colour codes – that breaks link detection in
|
|
37
37
|
// most terminals/IDEs. We still colour the leading arrow, but leave the path
|
|
38
38
|
// as plain text so it stays clickable.
|
|
39
39
|
const site = callsite ? ` @ ${callsite}` : '';
|
|
40
|
-
|
|
40
|
+
const testInfo = testContext ? ` [${testContext.testName}]` : '';
|
|
41
|
+
console.log(` ${colorLap(duration)} ${name}${testInfo}${site}`);
|
|
42
|
+
// Show call stack if available
|
|
43
|
+
if (callStack && callStack.length > 0) {
|
|
44
|
+
console.log(` \x1b[90mCall stack:\x1b[0m`);
|
|
45
|
+
callStack.forEach((frame, index) => {
|
|
46
|
+
const indent = ' ';
|
|
47
|
+
const arrow = index === callStack.length - 1 ? '└─ ' : '├─ ';
|
|
48
|
+
console.log(`${indent}${arrow}${frame}`);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
41
51
|
}
|
|
42
52
|
console.log('\x1b[35m───────────────────────────────────────────────────────\x1b[0m');
|
|
43
53
|
});
|
|
@@ -176,7 +186,13 @@ function createLoggedInstance(instance, label = '', depth = 0) {
|
|
|
176
186
|
logSuccess(indent, name, argsPreview, resultPreview, duration);
|
|
177
187
|
// Slow-call tracking (feature #4)
|
|
178
188
|
if (duration >= SLOW_CALL_THRESHOLD_MS) {
|
|
179
|
-
slowCalls.push({
|
|
189
|
+
slowCalls.push({
|
|
190
|
+
name,
|
|
191
|
+
duration,
|
|
192
|
+
callsite: callerInfo,
|
|
193
|
+
testContext: getCurrentTestContext() || undefined,
|
|
194
|
+
callStack: getCallStack()
|
|
195
|
+
});
|
|
180
196
|
}
|
|
181
197
|
return result;
|
|
182
198
|
}
|
|
@@ -312,6 +328,42 @@ function getCallerInfo() {
|
|
|
312
328
|
}
|
|
313
329
|
return '';
|
|
314
330
|
}
|
|
331
|
+
function getCallStack() {
|
|
332
|
+
const err = new Error();
|
|
333
|
+
if (!err.stack)
|
|
334
|
+
return [];
|
|
335
|
+
const stackLines = err.stack.split('\n');
|
|
336
|
+
const workspaceRoot = process.cwd();
|
|
337
|
+
const useRelative = process.env.LOG_CALLER_RELATIVE_PATH === 'true';
|
|
338
|
+
const callStack = [];
|
|
339
|
+
for (const line of stackLines) {
|
|
340
|
+
// Skip Error constructor and logging utility functions
|
|
341
|
+
if (line.includes('Error') ||
|
|
342
|
+
line.includes('getCallStack') ||
|
|
343
|
+
line.includes('loggingUtils') ||
|
|
344
|
+
line.includes('logSuccess') ||
|
|
345
|
+
line.includes('logError') ||
|
|
346
|
+
line.includes('createLoggedInstance') ||
|
|
347
|
+
line.includes('patchPrototypeForLogging') ||
|
|
348
|
+
line.includes('withLogging')) {
|
|
349
|
+
continue;
|
|
350
|
+
}
|
|
351
|
+
// Extract file path from stack line
|
|
352
|
+
if (line.includes('at')) {
|
|
353
|
+
const match = line.match(/\(([^)]+)\)/) || line.match(/at ([^ ]+)/);
|
|
354
|
+
if (match) {
|
|
355
|
+
let filePath = match[1];
|
|
356
|
+
if (useRelative && filePath.startsWith(workspaceRoot)) {
|
|
357
|
+
filePath = filePath.slice(workspaceRoot.length);
|
|
358
|
+
if (filePath.startsWith('/'))
|
|
359
|
+
filePath = filePath.slice(1);
|
|
360
|
+
}
|
|
361
|
+
callStack.push(filePath);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return callStack.slice(0, 10); // Limit to first 10 frames to avoid overwhelming output
|
|
366
|
+
}
|
|
315
367
|
const logWithTime = (msg, startTime) => {
|
|
316
368
|
const now = new Date();
|
|
317
369
|
const elapsed = Date.now() - startTime;
|