@camunda/e2e-test-suite 0.0.1068 → 0.0.1070

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.
@@ -1430,7 +1430,18 @@ class ModelerCreatePage {
1430
1430
  // still about to appear. ConfigureTestPanel returns null for as long as the
1431
1431
  // overlay is up, so the Start button never existed and
1432
1432
  // clickStartInstanceButton burned its entire retry budget looking for it.
1433
- const configurationOverlay = this.page.locator('[data-test="play-configuration-overlay"]');
1433
+ // camunda-hub's "Play" -> "Test Studio" rebrand renamed this container's
1434
+ // data-test from `play-configuration-overlay` to
1435
+ // `test-studio-configuration-overlay` (confirmed in a failing run's trace
1436
+ // DOM, and already fixed the same way in pages/SM-8.10). Anchor on the
1437
+ // new data-test, keep the legacy attribute for older modeler builds, and
1438
+ // fall back to the "Setup environment" panel title. This locator means
1439
+ // "the setup panel is still on screen".
1440
+ const configurationOverlay = this.page
1441
+ .locator('[data-test="test-studio-configuration-overlay"]')
1442
+ .or(this.page.locator('[data-test="play-configuration-overlay"]'))
1443
+ .or(this.page.getByText('Setup environment'))
1444
+ .first();
1434
1445
  const configureTestPanel = this.page.getByTestId('configure-test-panel');
1435
1446
  await (0, test_1.expect)(configurationOverlay
1436
1447
  .or(this.continueToPlayButton)
@@ -1236,7 +1236,18 @@ class ModelerCreatePage {
1236
1236
  // still about to appear. ConfigureTestPanel returns null for as long as the
1237
1237
  // overlay is up, so the Start button never existed and
1238
1238
  // clickStartInstanceButton burned its entire retry budget looking for it.
1239
- const configurationOverlay = this.page.locator('[data-test="play-configuration-overlay"]');
1239
+ // camunda-hub's "Play" -> "Test Studio" rebrand renamed this container's
1240
+ // data-test from `play-configuration-overlay` to
1241
+ // `test-studio-configuration-overlay` (confirmed in a failing run's trace
1242
+ // DOM, and already fixed the same way in pages/SM-8.10). Anchor on the
1243
+ // new data-test, keep the legacy attribute for older modeler builds, and
1244
+ // fall back to the "Setup environment" panel title. This locator means
1245
+ // "the setup panel is still on screen".
1246
+ const configurationOverlay = this.page
1247
+ .locator('[data-test="test-studio-configuration-overlay"]')
1248
+ .or(this.page.locator('[data-test="play-configuration-overlay"]'))
1249
+ .or(this.page.getByText('Setup environment'))
1250
+ .first();
1240
1251
  const configureTestPanel = this.page.getByTestId('configure-test-panel');
1241
1252
  await (0, test_1.expect)(configurationOverlay
1242
1253
  .or(this.continueToPlayButton)
@@ -1427,7 +1427,18 @@ class ModelerCreatePage {
1427
1427
  // still about to appear. ConfigureTestPanel returns null for as long as the
1428
1428
  // overlay is up, so the Start button never existed and
1429
1429
  // clickStartInstanceButton burned its entire retry budget looking for it.
1430
- const configurationOverlay = this.page.locator('[data-test="play-configuration-overlay"]');
1430
+ // camunda-hub's "Play" -> "Test Studio" rebrand renamed this container's
1431
+ // data-test from `play-configuration-overlay` to
1432
+ // `test-studio-configuration-overlay` (confirmed in a failing run's trace
1433
+ // DOM, and already fixed the same way in pages/SM-8.10). Anchor on the
1434
+ // new data-test, keep the legacy attribute for older modeler builds, and
1435
+ // fall back to the "Setup environment" panel title. This locator means
1436
+ // "the setup panel is still on screen".
1437
+ const configurationOverlay = this.page
1438
+ .locator('[data-test="test-studio-configuration-overlay"]')
1439
+ .or(this.page.locator('[data-test="play-configuration-overlay"]'))
1440
+ .or(this.page.getByText('Setup environment'))
1441
+ .first();
1431
1442
  const configureTestPanel = this.page.getByTestId('configure-test-panel');
1432
1443
  await (0, test_1.expect)(configurationOverlay
1433
1444
  .or(this.continueToPlayButton)
@@ -1362,7 +1362,18 @@ class ModelerCreatePage {
1362
1362
  // still about to appear. ConfigureTestPanel returns null for as long as the
1363
1363
  // overlay is up, so the Start button never existed and
1364
1364
  // clickStartInstanceButton burned its entire retry budget looking for it.
1365
- const configurationOverlay = this.page.locator('[data-test="play-configuration-overlay"]');
1365
+ // camunda-hub's "Play" -> "Test Studio" rebrand renamed this container's
1366
+ // data-test from `play-configuration-overlay` to
1367
+ // `test-studio-configuration-overlay` (confirmed in this failing run's
1368
+ // trace DOM, and already fixed the same way in pages/SM-8.10). Anchor on
1369
+ // the new data-test, keep the legacy attribute for older modeler builds,
1370
+ // and fall back to the "Setup environment" panel title. This locator
1371
+ // means "the setup panel is still on screen".
1372
+ const configurationOverlay = this.page
1373
+ .locator('[data-test="test-studio-configuration-overlay"]')
1374
+ .or(this.page.locator('[data-test="play-configuration-overlay"]'))
1375
+ .or(this.page.getByText('Setup environment'))
1376
+ .first();
1366
1377
  const configureTestPanel = this.page.getByTestId('configure-test-panel');
1367
1378
  await (0, test_1.expect)(configurationOverlay
1368
1379
  .or(this.continueToPlayButton)
@@ -43,6 +43,7 @@ declare class OCIdentityRolesPage {
43
43
  }): Promise<void>;
44
44
  private isRolesListOpen;
45
45
  private openRolesList;
46
+ private recoverToRolesList;
46
47
  clickAdminRole(): Promise<void>;
47
48
  assignUserToRole(userId: string): Promise<void>;
48
49
  clickAssignUserButton(): Promise<void>;
@@ -6,7 +6,7 @@ const UtilitiesPage_1 = require("../SM-8.10/UtilitiesPage");
6
6
  const expectLocatorWithPagination_1 = require("../../utils/assertionHelpers/expectLocatorWithPagination");
7
7
  const findLocatorWithPagination_1 = require("../../utils/assertionHelpers/findLocatorWithPagination");
8
8
  const submitModalWithRetry_1 = require("../../utils/assertionHelpers/submitModalWithRetry");
9
- const sleep_1 = require("../../utils/sleep");
9
+ const SEARCH_MAPPING_RULE_LABEL = /^(Search by mapping rule ID|searchByMappingRuleId)$/;
10
10
  class OCIdentityRolesPage {
11
11
  page;
12
12
  selectResourceTypeTab;
@@ -53,11 +53,14 @@ class OCIdentityRolesPage {
53
53
  // (role="combobox"), not the searchbox the pre design-system modal
54
54
  // rendered; the Mapping rules list page keeps a page-level searchbox with
55
55
  // the same accessible name, so scope this to the dialog and accept either
56
- // role.
56
+ // role. The modal's field resolves its placeholder through the
57
+ // `entitySelection` i18n namespace, which carries no `searchByMappingRuleId`
58
+ // entry, so it is labelled with the raw key instead of the translated
59
+ // string the list page renders - match either form.
57
60
  this.mappingSearchBox = this.assignMappingModal
58
- .getByRole('combobox', { name: 'Search by mapping rule ID' })
61
+ .getByRole('combobox', { name: SEARCH_MAPPING_RULE_LABEL })
59
62
  .or(this.assignMappingModal.getByRole('searchbox', {
60
- name: 'Search by mapping rule ID',
63
+ name: SEARCH_MAPPING_RULE_LABEL,
61
64
  }))
62
65
  .first();
63
66
  this.createRoleButton = page.getByRole('button', {
@@ -145,8 +148,7 @@ class OCIdentityRolesPage {
145
148
  .catch(() => false);
146
149
  if (gotNotFound) {
147
150
  console.warn(`Attempt ${attempt + 1}: Role detail page returned 404 for "${roleId}", retrying...`);
148
- await this.page.goBack();
149
- await (0, sleep_1.sleep)(3000);
151
+ await this.recoverToRolesList();
150
152
  continue;
151
153
  }
152
154
  await this.clickMappingRulesTab();
@@ -157,9 +159,13 @@ class OCIdentityRolesPage {
157
159
  await (0, test_1.expect)(this.assignMappingModal).toBeVisible({ timeout: 60000 });
158
160
  // The design-system search input is a cmdk combobox that only issues
159
161
  // its server-side query on real keystrokes, so type the id in rather
160
- // than setting the value in one shot.
161
- await this.mappingSearchBox.click();
162
- await this.mappingSearchBox.pressSequentially(mappingId);
162
+ // than setting the value in one shot. Budgeted like every other step
163
+ // here rather than inheriting the 10s actionTimeout: the field mounts
164
+ // with the dialog it was just asserted visible in.
165
+ await this.mappingSearchBox.click({ timeout: 60000 });
166
+ await this.mappingSearchBox.pressSequentially(mappingId, {
167
+ timeout: 60000,
168
+ });
163
169
  await this.assignMappingRuleOption(mappingId).click({ timeout: 30000 });
164
170
  await this.assignMappingModalAssignRuleButton.click();
165
171
  return;
@@ -167,8 +173,7 @@ class OCIdentityRolesPage {
167
173
  catch (error) {
168
174
  if (attempt < maxRetries - 1) {
169
175
  console.warn(`Attempt ${attempt + 1} failed to assign mapping rule to role "${roleId}". Retrying...`);
170
- await this.page.goBack();
171
- await (0, sleep_1.sleep)(2000);
176
+ await this.recoverToRolesList();
172
177
  }
173
178
  else {
174
179
  throw error;
@@ -249,6 +254,28 @@ class OCIdentityRolesPage {
249
254
  await this.rolesNavTab.click({ timeout });
250
255
  await (0, test_1.expect)(this.createRoleButton.first()).toBeVisible({ timeout });
251
256
  }
257
+ // `page.goBack()` is one history entry, and the role detail page's tab routes
258
+ // are entries of their own, so backing out of a failed assign-mapping step
259
+ // landed on the same role's Users tab - where the next attempt's roles-table
260
+ // lookup could only time out. Re-enter the list through the nav instead, and
261
+ // dismiss the dialog first: an open design-system dialog sets
262
+ // `pointer-events: none` on the body, which makes the nav link unclickable.
263
+ async recoverToRolesList() {
264
+ const modalOpen = await this.assignMappingModal
265
+ .isVisible()
266
+ .catch(() => false);
267
+ if (modalOpen) {
268
+ await this.page.keyboard.press('Escape');
269
+ const closed = await this.assignMappingModal
270
+ .waitFor({ state: 'hidden', timeout: 15000 })
271
+ .then(() => true)
272
+ .catch(() => false);
273
+ if (!closed) {
274
+ await this.page.reload({ waitUntil: 'domcontentloaded' });
275
+ }
276
+ }
277
+ await this.openRolesList(60000);
278
+ }
252
279
  async clickAdminRole() {
253
280
  // The roles table is fetched after the Roles tab click, and other specs in
254
281
  // the nightly add roles that can push `admin` onto a later page, so a bare
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1068",
3
+ "version": "0.0.1070",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",