@camunda/e2e-test-suite 0.0.477 → 0.0.478

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.
@@ -257,7 +257,9 @@ class OCTenantPage {
257
257
  }
258
258
  async fillRoleIdSearchBox(roleId, roleIdentifier) {
259
259
  await this.roleIdSearchBox.fill(roleId);
260
- await this.page.getByText(roleIdentifier).click({ force: true });
260
+ const result = this.page.getByText(roleIdentifier).first();
261
+ await (0, test_1.expect)(result).toBeVisible({ timeout: 15000 });
262
+ await result.click();
261
263
  }
262
264
  async clickAssignRoleSubButton() {
263
265
  await this.assignRoleSubButton.click();
@@ -273,6 +275,10 @@ class OCTenantPage {
273
275
  await this.clickRoleIdSearchBox();
274
276
  await this.fillRoleIdSearchBox(roleId, roleIdentifier);
275
277
  await this.clickAssignRoleSubButton();
278
+ await (0, test_1.expect)(this.page.getByLabel('Assign role')).not.toBeVisible({
279
+ timeout: 15000,
280
+ });
281
+ await (0, test_1.expect)(this.row(roleId)).toBeVisible({ timeout: 15000 });
276
282
  }
277
283
  }
278
284
  exports.OCTenantPage = OCTenantPage;
@@ -23,5 +23,6 @@ declare class OperateProcessInstancePage {
23
23
  assertProcessVariableContainsText(variableName: string, text: string): Promise<void>;
24
24
  assertResultVariableVisibleWithRetry(variableName: string): Promise<void>;
25
25
  assertActiveTokenIsPresent(): Promise<void>;
26
+ assertVariablesListVisible(timeout?: number): Promise<void>;
26
27
  }
27
28
  export { OperateProcessInstancePage };
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OperateProcessInstancePage = void 0;
4
4
  const test_1 = require("@playwright/test");
5
5
  const sleep_1 = require("../../utils/sleep");
6
+ const constants_1 = require("../../utils/constants");
6
7
  class OperateProcessInstancePage {
7
8
  page;
8
9
  diagram;
@@ -190,5 +191,24 @@ class OperateProcessInstancePage {
190
191
  async assertActiveTokenIsPresent() {
191
192
  await (0, test_1.expect)(this.activeIcon).toBeVisible({ timeout: 60000 });
192
193
  }
194
+ async assertVariablesListVisible(timeout = 30000) {
195
+ const startTime = Date.now();
196
+ while (Date.now() - startTime < timeout) {
197
+ try {
198
+ await (0, test_1.expect)(this.variablesList).toBeVisible({
199
+ timeout: constants_1._1_SECOND_IN_MS * 10,
200
+ });
201
+ return;
202
+ }
203
+ catch {
204
+ console.log(`Variables list not visible, reloading... (${Math.round((Date.now() - startTime) / 1000)}s elapsed)`);
205
+ await this.page
206
+ .reload({ timeout: 10000 })
207
+ .catch(() => console.log('Page reload timed out, continuing...'));
208
+ await (0, sleep_1.sleep)(2000);
209
+ }
210
+ }
211
+ throw new Error(`Variables list not visible after ${Math.round(timeout / 1000)}s`);
212
+ }
193
213
  }
194
214
  exports.OperateProcessInstancePage = OperateProcessInstancePage;
@@ -309,9 +309,7 @@ if (process.env.IS_MT === 'true') {
309
309
  await operateHomePage.clickProcessesTab();
310
310
  await operateProcessesPage.clickProcessInstanceLink(processName, 'completed');
311
311
  await operateProcessInstancePage.completedIconAssertion();
312
- await (0, test_1.expect)(page.getByTestId('variables-list')).toBeVisible({
313
- timeout: 30000,
314
- });
312
+ await operateProcessInstancePage.assertVariablesListVisible();
315
313
  await (0, test_1.expect)(page.getByText('"Awesome!"')).toBeVisible({
316
314
  timeout: 60000,
317
315
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.477",
3
+ "version": "0.0.478",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",