@camunda/e2e-test-suite 0.0.640 → 0.0.642

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.
@@ -91,14 +91,45 @@ class Authorization {
91
91
  await this.createAuthorizationOwnerTypeCombobox.click();
92
92
  await this.createAuthorizationOwnerTypeOption(authorization.ownerType).click();
93
93
  await this.createAuthorizationOwnerComboBox.click();
94
- await (0, test_1.expect)(this.createAuthorizationOwnerOption(authorization.ownerId)).toBeVisible({
95
- timeout: 30000,
96
- });
97
- await this.createAuthorizationOwnerOption(authorization.ownerId).click({
98
- timeout: 30000,
99
- });
100
- await this.createAuthorizationResourceTypeDropdown.click();
101
- await this.createAuthorizationResourceTypeOption(authorization.resourceType).click({ timeout: 30000, force: true });
94
+ // Carbon's owner combobox is a Downshift-driven ComboBox. The form's
95
+ // Resource type combobox is gated on Downshift's `selectedItem`
96
+ // state, NOT on the input's `value` attribute. To commit
97
+ // `selectedItem` we must click the active menu item — i.e. the
98
+ // element with class `.cds--list-box__menu-item` inside the open
99
+ // dropdown.
100
+ //
101
+ // The previous `getByRole('option', {name, exact: true})` locator
102
+ // matched a role=option element but the click did not fire
103
+ // Downshift's `onSelectedItemChange` (frame snapshot from run
104
+ // 26632778543 shows the input value populated but Resource type
105
+ // still disabled). Scoping to the Carbon menu-item class — the same
106
+ // approach used in the product repo's qa-suite
107
+ // (camunda/camunda qa/c8-orchestration-cluster-e2e-test-suite/
108
+ // pages/IdentityAuthorizationsPage.ts selectAuthorizationOwner) —
109
+ // selects the actual Downshift menu item and fires the handler.
110
+ const ownerSearchInput = this.createAuthorizationModal.getByPlaceholder('Search by owner ID');
111
+ if (await ownerSearchInput.isVisible({ timeout: 5000 }).catch(() => false)) {
112
+ await ownerSearchInput.fill(authorization.ownerId);
113
+ }
114
+ const ownerMenuItem = this.createAuthorizationModal
115
+ .locator('.cds--list-box__menu-item')
116
+ .filter({ hasText: authorization.ownerId })
117
+ .first();
118
+ await (0, test_1.expect)(ownerMenuItem).toBeVisible({ timeout: 60000 });
119
+ await ownerMenuItem.click({ timeout: 20000 });
120
+ // Resource type is pre-filled and locked starting with the Identity
121
+ // commit camunda/camunda 8c72d29 (2026-05-26, "fix: prefill and lock
122
+ // resource type in create authorization modal"). The modal now
123
+ // initializes `resourceType` to whatever tab the user opened the
124
+ // modal from (the test calls clickResourceTab/clickComponentTab/etc.
125
+ // before createAuthorization), and the Dropdown is rendered with a
126
+ // hardcoded `disabled` prop — see
127
+ // identity/client/src/pages/authorizations/modals/add-modal/AddModal.tsx
128
+ // line ~184. There is no test-side interaction that can enable it,
129
+ // and no interaction is needed: the form already has the right
130
+ // value. Skip the dropdown click entirely. (8.9 still uses the older
131
+ // unlocked Dropdown, which is why its same-shaped page object
132
+ // continues to pass.)
102
133
  await this.createAuthorizationResourceIdField.fill(authorization.resourceId);
103
134
  for (const permission of authorization.accessPermissions) {
104
135
  await this.createAuthorizationAccessPermission(permission).click({
@@ -91,21 +91,19 @@ class IdentityHomePage {
91
91
  }
92
92
  async selectOptionFromDropdown(option) {
93
93
  // The Identity "Assign permissions to application" dialog renders the
94
- // API list as a Carbon Dropdown rather than a native <select>. Using
95
- // Locator.selectOption() on the underlying `select` updates the form
96
- // value but does NOT trigger the Carbon component's React state, so
97
- // the dropdown stays open and the write/read permission checkboxes
98
- // are never rendered (observed in nightly run 26612986585 the
99
- // dropdown popup was still expanded when the test timed out waiting
100
- // for the `write:*` label).
94
+ // API list as a Carbon Select, which wraps a NATIVE <select> with native
95
+ // <option class="cds--select-option"> children. Native <option> elements
96
+ // are never "visible" to Playwright (the browser draws the option list as
97
+ // an OS-level widget, not as visible DOM), so clicking one via
98
+ // getByRole('option').click() always times out waiting for visibility
99
+ // observed in nightly run 26731057113, where the option resolved but the
100
+ // click never succeeded ("element is not visible").
101
101
  //
102
- // Open the dropdown and click the option from the listbox so the
103
- // Carbon handler fires, the popup closes, and the form re-renders
104
- // with the permission rows.
105
- await this.select.click();
106
- await this.page
107
- .getByRole('option', { name: option, exact: true })
108
- .click({ timeout: 10000 });
102
+ // Locator.selectOption() is the correct primitive for a native <select>:
103
+ // it sets the value and dispatches the `input`/`change` events that
104
+ // Carbon's onChange handler listens for, closing the picker and
105
+ // re-rendering the form with the write/read permission rows.
106
+ await this.select.selectOption({ label: option });
109
107
  await (0, sleep_1.sleep)(1000);
110
108
  }
111
109
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.640",
3
+ "version": "0.0.642",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",