@camunda/e2e-test-suite 0.0.529 → 0.0.531

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.
@@ -5,6 +5,7 @@ const test_1 = require("@playwright/test");
5
5
  const LoginPage_1 = require("./LoginPage");
6
6
  const sleep_1 = require("../../utils/sleep");
7
7
  const constants_1 = require("../../utils/constants");
8
+ const env_1 = require("../../utils/env");
8
9
  const ORCHESTRATION_CONTEXT_PATH = process.env.ORCHESTRATION_CONTEXT_PATH ?? '/orchestration';
9
10
  const NORMALIZED_ORCHESTRATION_CONTEXT_PATH = ORCHESTRATION_CONTEXT_PATH.startsWith('/')
10
11
  ? ORCHESTRATION_CONTEXT_PATH
@@ -147,7 +148,7 @@ class NavigationPage {
147
148
  : new Error(`goToKeycloak failed after ${maxRetries} attempts`);
148
149
  }
149
150
  async goToOCAdmin(sleepTimeout, credentials) {
150
- await this.goTo(`${NORMALIZED_ORCHESTRATION_CONTEXT_PATH}/admin`, this.identityPageBanner, sleepTimeout, credentials);
151
+ await this.goTo(`${NORMALIZED_ORCHESTRATION_CONTEXT_PATH}/admin`, this.identityPageBanner, sleepTimeout, credentials, env_1.isOpenSearch ? 10 : 5);
151
152
  }
152
153
  async goToConsole(sleepTimeout, credentials) {
153
154
  await this.goTo(CONSOLE_CONTEXT_PATH, this.consolePageBanner, sleepTimeout, credentials);
@@ -13,6 +13,7 @@ declare class OperateProcessesPage {
13
13
  readonly processInstanceKeyTextBox: Locator;
14
14
  private readonly whatsNewPopUp;
15
15
  private readonly gotItButton;
16
+ private readonly processesTabLink;
16
17
  constructor(page: Page);
17
18
  private checkCheckbox;
18
19
  private uncheckCheckbox;
@@ -19,9 +19,11 @@ class OperateProcessesPage {
19
19
  processInstanceKeyTextBox;
20
20
  whatsNewPopUp;
21
21
  gotItButton;
22
+ processesTabLink;
22
23
  constructor(page) {
23
24
  this.page = page;
24
25
  this.processResultCount = page.getByTestId('result-count');
26
+ this.processesTabLink = page.getByRole('link', { name: 'Processes' });
25
27
  this.processActiveCheckbox = page
26
28
  .locator('label')
27
29
  .filter({ hasText: 'Active' });
@@ -206,7 +208,9 @@ class OperateProcessesPage {
206
208
  return;
207
209
  }
208
210
  const MAX_ATTEMPTS = 30;
209
- const TOTAL_TIMEOUT_MS = constants_1._1_MINUTE_IN_MS * 6;
211
+ const TOTAL_TIMEOUT_MS = env_1.isOpenSearch
212
+ ? constants_1._1_MINUTE_IN_MS * 10
213
+ : constants_1._1_MINUTE_IN_MS * 6;
210
214
  let attempt = 0;
211
215
  let lastError;
212
216
  const startTime = Date.now();
@@ -239,6 +243,22 @@ class OperateProcessesPage {
239
243
  .waitForLoadState('networkidle', { timeout: 30000 })
240
244
  .catch(() => console.log('waitForLoadState after Operate navigation timed out, continuing...'));
241
245
  }
246
+ // Operate may land on the Dashboard after reload even when the captured
247
+ // URL pointed at the Processes view. The filter checkboxes only exist on
248
+ // the Processes tab, so navigate there explicitly before applying filters.
249
+ try {
250
+ await this.processesTabLink.waitFor({
251
+ state: 'visible',
252
+ timeout: constants_1._1_SECOND_IN_MS * 10,
253
+ });
254
+ await this.processesTabLink.click({ timeout: constants_1._1_SECOND_IN_MS * 10 });
255
+ await this.page
256
+ .waitForLoadState('networkidle', { timeout: 30000 })
257
+ .catch(() => { });
258
+ }
259
+ catch (navErr) {
260
+ console.log(`Processes tab click failed after reload: ${String(navErr)}`);
261
+ }
242
262
  // Re-apply checkbox filter lost after reload
243
263
  try {
244
264
  await this.applyProcessStateFilter(type);
@@ -338,8 +338,10 @@ async function createClusterVariableInternal(authToken, environment, variableNam
338
338
  }
339
339
  bodyText = await response.text();
340
340
  lastErrorMessage = `HTTP ${status} - ${bodyText.slice(0, 200)}`;
341
- // Retry on transient gateway / upstream errors.
342
- if (status >= 502 && status <= 504 && attempt < maxAttempts) {
341
+ // Retry on transient gateway / upstream errors and on HTTP 500
342
+ // (search backend not ready yet observed on fresh OpenSearch deploys).
343
+ if ((status === 500 || (status >= 502 && status <= 504)) &&
344
+ attempt < maxAttempts) {
343
345
  console.warn(`createClusterVariable "${variableName}" attempt ${attempt}/${maxAttempts} got HTTP ${status}; retrying...`);
344
346
  await new Promise((r) => setTimeout(r, baseDelayMs * attempt));
345
347
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.529",
3
+ "version": "0.0.531",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",