@camunda/e2e-test-suite 0.0.896 → 0.0.898

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.
@@ -164,11 +164,11 @@ class ModelerCreatePage {
164
164
  this.clientIdTextbox = page.getByLabel('Client ID');
165
165
  this.clientSecretTextbox = page.getByLabel('Client secret');
166
166
  this.rememberCredentialsCheckbox = page.getByText('Remember credentials');
167
- // Marketplace "Save as copy" imports leave extra copies of the same
168
- // connector template in the shared project, each rendered as another
169
- // identically-named popup entry but carrying a generated `Template_<id>`.
170
- // A name query matches every copy and throws in strict mode, so target the
171
- // canonical marketplace template by its stable entry id instead.
167
+ // A name query matches every project-local copy of this template too
168
+ // ("Webhook Message Start Event Connector - Copy", left behind by earlier
169
+ // marketplace imports), so it resolves to several options and clicking
170
+ // throws in strict mode. Target the bundled template by its stable entry
171
+ // id, the same way restConnectorOption does.
172
172
  this.webhookMessageStartEventConnectorOption = page
173
173
  .locator('.djs-popup-results')
174
174
  .locator('[data-id="replace.template-io.camunda.connectors.webhook.WebhookConnectorStartMessage.v1"]');
@@ -179,10 +179,9 @@ class ModelerCreatePage {
179
179
  this.implementationSection = page.locator('[data-group-id="group-userTaskImplementation"]');
180
180
  this.implementationOptions = page.locator('#bio-properties-panel-userTaskImplementation');
181
181
  this.assignmentSection = page.locator('[data-group-id="group-assignmentDefinition"]');
182
- // The user-task priority field renders as `<input type="number">`, whose
183
- // ARIA role is `spinbutton`, not `textbox`. Its id is also what separates it
184
- // from the "Job priority" group's `jobPriorityDefinitionPriority` field,
185
- // which any name-based query matches as well.
182
+ // The user-task priority entry renders as <input type="number">, whose ARIA
183
+ // role is spinbutton, not textbox so a textbox role query never resolves.
184
+ // Target it by its stable properties-panel entry id instead.
186
185
  this.priorityInput = page.locator('#bio-properties-panel-priorityDefinitionPriority');
187
186
  this.appendElementButton = page
188
187
  .locator('[class="djs-context-pad open"]')
@@ -1007,6 +1006,9 @@ class ModelerCreatePage {
1007
1006
  }
1008
1007
  }
1009
1008
  async expandAssignmentSection() {
1009
+ // Scoped to assignmentSection already, so the group-id must not be repeated
1010
+ // here: a self-nested selector never matches, the guard always reads
1011
+ // "collapsed" and the click then toggles an open section shut.
1010
1012
  const isExpanded = (await this.assignmentSection
1011
1013
  .locator('.bio-properties-panel-group-header.open')
1012
1014
  .count()) > 0;
@@ -1042,6 +1044,9 @@ class ModelerCreatePage {
1042
1044
  await this.priorityInput.click();
1043
1045
  }
1044
1046
  catch (error) {
1047
+ // Re-expand through the guard rather than clicking the section header
1048
+ // directly — a bare click toggles an already-open section shut and takes
1049
+ // the priority entry out of the DOM for the retry below.
1045
1050
  await this.expandAssignmentSection();
1046
1051
  await this.priorityInput.click({ timeout: 60000 });
1047
1052
  }
@@ -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.896",
3
+ "version": "0.0.898",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",