@camunda/e2e-test-suite 0.0.8 → 0.0.10

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.
@@ -101,20 +101,25 @@ class IdentityTenantPage {
101
101
  await this.removeButton.click();
102
102
  }
103
103
  async createTenant(tenantName) {
104
- await (0, sleep_1.sleep)(1000); // Need to pause for the table to render
104
+ await this.page.waitForLoadState('networkidle');
105
105
  const tenant = this.rows.filter({ hasText: tenantName }).first();
106
- if (await tenant.isVisible({ timeout: 3000 })) {
106
+ // Check if the tenant already exists. If so, we're done.
107
+ if (await tenant.isVisible({ timeout: 5000 })) {
107
108
  return;
108
- // await this.deleteTenant(tenantName, tenant);
109
109
  }
110
+ // Tenant doesn't seem to exist, so let's create it.
110
111
  await this.clickCreateTenantMainButton();
111
112
  await this.clickEnterTenantNameInput();
112
113
  await this.fillEnterTenantNameInput(tenantName);
113
114
  await this.clickEnterTenantIdInput();
114
115
  await this.fillEnterTenantIdInput(tenantName);
115
116
  await this.clickCreateTenantSubButton();
116
- await (0, test_1.expect)(this.page.getByText('Tenant created')).toBeVisible({
117
- timeout: 60000,
117
+ // After attempting to create, we expect either a success message,
118
+ // or for the tenant to now be in the list (in case of a race condition
119
+ // where another process created it).
120
+ const successMessage = this.page.getByText('Tenant created');
121
+ await (0, test_1.expect)(successMessage.or(tenant)).toBeVisible({
122
+ timeout: 10000,
118
123
  });
119
124
  }
120
125
  async deleteTenant(tenantName, tenant) {
@@ -100,7 +100,7 @@ class ModelerHomePage {
100
100
  }
101
101
  async clickDiagramTypeDropdown() {
102
102
  await (0, test_1.expect)(this.diagramTypeDropdown).toBeVisible({
103
- timeout: 60000,
103
+ timeout: 5000,
104
104
  });
105
105
  await this.diagramTypeDropdown.click();
106
106
  }
@@ -111,21 +111,21 @@ class ModelerHomePage {
111
111
  await this.formTemplateOption.click();
112
112
  }
113
113
  async enterFormName(name) {
114
- await this.formNameInput.click({ timeout: 60000 });
114
+ await this.formNameInput.click({ timeout: 5000 });
115
115
  await this.formNameInput.fill(name);
116
116
  await this.formNameInput.press('Enter');
117
117
  }
118
118
  async clickProjectBreadcrumb() {
119
- await this.projectBreadcrumb.click({ timeout: 60000 });
119
+ await this.projectBreadcrumb.click({ timeout: 5000 });
120
120
  }
121
121
  async clickOpenOrganizationsButton() {
122
- await this.openOrganizationsButton.click({ timeout: 30000 });
122
+ await this.openOrganizationsButton.click({ timeout: 5000 });
123
123
  }
124
124
  async clickManageButton() {
125
- await this.manageButton.click({ timeout: 30000 });
125
+ await this.manageButton.click({ timeout: 5000 });
126
126
  }
127
127
  async clickUploadFilesButton() {
128
- await this.uploadFilesButton.click({ timeout: 60000 });
128
+ await this.uploadFilesButton.click({ timeout: 5000 });
129
129
  }
130
130
  getDefaultFolderName() {
131
131
  return this.defaultFolderName;
@@ -108,7 +108,7 @@ SM_8_7_1.test.describe.parallel('Smoke Tests', () => {
108
108
  await optimizeHomePage.clickCollectionsLink();
109
109
  await (0, optimizeReportUtils_1.createReportForProcess)(optimizeCollectionsPage, optimizeReportPage, processName);
110
110
  await optimizeReportPage.clickUserTaskProcess(processName);
111
- await (0, test_1.expect)(optimizeReportPage.versionSelection).toBeVisible({
111
+ await (0, test_1.expect)(optimizeReportPage.versionSelection).toBeEnabled({
112
112
  timeout: 30000,
113
113
  });
114
114
  await optimizeReportPage.clickVersionSelection();
@@ -28,9 +28,8 @@ const slowCalls = [];
28
28
  process.once('exit', () => {
29
29
  if (slowCalls.length === 0)
30
30
  return;
31
- console.log('\n\x1b[35m───── Slowest Calls (≥ ' +
32
- SLOW_CALL_THRESHOLD_MS +
33
- ' ms) ─────\x1b[0m');
31
+ const now = new Date().toISOString();
32
+ console.log(`\n\x1b[35m───── Slowest Calls (≥ ${SLOW_CALL_THRESHOLD_MS} ms) ─────\x1b[0m`);
34
33
  const top = slowCalls.sort((a, b) => b.duration - a.duration).slice(0, 10);
35
34
  for (const { name, duration, callsite, testContext, callStack } of top) {
36
35
  // Do NOT wrap the path itself in colour codes – that breaks link detection in
@@ -38,7 +37,7 @@ process.once('exit', () => {
38
37
  // as plain text so it stays clickable.
39
38
  const site = callsite ? ` @ ${callsite}` : '';
40
39
  const testInfo = testContext ? ` [${testContext.testName}]` : '';
41
- console.log(` ${colorLap(duration)} ${name}${testInfo}${site}`);
40
+ console.log(`[${now}] ${colorLap(duration)} ${name}${testInfo}${site}`);
42
41
  // Show call stack if available
43
42
  if (callStack && callStack.length > 0) {
44
43
  console.log(` \x1b[90mCall stack:\x1b[0m`);
@@ -76,9 +75,10 @@ const WORKER_ID = process.env.PLAYWRIGHT_WORKER_INDEX ??
76
75
  process.env.JEST_WORKER_ID ??
77
76
  String(process.pid);
78
77
  function workerPrefix() {
78
+ const now = new Date();
79
79
  const testContext = getCurrentTestContext();
80
80
  const testInfo = testContext ? `[${testContext.testName}]` : '';
81
- return `\x1b[90m[W${WORKER_ID}]\x1b[0m${testInfo} `; // dim grey with test name
81
+ return `[${now.toISOString()}] \x1b[90m[W${WORKER_ID}]\x1b[0m${testInfo} `; // dim grey with test name
82
82
  }
83
83
  // Helper to draw tree-style indentation (│└) so depth is obvious even when groups
84
84
  // are not rendered (e.g. CI terminals that ignore console.group)
@@ -131,7 +131,7 @@ function patchPrototypeForLogging(proto, className) {
131
131
  catch (err) {
132
132
  const duration = Date.now() - start;
133
133
  console.error(`${workerPrefix()}\x1b[31m❌ ${name} threw ${colorLap(duration)}\x1b[0m`);
134
- console.error(err);
134
+ console.error(workerPrefix(), err);
135
135
  throw err;
136
136
  }
137
137
  finally {
@@ -252,7 +252,7 @@ const logSuccess = (indent, name, argsPreview, resultPreview, duration) => {
252
252
  const logError = (indent, name, argsPreview, error, duration) => {
253
253
  // Red cross, show args in dim colour to differentiate from the error text.
254
254
  console.error(`${workerPrefix()}${indent}\x1b[31m❌ ${name}(\x1b[90m${argsPreview}\x1b[31m) threw ${colorLap(duration)}\x1b[0m`);
255
- console.error(formatError(error));
255
+ console.error(`${workerPrefix()}${indent}${formatError(error)}`);
256
256
  };
257
257
  function withLogging(instance, label) {
258
258
  if (process.env.DISABLE_LOGGING_PROXY === 'true') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",