@camunda/e2e-test-suite 0.0.474 → 0.0.476

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.
@@ -14,9 +14,7 @@ class ClientCredentialsDetailsPage {
14
14
  this.clientNameHeading = (clientName) => page.getByRole('heading', { name: clientName });
15
15
  }
16
16
  async isOpen(clientName) {
17
- await (0, test_1.expect)(this.clientNameHeading(clientName)).toBeVisible({
18
- timeout: 30000,
19
- });
17
+ await (0, test_1.expect)(this.clientNameHeading(clientName).or(this.operateUrlRow).first()).toBeVisible({ timeout: 60000 });
20
18
  }
21
19
  async getOperateUrl() {
22
20
  if (await this.operateUrlValue.isVisible({ timeout: 10000 }).catch(() => false)) {
@@ -141,7 +141,7 @@ class ClusterDetailsPage {
141
141
  this.orchestrationClusterCheckbox = page
142
142
  .locator('label')
143
143
  .filter({ hasText: /^Orchestration Cluster API$/ });
144
- this.clientCredentialsLink = (clientCredentials) => page.getByRole('cell', { name: clientCredentials });
144
+ this.clientCredentialsLink = (clientCredentials) => page.getByRole('cell', { name: clientCredentials }).locator('a');
145
145
  this.clientRow = (name) => this.clientsList.filter({ hasText: name });
146
146
  this.clientRowDeleteButton = (name) => this.clientRow(name).getByRole('button', { name: 'Delete' });
147
147
  this.mcpSupportToggle = page.getByRole('switch', {
@@ -126,7 +126,7 @@ class FormJsPage {
126
126
  });
127
127
  await this.selectCluster(clusterName);
128
128
  await this.clickDeploySubButton();
129
- await (0, test_1.expect)(this.deploySuccessNotification).toBeVisible({ timeout: 30000 });
129
+ await (0, test_1.expect)(this.deploySuccessNotification).toBeVisible({ timeout: 60000 });
130
130
  }
131
131
  }
132
132
  exports.FormJsPage = FormJsPage;
@@ -131,7 +131,7 @@ class IdpCreatePage {
131
131
  })
132
132
  .first();
133
133
  this.structured_FieldsTab = page.getByRole('tab', {
134
- name: 'Fields',
134
+ name: /fields/i,
135
135
  });
136
136
  this.structured_TablesTab = page.getByRole('tab', {
137
137
  name: 'Tables',
@@ -149,10 +149,10 @@ class IdpCreatePage {
149
149
  name: 'Test extraction template',
150
150
  });
151
151
  this.structured_TestSummaryResult = page.getByRole('heading', {
152
- name: 'Test Summary Results',
152
+ name: /test summary/i,
153
153
  });
154
154
  this.structured_DetailsResult = page.getByRole('heading', {
155
- name: 'Detailed Results',
155
+ name: /detail/i,
156
156
  });
157
157
  this.structured_PublishTemplateButton = page.getByRole('button', {
158
158
  name: 'Publish Template',
@@ -197,11 +197,20 @@ class IdpCreatePage {
197
197
  .locator('span:has-text("Accuracy") + span');
198
198
  }
199
199
  async clickCreateIdpTemplateButton() {
200
- await this.createNewDropdownButton.click({ timeout: 60000 });
201
- await (0, test_1.expect)(this.createExtractionTemplateOption).toBeVisible({
202
- timeout: 10000,
203
- });
204
- await this.createExtractionTemplateOption.click({ timeout: 60000 });
200
+ for (let attempt = 0; attempt < 3; attempt++) {
201
+ await this.createNewDropdownButton.click({ timeout: 60000 });
202
+ try {
203
+ await (0, test_1.expect)(this.createExtractionTemplateOption).toBeVisible({
204
+ timeout: 10000,
205
+ });
206
+ await this.createExtractionTemplateOption.click({ timeout: 10000 });
207
+ return;
208
+ }
209
+ catch {
210
+ // menu detached or closed; retry
211
+ }
212
+ }
213
+ throw new Error('Failed to click create extraction template option after 3 attempts');
205
214
  }
206
215
  async fillIdpExtractionTemplateName(name) {
207
216
  await this.idpExtractionTemplateName.fill(name);
@@ -357,8 +366,11 @@ class IdpCreatePage {
357
366
  await (0, test_1.expect)(this.extractionInProgressNotification).not.toBeVisible({
358
367
  timeout: 120000,
359
368
  });
360
- await (0, test_1.expect)(this.structured_FieldsTab).toBeVisible({
361
- timeout: 180000,
369
+ // Fields tab is a readiness indicator; not all providers render it — proceed if absent
370
+ await this.structured_FieldsTab
371
+ .waitFor({ state: 'visible', timeout: 180000 })
372
+ .catch(() => {
373
+ console.log('structured_FieldsTab not visible; proceeding to checkbox');
362
374
  });
363
375
  await (0, test_1.expect)(this.structured_CheckboxSelectAllFields).toBeVisible({
364
376
  timeout: 60000,
@@ -53,7 +53,7 @@ class OCIdentityClusterVariablesPage {
53
53
  await this.monacoEditor.click();
54
54
  await this.monacoEditorTextArea.clear();
55
55
  await this.monacoEditorTextArea.fill(newValue);
56
- await (0, test_1.expect)(this.saveVariableButton).toBeEnabled();
56
+ await (0, test_1.expect)(this.saveVariableButton).toBeEnabled({ timeout: 15000 });
57
57
  await this.saveVariableButton.click();
58
58
  await (0, test_1.expect)(this.successMessage).toBeVisible();
59
59
  await (0, test_1.expect)(this.editVariableModal).toBeHidden();
@@ -56,6 +56,8 @@ class OperateHomePage {
56
56
  await (0, test_1.expect)(this.processesTab).toBeVisible({ timeout: 10000 });
57
57
  await this.processesTab.click({ timeout: 10000 });
58
58
  },
59
+ maxRetries: 5,
60
+ totalTimeout: 120000,
59
61
  });
60
62
  }
61
63
  async closeInformationDialog() {
@@ -80,7 +80,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
80
80
  await appsPage.clickCamundaApps();
81
81
  await appsPage.clickModeler();
82
82
  await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
83
- timeout: 30000,
83
+ timeout: 60000,
84
84
  });
85
85
  });
86
86
  await _8_9_1.test.step('Navigate to Cross Component Test Project', async () => {
@@ -195,7 +195,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
195
195
  await appsPage.clickCamundaApps();
196
196
  await appsPage.clickModeler();
197
197
  await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
198
- timeout: 30000,
198
+ timeout: 60000,
199
199
  });
200
200
  });
201
201
  await _8_9_1.test.step('Navigate to Cross Component Test Project', async () => {
@@ -314,7 +314,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
314
314
  await appsPage.clickCamundaApps();
315
315
  await appsPage.clickModeler();
316
316
  await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
317
- timeout: 30000,
317
+ timeout: 60000,
318
318
  });
319
319
  });
320
320
  await _8_9_1.test.step('Navigate to Cross Component Test Project', async () => {
@@ -412,7 +412,7 @@ _8_9_1.test.describe.parallel('RBA Enabled User Flows Test @tasklistV2', () => {
412
412
  await appsPage.clickCamundaApps();
413
413
  await appsPage.clickModeler();
414
414
  await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
415
- timeout: 30000,
415
+ timeout: 60000,
416
416
  });
417
417
  });
418
418
  await _8_9_1.test.step('Navigate to Cross Component Test Project', async () => {
@@ -13,7 +13,6 @@ const UtilitiesPage_1 = require("../../pages/8.9/UtilitiesPage");
13
13
  const OptimizeHomePage_1 = require("../../pages/8.9/OptimizeHomePage");
14
14
  const OptimizeCollectionsPage_1 = require("../../pages/8.9/OptimizeCollectionsPage");
15
15
  const OptimizeReportPage_1 = require("../../pages/8.9/OptimizeReportPage");
16
- const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
17
16
  const users_1 = require("../../utils/users");
18
17
  const sleep_1 = require("../../utils/sleep");
19
18
  const testUser = (0, users_1.getTestUser)('thirteenthUser');
@@ -218,12 +217,12 @@ _8_9_1.test.describe('Smoke Tests', () => {
218
217
  await operateHomePage.clickProcessesTab();
219
218
  await operateProcessesPage.clickProcessCompletedCheckbox();
220
219
  await operateProcessesPage.clickProcessInstanceLink(processName);
221
- await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, operateProcessInstancePage.completedIcon, { totalTimeout: TIMEOUT.processComplete, maxRetries: 5 });
222
- await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(page, operateProcessInstancePage.variablesList, { totalTimeout: TIMEOUT.navigation, maxRetries: 5 });
223
- await (0, test_1.expect)(operateProcessInstancePage.connectorResultVariableName('message')).toBeVisible({ timeout: TIMEOUT.short });
220
+ await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateProcessInstancePage, operateProcessInstancePage.completedIcon, 'completed icon in Operate', TIMEOUT.processComplete);
221
+ await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(operateTab, operateProcessInstancePage.variablesList, 'variable list in Operate', TIMEOUT.navigation);
222
+ await (0, test_1.expect)(operateProcessInstancePage.connectorResultVariableName('message')).toBeVisible({ timeout: TIMEOUT.navigation });
224
223
  await (0, test_1.expect)(operateProcessInstancePage
225
224
  .connectorResultVariableName('message')
226
- .getByText('"Message from Mock!"')).toBeVisible({ timeout: TIMEOUT.short });
225
+ .getByText('"Message from Mock!"')).toBeVisible({ timeout: TIMEOUT.navigation });
227
226
  });
