@camunda/e2e-test-suite 0.0.665 → 0.0.666

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.
@@ -68,24 +68,46 @@ class IdentityHomePage {
68
68
  }
69
69
  }
70
70
  async assignPermissionToOperateAPI() {
71
+ // The Operate API now exposes its permission scopes as `read` / `write`
72
+ // (plus `read:users`) rather than the wildcard `read:*` / `write:*` the
73
+ // shared writePermissionCell/readPermissionCheckBox locators target — those
74
+ // wildcards still exist for the Tasklist API, so they stay untouched here.
75
+ // The dialog renders Carbon checkboxes labelled e.g. "write (Write
76
+ // permission)", and the assigned-permissions table renders the raw scope
77
+ // name (`read` / `write`) in a cell.
78
+ const operateWritePermissionCell = this.page.getByRole('cell', {
79
+ name: 'write',
80
+ exact: true,
81
+ });
82
+ const operateReadPermissionCell = this.page.getByRole('cell', {
83
+ name: 'read',
84
+ exact: true,
85
+ });
86
+ const operateWriteCheckBox = this.page.getByRole('checkbox', {
87
+ name: 'write (Write permission)',
88
+ });
89
+ const operateReadCheckBox = this.page.getByRole('checkbox', {
90
+ name: 'read (Read permission)',
91
+ exact: true,
92
+ });
71
93
  await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.operateCell);
72
94
  await this.operateCell.click();
73
95
  await this.accessToAPIsTab.click();
74
96
  await (0, sleep_1.sleep)(2000);
75
- if ((await this.writePermissionCell.isVisible()) &&
76
- (await this.readPermissionCell.isVisible())) {
97
+ if ((await operateWritePermissionCell.isVisible()) &&
98
+ (await operateReadPermissionCell.isVisible())) {
77
99
  console.log('Permissions already assigned to Operate API');
78
100
  }
79
101
  else {
80
102
  await this.assignPermissionsButton.click();
81
103
  await this.selectOptionFromDropdown('Operate API');
82
104
  await (0, test_1.expect)(this.dialog).toBeVisible();
83
- await this.writePermissionCheckBox.waitFor({ state: 'visible' });
84
- await this.writePermissionCheckBox.click();
85
- await this.readPermissionCheckBox.click();
105
+ await operateWriteCheckBox.waitFor({ state: 'visible' });
106
+ await operateWriteCheckBox.click();
107
+ await operateReadCheckBox.click();
86
108
  await this.addButton.click();
87
- await (0, test_1.expect)(this.permissionCell('write:*')).toBeVisible();
88
- await (0, test_1.expect)(this.permissionCell('read:*')).toBeVisible();
109
+ await (0, test_1.expect)(operateWritePermissionCell).toBeVisible();
110
+ await (0, test_1.expect)(operateReadPermissionCell).toBeVisible();
89
111
  await (0, sleep_1.sleep)(5000);
90
112
  }
91
113
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.665",
3
+ "version": "0.0.666",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",