@camunda/e2e-test-suite 0.0.1680 → 0.0.1681

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.
@@ -595,7 +595,23 @@ class ModelerHomePage {
595
595
  }
596
596
  await this.dismissOverlays();
597
597
  await this.diagramTypeDropdown.click({ timeout: 30000 });
598
- if (await this.becameVisible(this.formTemplateOption.or(this.bpmnTemplateOption).first(), 10000)) {
598
+ // Race the two mutually-exclusive menu variants instead of probing only
599
+ // for the resource items. This menu can take tens of seconds to populate
600
+ // on int, and the old fixed 10s probe returned false whenever the
601
+ // resources menu was merely slow -- sending the flow down the root
602
+ // process-application path, a dead end here, since a project that already
603
+ // holds resources never offers "Process application" in this menu. Wait
604
+ // for whichever variant rendered, then branch on which one it was.
605
+ const resourceItems = this.formTemplateOption
606
+ .or(this.bpmnTemplateOption)
607
+ .first();
608
+ const rootItem = this.processApplicationPage.createProcessApplicationOption;
609
+ const menuReady = resourceItems.or(rootItem).first();
610
+ if (!(await this.becameVisible(menuReady, 45000))) {
611
+ await this.page.keyboard.press('Escape').catch(() => { });
612
+ return false;
613
+ }
614
+ if (await resourceItems.isVisible()) {
599
615
  return true;
600
616
  }
601
617
  // The root menu instead: close it so the process-application path below
@@ -102,7 +102,11 @@ class LoginPage {
102
102
  // console.* hostnames) embeds a hidden invite-user email input also labeled
103
103
  // "Email address" that would otherwise satisfy the locator below before the
104
104
  // auth0 redirect has had a chance to complete.
105
- await this.page.goto('/');
105
+ // Resolve on 'commit': with cookies cleared the Console immediately
106
+ // client-side redirects to Auth0, which interrupts a goto still waiting
107
+ // for 'load' ("is interrupted by another navigation"). The waitForURL
108
+ // below is what actually waits for that redirect.
109
+ await this.page.goto('/', { waitUntil: 'commit' });
106
110
  await this.page
107
111
  .waitForURL((url) => !url.hostname.includes('console'), { timeout: 60000 })
108
112
  .catch(() => { });
@@ -25,6 +25,7 @@ export declare class OCIdentityGroupsPage {
25
25
  readonly emptyState: Locator;
26
26
  readonly assignUserButton: Locator;
27
27
  readonly searchBox: Locator;
28
+ readonly groupSearchInput: Locator;
28
29
  readonly assignUserButtonModal: Locator;
29
30
  readonly selectGroupRow: (name: string) => Locator;
30
31
  readonly groupCell: (name: string) => Locator;
@@ -30,6 +30,7 @@ class OCIdentityGroupsPage {
30
30
  emptyState;
31
31
  assignUserButton;
32
32
  searchBox;
33
+ groupSearchInput;
33
34
  assignUserButtonModal;
34
35
  selectGroupRow;
35
36
  groupCell;
@@ -97,6 +98,7 @@ class OCIdentityGroupsPage {
97
98
  this.emptyState = page.getByText('No groups created yet');
98
99
  this.assignUserButton = page.getByRole('button', { name: 'Assign user' });
99
100
  this.searchBox = page.getByTitle('Username');
101
+ this.groupSearchInput = page.getByPlaceholder('Search by group ID');
100
102
  this.assignUserButtonModal = page
101
103
  .getByLabel('Assign user')
102
104
  .getByRole('button', { name: 'Assign user' });
@@ -105,17 +107,29 @@ class OCIdentityGroupsPage {
105
107
  await (0, test_1.expect)(this.createGroupButton).toBeVisible({ timeout: 10000 });
106
108
  await this.createGroupButton.click();
107
109
  await (0, test_1.expect)(this.createGroupIdField).toBeVisible({ timeout: 10000 });
108
- await this.createGroupIdField.click();
109
- await this.createGroupIdField.fill(groupId);
110
110
  await (0, test_1.expect)(this.createNameField).toBeVisible({ timeout: 10000 });
111
- await this.createNameField.click();
112
- await this.createNameField.fill(groupName);
111
+ // The modal's react-hook-form inputs can drop a value typed while the
112
+ // dialog is still settling (nightly: Group ID filled, then submitted
113
+ // empty -> "Group ID is required"). Re-fill until both values stick.
114
+ await (0, test_1.expect)(async () => {
115
+ await this.createGroupIdField.click();
116
+ await this.createGroupIdField.fill(groupId);
117
+ await this.createNameField.click();
118
+ await this.createNameField.fill(groupName);
119
+ await (0, test_1.expect)(this.createGroupIdField).toHaveValue(groupId, {
120
+ timeout: 2000,
121
+ });
122
+ await (0, test_1.expect)(this.createNameField).toHaveValue(groupName, {
123
+ timeout: 2000,
124
+ });
125
+ }).toPass({ timeout: 30000 });
113
126
  if (description) {
114
127
  await (0, test_1.expect)(this.createDescriptionField).toBeVisible({ timeout: 10000 });
115
128
  await this.createDescriptionField.fill(description);
116
129
  }
130
+ await (0, test_1.expect)(this.createGroupIdField).toHaveValue(groupId);
117
131
  await this.createGroupModalCreateButton.click();
118
- await (0, test_1.expect)(this.createGroupModal).toBeHidden();
132
+ await (0, test_1.expect)(this.createGroupModal).toBeHidden({ timeout: 15000 });
119
133
  }
120
134
  async editGroup(currentName, newName, newDescription) {
121
135
  await this.editGroupButton(currentName).click();
@@ -141,6 +155,11 @@ class OCIdentityGroupsPage {
141
155
  const retryDelay = 5000;
142
156
  for (let attempt = 1; attempt <= maxRetries; attempt++) {
143
157
  try {
158
+ // The list renders only the first page of groups, so a freshly
159
+ // created group can be off-screen; filter by its ID first.
160
+ if (await this.groupSearchInput.isVisible().catch(() => false)) {
161
+ await this.groupSearchInput.fill(groupName);
162
+ }
144
163
  const groupRow = await this.selectGroupRow(groupName);
145
164
  await groupRow.click();
146
165
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1680",
3
+ "version": "0.0.1681",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",