@camunda/e2e-test-suite 0.0.897 → 0.0.899

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.
@@ -127,7 +127,11 @@ class ModelerCreatePage {
127
127
  // ambiguous whenever a diagram name contains it (e.g. "Optimize Job Worker
128
128
  // User Task Diagram"). Target the built-in entry by its stable data-id.
129
129
  this.userTaskOption = page.locator('.djs-popup-results [data-id="replace-with-user-task"]');
130
- this.priorityInput = page.getByRole('textbox', { name: 'priority' });
130
+ // The user-task priority field renders as `<input type="number">`, whose
131
+ // ARIA role is `spinbutton`, not `textbox`. Its id is also what separates it
132
+ // from the "Job priority" group's `jobPriorityDefinitionPriority` field,
133
+ // which any name-based query matches as well.
134
+ this.priorityInput = page.locator('#bio-properties-panel-priorityDefinitionPriority');
131
135
  this.appendEndEventButton = page.getByRole('button', {
132
136
  name: 'Append end event',
133
137
  });
@@ -504,11 +508,17 @@ class ModelerCreatePage {
504
508
  await this.page.waitForTimeout(1000);
505
509
  }
506
510
  async clickPriorityInput() {
511
+ // `.bio-properties-panel-group-header empty open` is a descendant
512
+ // combinator over non-existent `empty`/`open` element types, so it always
513
+ // counted 0 and every call clicked the group container blindly — toggling
514
+ // the section shut again on the second and later user tasks.
507
515
  const isExpanded = (await this.assignmentSection
508
- .locator('.bio-properties-panel-group-header empty open')
516
+ .locator('.bio-properties-panel-group-header.open')
509
517
  .count()) > 0;
510
518
  if (!isExpanded) {
511
- await this.assignmentSection.click();
519
+ await this.assignmentSection
520
+ .locator('.bio-properties-panel-group-header')
521
+ .click();
512
522
  }
513
523
  await this.priorityInput.click({ timeout: 30000 });
514
524
  }
@@ -106,8 +106,19 @@ class OCIdentityRolesPage {
106
106
  await this.selectResourceTypeTab('Mapping Rules').click();
107
107
  }
108
108
  async clickRole(roleID) {
109
- await (0, test_1.expect)(this.roleCell(roleID).first()).toBeVisible({ timeout: 60000 });
110
- await this.roleCell(roleID).first().click();
109
+ // The Roles table can settle on a stale render after the Roles tab loads:
110
+ // a role returned by /orchestration/v2/roles/search is missing from the
111
+ // rendered rows (another role is duplicated in its place). Reload between
112
+ // attempts so the table refetches instead of waiting out the timeout on a
113
+ // render that will never update.
114
+ await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, this.roleCell(roleID).first(), {
115
+ visibilityTimeout: 30000,
116
+ totalTimeout: 120000,
117
+ maxRetries: 4,
118
+ postAction: async () => {
119
+ await this.page.reload({ waitUntil: 'domcontentloaded' });
120
+ },
121
+ });
111
122
  }
112
123
  async assignMappingRuleToRole(roleId, mappingId) {
113
124
  await this.clickRole(roleId);
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SettingsPage = void 0;
4
+ const LoginPage_1 = require("./LoginPage");
4
5
  class SettingsPage {
5
6
  page;
6
7
  openSettingsButton;
@@ -19,7 +20,27 @@ class SettingsPage {
19
20
  await this.openUserSidebarButton.click({ timeout: 120000 });
20
21
  }
21
22
  async clickLogoutButton() {
23
+ const loginPage = new LoginPage_1.LoginPage(this.page);
24
+ // Logging out is *usually* a redirect chain (app -> OIDC end-session ->
25
+ // login page) -- wait for the login screen before returning so a caller
26
+ // resetting the session doesn't reload while that navigation is still in
27
+ // flight (aborts the reload with net::ERR_ABORTED). But a known identity
28
+ // bug (https://github.com/camunda/camunda/issues/32382) means the chain
29
+ // doesn't always complete: this can settle back on the still-authenticated
30
+ // app instead of a login screen (confirmed via CI screenshots -- the page
31
+ // stays on Identity > Mapping rules, fully logged in, both on first
32
+ // attempt and retry). Every caller of this method follows it with
33
+ // resetSession(), which force-clears cookies and reloads regardless of
34
+ // where this lands -- that's the actual, reliable logout here, so this
35
+ // wait is best-effort: give the redirect a chance to settle, but don't
36
+ // fail the test over a known bug that resetSession() already works around.
22
37
  await this.logoutButton.click({ timeout: 30000 });
38
+ await loginPage.usernameInput
39
+ .or(loginPage.coreUsernameInput)
40
+ .or(loginPage.keycloakBanner)
41
+ .first()
42
+ .waitFor({ state: 'visible', timeout: 15000 })
43
+ .catch(() => { });
23
44
  }
24
45
  }
25
46
  exports.SettingsPage = SettingsPage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.897",
3
+ "version": "0.0.899",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",