@camunda/e2e-test-suite 0.0.475 → 0.0.477

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.
@@ -90,7 +90,7 @@ class AppsPage {
90
90
  throw new Error(`Failed to click the modeler link after ${maxRetries} attempts.`);
91
91
  }
92
92
  async clickTasklist(clusterName) {
93
- const maxRetries = 3;
93
+ const maxRetries = 5;
94
94
  for (let retries = 0; retries < maxRetries; retries++) {
95
95
  try {
96
96
  if (retries === 0) {
@@ -105,6 +105,7 @@ class AppsPage {
105
105
  }
106
106
  else {
107
107
  await this.clickCamundaApps();
108
+ await (0, UtilitiesPage_1.waitForLoadingToFinish)(this.page);
108
109
  if (await this.tasklistLink.isVisible({ timeout: 5000 })) {
109
110
  await this.tasklistLink.click({ timeout: 10000 });
110
111
  }
@@ -352,11 +352,19 @@ class ClusterDetailsPage {
352
352
  const deleteButton = deletes[0];
353
353
  if (await deleteButton.isVisible()) {
354
354
  await deleteButton.click({ timeout: 60000 });
355
- await (0, test_1.expect)(dialog).toBeVisible({ timeout: 40000 });
356
- await this.deleteSubButton.click();
357
- await (0, test_1.expect)(this.page.getByText('Deleting...')).not.toBeVisible({
358
- timeout: 60000,
359
- });
355
+ // Handle confirmation dialog if it appears; some UI states delete without one
356
+ const dialogVisible = await dialog
357
+ .isVisible({ timeout: 5000 })
358
+ .catch(() => false);
359
+ if (dialogVisible) {
360
+ await this.deleteSubButton.click();
361
+ await (0, test_1.expect)(this.page.getByText('Deleting...')).not.toBeVisible({
362
+ timeout: 60000,
363
+ });
364
+ }
365
+ else {
366
+ await (0, sleep_1.sleep)(2000);
367
+ }
360
368
  }
361
369
  await (0, sleep_1.sleep)(3000);
362
370
  deletes = await this.deleteButton.all();
@@ -210,12 +210,21 @@ class ClusterSecretsPage {
210
210
  await this.bulkImportTextArea.click();
211
211
  await this.bulkImportTextArea.fill(mapped);
212
212
  await this.dialogImportButton.click();
213
- await (0, test_1.expect)(this.dialog).not.toBeVisible({
214
- timeout: 120000,
215
- });
213
+ try {
214
+ await (0, test_1.expect)(this.dialog).not.toBeVisible({
215
+ timeout: 60000,
216
+ });
217
+ }
218
+ catch {
219
+ // Import dialog didn't close - press Escape and let assertSecretsOrCreate handle creation
220
+ await this.page.keyboard.press('Escape');
221
+ await (0, test_1.expect)(this.dialog).not.toBeVisible({ timeout: 10000 });
222
+ }
216
223
  await (0, test_1.expect)(this.createNewSecretButton).toBeVisible({
217
224
  timeout: 60000,
218
225
  });
226
+ await this.page.reload();
227
+ await (0, sleep_1.sleep)(5000);
219
228
  }
220
229
  }
221
230
  exports.ClusterSecretsPage = ClusterSecretsPage;
@@ -20,6 +20,7 @@ class TaskProcessesPage {
20
20
  this.waitingForTasksText = this.page.getByText('Waiting for tasks...');
21
21
  }
22
22
  async clickpopupContinueButton() {
23
+ await this.page.waitForTimeout(3000);
23
24
  if ((await this.popupContinueButton.count()) > 0) {
24
25
  await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.popupContinueButton);
25
26
  }
@@ -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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.475",
3
+ "version": "0.0.477",
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..."