@camunda/e2e-test-suite 0.0.545 → 0.0.547

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.
@@ -23,7 +23,7 @@ class OptimizeCollectionsPage {
23
23
  this.modalCloseButton = page.getByText('Close', { exact: true });
24
24
  this.processReport = page.getByText('Process Report').first();
25
25
  this.collectionsLink = page.getByRole('link', { name: 'Collections' });
26
- this.reportAuthor = page.getByRole('cell', { name: 'Demo User' });
26
+ this.reportAuthor = page.getByRole('cell', { name: 'Demo User' }).first();
27
27
  }
28
28
  async clickCreateNewButton() {
29
29
  try {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.assertReportWithRefreshes = exports.createReportForProcess = void 0;
4
4
  const UtilitiesPage_1 = require("../SM-8.8/UtilitiesPage");
5
5
  const createReportForProcess = async (page, optimizeCollectionsPage, optimizeReportPage, processName) => {
6
- const TOTAL_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes (OpenSearch ingestion can be slow)
6
+ const TOTAL_TIMEOUT_MS = process.env.IS_MT === 'true' ? 10 * 60 * 1000 : 5 * 60 * 1000; // 10 min for MT (slower ingestion), 5 min otherwise
7
7
  const startTime = Date.now();
8
8
  let attempt = 0;
9
9
  let found = false;
@@ -38,7 +38,7 @@ const createReportForProcess = async (page, optimizeCollectionsPage, optimizeRep
38
38
  };
39
39
  exports.createReportForProcess = createReportForProcess;
40
40
  const assertReportWithRefreshes = async (page, optimizeHomePage, optimizeCollectionsPage, optimizeReportPage, reportName, locator, text) => {
41
- const TOTAL_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes (OpenSearch ingestion can be slow)
41
+ const TOTAL_TIMEOUT_MS = process.env.IS_MT === 'true' ? 10 * 60 * 1000 : 5 * 60 * 1000; // 10 min for MT (slower ingestion), 5 min otherwise
42
42
  const startTime = Date.now();
43
43
  let attempt = 0;
44
44
  let found = false;
@@ -23,7 +23,7 @@ class OptimizeCollectionsPage {
23
23
  this.modalCloseButton = page.getByText('Close', { exact: true });
24
24
  this.processReport = page.getByText('Process Report').first();
25
25
  this.collectionsLink = page.getByRole('link', { name: 'Collections' });
26
- this.reportAuthor = page.getByRole('cell', { name: 'Demo User' });
26
+ this.reportAuthor = page.getByRole('cell', { name: 'Demo User' }).first();
27
27
  }
28
28
  async clickCreateNewButton() {
29
29
  try {
@@ -55,7 +55,9 @@ if (process.env.IS_MIGRATION === 'true') {
55
55
  await (0, test_1.expect)(page.getByRole('heading', { name: 'completed' })).toBeVisible({
56
56
  timeout: 45000,
57
57
  });
58
- await (0, test_1.expect)(page.getByText(processName)).toBeVisible({ timeout: 60000 });
58
+ await (0, test_1.expect)(page.getByText(processName).first()).toBeVisible({
59
+ timeout: 60000,
60
+ });
59
61
  });
60
62
  await SM_8_8_1.test.step('View Report in Optimize', async () => {
61
63
  await navigationPage.goToOptimize();
@@ -11,6 +11,11 @@ const KeycloakUtils_1 = require("../../pages/SM-8.8/KeycloakUtils");
11
11
  SM_8_8_1.test.describe.parallel('Smoke Tests', () => {
12
12
  SM_8_8_1.test.beforeEach(async ({ navigationPage, managementIdentityPage, managementIdentityTenantPage, keycloakLoginPage, keycloakAdminPage, page, browser, loginPage, ocIdentityHomePage, ocIdentityRolesPage, }, testInfo) => {
13
13
  if (process.env.IS_MIGRATION === 'true') {
14
+ if (process.env.IS_MT === 'true') {
15
+ const demoUserEmail = process.env.DEMO_USER_EMAIL || 'demo@example.org';
16
+ await navigationPage.goToManagementIdentity();
17
+ await managementIdentityTenantPage.assignUserToTenant('Default', 'demo', `Demo User${demoUserEmail}`);
18
+ }
14
19
  await navigationPage.goToOCIdentity((testInfo.workerIndex + 1) * 1000);
15
20
  }
16
21
  else {
@@ -55,7 +55,9 @@ if (process.env.IS_MIGRATION === 'true') {
55
55
  await (0, test_1.expect)(page.getByRole('heading', { name: 'completed' })).toBeVisible({
56
56
  timeout: 45000,
57
57
  });
58
- await (0, test_1.expect)(page.getByText(processName)).toBeVisible({ timeout: 60000 });
58
+ await (0, test_1.expect)(page.getByText(processName).first()).toBeVisible({
59
+ timeout: 60000,
60
+ });
59
61
  });
60
62
  await SM_8_9_1.test.step('View Report in Optimize', async () => {
61
63
  await navigationPage.goToOptimize();
@@ -14,6 +14,9 @@ SM_8_9_1.test.describe.parallel('Smoke Tests', () => {
14
14
  SM_8_9_1.test.beforeEach(async ({ navigationPage, managementIdentityPage, managementIdentityTenantPage, keycloakLoginPage, keycloakAdminPage, page, browser, loginPage, ocIdentityHomePage, ocIdentityRolesPage, }, testInfo) => {
15
15
  if (process.env.IS_MIGRATION === 'true') {
16
16
  if (process.env.IS_MT === 'true') {
17
+ const demoUserEmail = process.env.DEMO_USER_EMAIL || 'demo@example.org';
18
+ await navigationPage.goToManagementIdentity();
19
+ await managementIdentityTenantPage.assignUserToTenant('Default', 'demo', `Demo User${demoUserEmail}`);
17
20
  await navigationPage.goToOCAdmin((testInfo.workerIndex + 1) * 1000);
18
21
  }
19
22
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.545",
3
+ "version": "0.0.547",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",
@@ -4261,12 +4261,19 @@ fi
4261
4261
  refresh_auth_token
4262
4262
 
4263
4263
  # =============================================================================
4264
- # Forms (search is optional on some builds; tolerate 404)
4264
+ # Forms (search endpoint does not exist in all versions; skip gracefully)
4265
4265
  # =============================================================================
4266
4266
  echo -e "\n${BLUE}Testing Form Endpoints${NC}"
4267
- response="$(call_api_json "POST" "/v2/forms/search" '{"filter":{}}')"
4268
- print_result_multi "POST /v2/forms/search" "$response" "200 404"
4269
- body="$(echo "$response" | get_body)"; FORM_KEY="$(echo "$body" | jq -r '.items[0].formKey // empty' 2>/dev/null || true)"
4267
+ response="$(call_api_json "POST" "/v2/forms/search" '{"filter":{}}')"
4268
+ forms_status="$(echo "$response" | extract_status)"
4269
+ body="$(echo "$response" | get_body)"
4270
+ FORM_KEY=""
4271
+ if [[ "$forms_status" == "200" ]]; then
4272
+ print_result_multi "POST /v2/forms/search" "$response" "200"
4273
+ FORM_KEY="$(echo "$body" | jq -r '.items[0].formKey // empty' 2>/dev/null || true)"
4274
+ else
4275
+ echo " POST /v2/forms/search returned $forms_status — endpoint not available in this version, skipping form tests"
4276
+ fi
4270
4277
  if [[ -n "$FORM_KEY" ]]; then
4271
4278
  echo -e "\nTesting GET /v2/forms/$FORM_KEY"
4272
4279
  response="$(call_api_get "/v2/forms/$FORM_KEY")"; print_result "GET /v2/forms/{key} (key: $FORM_KEY)" "$response"
@@ -4810,10 +4817,13 @@ else
4810
4817
  fi
4811
4818
 
4812
4819
  if [[ -n "$UW_DEFINITION_KEY" ]]; then
4820
+ # Prefer ZEEBE_USER_TASK_KEY so instances wait at a user task and stay ACTIVE long
4821
+ # enough for the batch to be suspended. UW_DEFINITION_KEY may complete immediately.
4822
+ BATCH_DEF_KEY="${ZEEBE_USER_TASK_KEY:-$UW_DEFINITION_KEY}"
4813
4823
  echo "Starting 200 process instances for batch operation testing (more instances = longer ACTIVE state)..."
4814
4824
  # Disable errexit for batch instance creation - failures here shouldn't crash the whole script
4815
4825
  for i in {1..200}; do
4816
- start_payload="$(jq -n --arg k "$UW_DEFINITION_KEY" '{processDefinitionKey:$k, variables:{batchTest:true}}')"
4826
+ start_payload="$(jq -n --arg k "$BATCH_DEF_KEY" '{processDefinitionKey:$k, variables:{batchTest:true}}')"
4817
4827
  start_response="$(echo "$start_payload" | call_api_json "POST" "/v2/process-instances" -)"
4818
4828
  start_body="$(echo "$start_response" | get_body)"
4819
4829
  instance_key="$(echo "$start_body" | jq -r '.processInstanceKey // empty')"