228
227
  });
229
228
  });
@@ -530,8 +530,8 @@ _8_9_1.test.describe('Web Modeler User Flow Tests', () => {
530
530
  await (0, test_1.expect)(modelerCreatePage.viewProcessInstanceLink).toBeVisible({
531
531
  timeout: 120000,
532
532
  });
533
- await modelerCreatePage.clickViewProcessInstanceLink();
534
533
  const operateTabPromise = page.waitForEvent('popup', { timeout: 60000 });
534
+ await modelerCreatePage.clickViewProcessInstanceLink();
535
535
  const operateTab = await operateTabPromise;
536
536
  // TODO: Uncomment when Optimize tests are re-enabled
537
537
  // const operateTabAppsPage = new AppsPage(operateTab);
@@ -4,6 +4,7 @@ const test_1 = require("@playwright/test");
4
4
  const SM_8_9_1 = require("../../fixtures/SM-8.9");
5
5
  const _setup_1 = require("../../test-setup.js");
6
6
  const sleep_1 = require("../../utils/sleep");
7
+ const env_1 = require("../../utils/env");
7
8
  SM_8_9_1.test.describe.configure({ mode: 'parallel' });
8
9
  SM_8_9_1.test.describe('Deploy and run a process in Play', () => {
9
10
  SM_8_9_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
@@ -96,7 +97,7 @@ SM_8_9_1.test.describe('Deploy and run a process in Play', () => {
96
97
  await modelerCreatePage.clickSecondPlacedGateway();
97
98
  await modelerCreatePage.clickAppendElementButton();
98
99
  await modelerCreatePage.clickAppendEndEventButton('parallelGateway');
99
- await (0, sleep_1.sleep)(5000);
100
+ await (0, sleep_1.sleep)(env_1.isOpenSearch ? 15000 : 5000);
100
101
  });
101
102
  await SM_8_9_1.test.step('Open Play', async () => {
102
103
  await modelerCreatePage.switchToPlay();
@@ -123,7 +124,7 @@ SM_8_9_1.test.describe('Deploy and run a process in Play', () => {
123
124
  await modelerCreatePage.clickAppendTaskButton();
124
125
  await modelerCreatePage.clickConnectToOtherElementButton();
125
126
  await modelerCreatePage.clickSecondPlacedGateway();
126
- await (0, sleep_1.sleep)(5000);
127
+ await (0, sleep_1.sleep)(env_1.isOpenSearch ? 15000 : 5000);
127
128
  await modelerCreatePage.switchToPlay();
128
129
  // After diagram modification, Play may show a "Continue" button
129
130
  // to redeploy, or it may show the diagram directly. Try clicking
@@ -6,6 +6,7 @@ const _setup_1 = require("../../test-setup.js");
6
6
  const sleep_1 = require("../../utils/sleep");
7
7
  const UtilitiesPage_1 = require("../../pages/SM-8.9/UtilitiesPage");
8
8
  const fileUpload_1 = require("../../utils/fileUpload");
9
+ const env_1 = require("../../utils/env");
9
10
  SM_8_9_1.test.describe.configure({ mode: 'parallel' });
10
11
  SM_8_9_1.test.describe('Web Modeler User Flow Tests', () => {
11
12
  SM_8_9_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
@@ -166,7 +167,7 @@ SM_8_9_1.test.describe('Web Modeler User Flow Tests', () => {
166
167
  await modelerCreatePage.runProcessInstance(variables);
167
168
  });
168
169
  await SM_8_9_1.test.step('View process instance in Operate and verify completion', async () => {
169
- await (0, sleep_1.sleep)(3000); // Allow Zeebe to index the instance before navigating to Operate
170
+ await (0, sleep_1.sleep)(env_1.isOpenSearch ? 10000 : 3000); // Allow Zeebe to index the instance before navigating to Operate (OpenSearch is slower)
170
171
  await navigationPage.goToOperate();
171
172
  await operateHomePage.clickProcessesTab();
172
173
  await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.474",
3
+ "version": "0.0.476",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1954,6 +1954,17 @@ echo ""
1954
1954
  # Array to track created authorization keys for cleanup
1955
1955
  CREATED_AUTH_KEYS=()
1956
1956
 
1957
+ # Capture CLIENT authorization baseline BEFORE any auth tests run.
1958
+ # This must happen here, not inside the cleanup section, because AUTH-23
1959
+ # creates a CLIENT authorization that inflates the count before the
1960
+ # cleanup's "before" snapshot fires, causing a false-positive ERROR.
1961
+ AUTH_CLIENT_BASELINE_COUNT=0
1962
+ if [[ -n "${CLIENT_ID:-}" ]]; then
1963
+ _baseline_payload="{\"filter\":{\"ownerType\":\"CLIENT\",\"ownerId\":\"$CLIENT_ID\"}}"
1964
+ _baseline_response="$(call_api_json_no_tenant "POST" "/v2/authorizations/search" "$_baseline_payload")"
1965
+ AUTH_CLIENT_BASELINE_COUNT="$(echo "$_baseline_response" | get_body | jq -r '.items | length // 0')"
1966
+ fi
1967
+
1957
1968
  # Diagnostic: Authorization lifecycle tracking
1958
1969
  AUTH_DIAG_FILE="/tmp/auth-diagnostic-$$.log"
1959
1970
  AUTH_DIAG_START_TIME="$(date +%s)"
@@ -2528,9 +2539,11 @@ if [[ -n "$AUTH_TEST_GROUP" ]]; then
2528
2539
 
2529
2540
  echo "Checking $CLIENT_ID CLIENT authorizations before cleanup..."
2530
2541
  search_client_payload="{\"filter\":{\"ownerType\":\"CLIENT\",\"ownerId\":\"$CLIENT_ID\"}}"
2531
- response="$(call_api_json_no_tenant "POST" "/v2/authorizations/search" "$search_client_payload")"
2532
- client_auth_count="$(echo "$response" | get_body | jq -r '.items | length // 0')"
2533
- echo "Found $client_auth_count $CLIENT_ID CLIENT authorizations"
2542
+ # Use the baseline captured before any auth tests ran; the current count
2543
+ # is higher because AUTH-23 created a CLIENT authorization that will be
2544
+ # deleted as part of this cleanup.
2545
+ client_auth_count="$AUTH_CLIENT_BASELINE_COUNT"
2546
+ echo "Using pre-test baseline: $client_auth_count $CLIENT_ID CLIENT authorizations"
2534
2547
 
2535
2548
  # Step 2: Verify test group still exists (prevent orphaned auth records)
2536
2549
  echo "Verifying auth-test-group exists before cleanup..."