@camunda/e2e-test-suite 0.0.1294 → 0.0.1295

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.
Files changed (34) hide show
  1. package/dist/pages/8.10/AppsPage.d.ts +7 -3
  2. package/dist/pages/8.10/AppsPage.js +166 -49
  3. package/dist/pages/8.10/ClusterDetailsPage.d.ts +2 -0
  4. package/dist/pages/8.10/ClusterDetailsPage.js +49 -2
  5. package/dist/pages/8.10/ClusterSecretsPage.js +5 -1
  6. package/dist/pages/8.10/ConnectorMarketplacePage.d.ts +6 -0
  7. package/dist/pages/8.10/ConnectorMarketplacePage.js +107 -1
  8. package/dist/pages/8.10/ConsoleOrganizationPage.d.ts +3 -2
  9. package/dist/pages/8.10/ConsoleOrganizationPage.js +64 -27
  10. package/dist/pages/8.10/FormJsPage.js +36 -18
  11. package/dist/pages/8.10/IdpCreatePage.js +6 -2
  12. package/dist/pages/8.10/ModelerCreatePage.d.ts +8 -0
  13. package/dist/pages/8.10/ModelerCreatePage.js +316 -40
  14. package/dist/pages/8.10/ModelerHomePage.d.ts +10 -0
  15. package/dist/pages/8.10/ModelerHomePage.js +165 -55
  16. package/dist/pages/8.10/OCIdentityClusterVariablesPage.js +3 -1
  17. package/dist/pages/8.10/OCIdentityHomePage.js +7 -3
  18. package/dist/pages/8.10/OptimizeHomePage.d.ts +0 -1
  19. package/dist/pages/8.10/OptimizeHomePage.js +10 -46
  20. package/dist/pages/8.10/PlayPage.js +9 -3
  21. package/dist/pages/8.10/ProcessApplicationPage.d.ts +1 -0
  22. package/dist/pages/8.10/ProcessApplicationPage.js +128 -6
  23. package/dist/pages/8.10/UtilitiesPage.js +44 -17
  24. package/dist/pages/8.10/WorkspaceMembersPage.d.ts +21 -0
  25. package/dist/pages/8.10/WorkspaceMembersPage.js +264 -0
  26. package/dist/resources/agentic_ai/ai-agent-chat-with-tools_gemini_vertex.bpmn +1 -1
  27. package/dist/tests/8.10/access-user-role-management.spec.js +142 -26
  28. package/dist/tests/8.10/idp-user-flows.spec.js +2 -1
  29. package/dist/tests/8.10/rba-enabled-v2-user-flows.spec.js +13 -4
  30. package/dist/tests/8.10/smoke-tests.spec.js +9 -25
  31. package/dist/tests/8.10/test-setup.spec.js +57 -4
  32. package/dist/tests/8.10/web-modeler-user-flows.spec.js +2 -1
  33. package/package.json +1 -1
  34. package/resources/agentic_ai/ai-agent-chat-with-tools_gemini_vertex.bpmn +1 -1
@@ -169,8 +169,13 @@ async function loginWithRetry(page, loginPage, testUser, timeout, maxRetries = 5
169
169
  // for the tab's whole lifetime; without clearing it here alongside
170
170
  // cookies/storage, a flow that logs a different user into the same
171
171
  // page could have getUserToken() return the PREVIOUS user's token.
172
- (0, consoleApiHelpers_1.resetHubBearerToken)(page);
172
+ // Listen from before Hub loads: an API helper called later on an idle
173
+ // Hub page would otherwise find no request carrying the token.
174
+ (0, consoleApiHelpers_1.observeBearerTokens)(page);
173
175
  await page.goto('about:blank');
176
+ // After about:blank: until then the previous user's Hub page can still
177
+ // send a request, and its token must not count for the new session.
178
+ (0, consoleApiHelpers_1.resetHubBearerToken)(page);
174
179
  await page
175
180
  .evaluate(() => {
176
181
  try {
@@ -611,6 +616,19 @@ async function runProcess(clusterName, page, modelerHomePage, modelerCreatePage,
611
616
  await (0, test_1.expect)(modelerCreatePage.viewProcessInstanceLink).toBeVisible({
612
617
  timeout: 60000,
613
618
  });
619
+ // camunda-hub 6813a7e (2026-09-25) made the "Instance started!" toast
620
+ // persistent (shouldPersist) whenever it carries the Operate action, so it
621
+ // no longer times out on its own. Close it via its "Dismiss" button, as
622
+ // pages/8.9 does.
623
+ const instanceStartedToast = page
624
+ .locator('[data-sonner-toast]')
625
+ .filter({ has: modelerCreatePage.viewProcessInstanceLink });
626
+ const dismissButton = instanceStartedToast.getByRole('button', {
627
+ name: 'Dismiss',
628
+ });
629
+ if (await dismissButton.isVisible().catch(() => false)) {
630
+ await dismissButton.click({ timeout: 10000 });
631
+ }
614
632
  await (0, test_1.expect)(modelerCreatePage.viewProcessInstanceLink).toBeHidden({
615
633
  timeout: 60000,
616
634
  });
@@ -746,24 +764,33 @@ async function clickInvitationLinkInEmail(page, id) {
746
764
  }
747
765
  exports.clickInvitationLinkInEmail = clickInvitationLinkInEmail;
748
766
  async function assertLatestAlertEmail(id, mailSlurp, processName, alertText) {
749
- const maxRetries = 5;
750
- for (let retries = 0; retries < maxRetries; retries++) {
751
- try {
752
- const email = await mailSlurp.waitForLatestEmail(id, 120000);
753
- if (email && email.body) {
754
- (0, test_1.expect)(email.body).toContain(processName);
755
- (0, test_1.expect)(email.body).toContain(alertText);
756
- return email.body;
757
- }
758
- else {
759
- throw new Error('Email or email body is null or undefined.');
767
+ // waitForLatestEmail returns the newest email at once when the inbox is not
768
+ // empty, so a second call on the same inbox re-reads the first alert email.
769
+ // Search the inbox for an email that carries the expected text instead.
770
+ // alert-distributor sends one email per batch, 60-70s after the batch's
771
+ // oldest incident, and retries a failed send every ~10s; delivery comes on
772
+ // top. Incidents more than ~60s apart split into separate emails, which the
773
+ // error lists as several "New Incidents: 1".
774
+ let body;
775
+ await (0, test_1.expect)(async () => {
776
+ const previews = await mailSlurp.getEmails(id, {
777
+ minCount: 1,
778
+ retryTimeout: 60000,
779
+ });
780
+ const seen = [];
781
+ for (const preview of previews) {
782
+ const email = await mailSlurp.getEmail(preview.id);
783
+ const text = email?.body ?? '';
784
+ if (text.includes(processName) && text.includes(alertText)) {
785
+ body = text;
786
+ return;
760
787
  }
788
+ seen.push(text.match(/New Incidents: \d+/)?.[0] ?? 'no incident count');
761
789
  }
762
- catch (error) {
763
- console.warn(`Click attempt ${retries + 1} failed: ${error}`);
764
- }
765
- }
766
- throw new Error(`Failed to get latest alert (${processName}) email for ${id} after ${maxRetries} attempts.`);
790
+ throw new Error(`No alert email for "${processName}" containing "${alertText}" in ` +
791
+ `inbox ${id} yet; emails present: [${seen.join(', ')}]`);
792
+ }).toPass({ timeout: 360000, intervals: [5000, 10000, 20000] });
793
+ return body;
767
794
  }
768
795
  exports.assertLatestAlertEmail = assertLatestAlertEmail;
769
796
  async function assertTestUsesCorrectOrganization(page) {
@@ -0,0 +1,21 @@
1
+ import { Page, Locator } from '@playwright/test';
2
+ type WorkspaceRole = 'Workspace Admin' | 'Editor' | 'Commenter' | 'Viewer';
3
+ declare class WorkspaceMembersPage {
4
+ private page;
5
+ readonly membersTab: Locator;
6
+ readonly manageMembersHeading: Locator;
7
+ readonly addMembersButton: Locator;
8
+ readonly addMemberSearchbox: Locator;
9
+ readonly addMemberSubmitButton: Locator;
10
+ constructor(page: Page);
11
+ showAllWorkspaces(): Promise<void>;
12
+ openManageMembers(workspaceName: string): Promise<void>;
13
+ workspaceId(): string;
14
+ private memberRow;
15
+ isMember(email: string): Promise<boolean>;
16
+ addMember(email: string, role: WorkspaceRole): Promise<void>;
17
+ private selectRoleIn;
18
+ setMemberRole(email: string, role: WorkspaceRole): Promise<void>;
19
+ removeMember(email: string): Promise<void>;
20
+ }
21
+ export { WorkspaceMembersPage, WorkspaceRole };
@@ -0,0 +1,264 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkspaceMembersPage = void 0;
4
+ const test_1 = require("@playwright/test");
5
+ // Camunda Hub's workspace "Manage members" view: Members / Environments /
6
+ // General tabs over a member table of Name | Email | Workspace role | Joined,
7
+ // an "Add members" panel, and a role cell that becomes a select once clicked.
8
+ //
9
+ // This page matters to the role flows because an organization role alone no
10
+ // longer decides what a non-admin can reach. Since camunda-hub's environments
11
+ // work, an environment -- and so the cluster app behind it -- is visible only
12
+ // to a user who is Editor or Workspace Admin on a workspace it is assigned to
13
+ // (pdp-3715); organization admins and owners see every environment.
14
+ class WorkspaceMembersPage {
15
+ page;
16
+ membersTab;
17
+ manageMembersHeading;
18
+ addMembersButton;
19
+ addMemberSearchbox;
20
+ addMemberSubmitButton;
21
+ constructor(page) {
22
+ this.page = page;
23
+ this.membersTab = page.getByRole('tab', { name: 'Members' });
24
+ this.manageMembersHeading = page.getByRole('heading', {
25
+ name: 'Manage members',
26
+ });
27
+ this.addMembersButton = page
28
+ .locator('[data-test="add-members-button"]')
29
+ .or(page.getByRole('button', { name: 'Add members' }))
30
+ .first();
31
+ // A cmdk combobox: <input cmdk-input role="combobox"
32
+ // aria-label="Search members" placeholder="Search members or enter an
33
+ // email to invite">. Prefer the accessible name over the placeholder,
34
+ // which is the longer and more churn-prone of the two.
35
+ this.addMemberSearchbox = page
36
+ .getByRole('combobox', { name: 'Search members' })
37
+ .or(page.getByPlaceholder('Search members or enter an email to invite'))
38
+ .first();
39
+ // `exact` matters: the panel's own trigger is "Add members", which a
40
+ // substring match on "Add" would also resolve.
41
+ this.addMemberSubmitButton = page.getByRole('button', {
42
+ name: 'Add',
43
+ exact: true,
44
+ });
45
+ }
46
+ // Hub's Workspaces overview defaults to "My workspaces" -- only the ones the
47
+ // current user is an explicit member of -- and resets to it on every load,
48
+ // so a workspace created by another user is invisible until the scope is
49
+ // widened. The empty state offers an explicit button; the populated view
50
+ // offers the filter instead. A no-op where neither is rendered.
51
+ async showAllWorkspaces() {
52
+ const switchButton = this.page.getByRole('button', {
53
+ name: 'Switch to All workspaces',
54
+ });
55
+ const scopeFilter = this.page.getByRole('combobox', {
56
+ name: 'Filter workspaces',
57
+ });
58
+ const appeared = await switchButton
59
+ .or(scopeFilter)
60
+ .first()
61
+ .waitFor({ state: 'visible', timeout: 15000 })
62
+ .then(() => true)
63
+ .catch(() => false);
64
+ if (!appeared) {
65
+ return;
66
+ }
67
+ if (await switchButton.isVisible().catch(() => false)) {
68
+ await switchButton.click({ timeout: 10000 });
69
+ await (0, test_1.expect)(switchButton).toBeHidden({ timeout: 10000 });
70
+ return;
71
+ }
72
+ if ((await scopeFilter.innerText()).includes('All workspaces')) {
73
+ return;
74
+ }
75
+ await scopeFilter.click({ timeout: 10000 });
76
+ await this.page
77
+ .getByRole('option', { name: 'All workspaces' })
78
+ .click({ timeout: 10000 });
79
+ await (0, test_1.expect)(scopeFilter).toContainText('All workspaces', {
80
+ timeout: 10000,
81
+ });
82
+ }
83
+ async openManageMembers(workspaceName) {
84
+ // `.first()`: an org can hold several workspaces sharing a name -- the
85
+ // nightly's environments card lists "Cross Component Test Project" twice
86
+ // -- and an unqualified match is then a strict-mode violation.
87
+ const manageButton = this.page
88
+ .getByRole('button', { name: `Manage workspace ${workspaceName}` })
89
+ .first();
90
+ // Keep Hub's default "My workspaces" scope, which is what a real user
91
+ // sees, and widen only when the target is not in it -- e.g. it was
92
+ // created by another user and this one holds no explicit membership.
93
+ const visibleUnderDefaultScope = await manageButton
94
+ .waitFor({ state: 'visible', timeout: 15000 })
95
+ .then(() => true)
96
+ .catch(() => false);
97
+ if (!visibleUnderDefaultScope) {
98
+ await this.showAllWorkspaces();
99
+ }
100
+ await (0, test_1.expect)(manageButton).toBeVisible({ timeout: 60000 });
101
+ await manageButton.click({ timeout: 30000 });
102
+ await (0, test_1.expect)(this.manageMembersHeading).toBeVisible({ timeout: 60000 });
103
+ if ((await this.membersTab
104
+ .getAttribute('aria-selected')
105
+ .catch(() => null)) !== 'true') {
106
+ await this.membersTab.click({ timeout: 30000 });
107
+ }
108
+ }
109
+ // Valid once openManageMembers has landed on /workspaces/<id>/manage.
110
+ workspaceId() {
111
+ const id = this.page.url().match(/\/workspaces\/([^/?#]+)\/manage/)?.[1];
112
+ if (!id) {
113
+ throw new Error(`Not on a workspace Manage page, cannot read its id: ${this.page.url()}`);
114
+ }
115
+ return decodeURIComponent(id);
116
+ }
117
+ memberRow(email) {
118
+ return this.page.getByRole('row').filter({ hasText: email }).first();
119
+ }
120
+ async isMember(email) {
121
+ return this.memberRow(email)
122
+ .waitFor({ state: 'visible', timeout: 15000 })
123
+ .then(() => true)
124
+ .catch(() => false);
125
+ }
126
+ // Adds a user who is not on the member list yet. The panel is collapsed
127
+ // until its trigger is clicked, and its own "Workspace role" select already
128
+ // defaults to Editor, so it is only driven when a different role is wanted.
129
+ async addMember(email, role) {
130
+ await this.addMembersButton.click({ timeout: 30000 });
131
+ await (0, test_1.expect)(this.addMemberSearchbox).toBeVisible({ timeout: 30000 });
132
+ await this.addMemberSearchbox.click({ timeout: 30000 });
133
+ await this.addMemberSearchbox.fill(email);
134
+ // An org member shows up as a pickable result; picking it is what enables
135
+ // the submit. Typing alone leaves an invite-by-email candidate that some
136
+ // builds require to be committed the same way.
137
+ // cmdk renders its results as [cmdk-item] nodes with role="option",
138
+ // filtered live against what was typed.
139
+ const result = this.page
140
+ .getByRole('option', { name: new RegExp(escapeRegExp(email), 'i') })
141
+ .or(this.page.locator('[cmdk-item]').filter({ hasText: email }))
142
+ .first();
143
+ // The result list is a multi-select, and its checkbox is NOT a checkbox:
144
+ // a trace of the live DOM shows each row as
145
+ // <div cmdk-item role="option" data-staged="false" aria-selected="true">
146
+ // <svg aria-hidden="true"><rect .../></svg> <div>name / email</div>
147
+ // so getByRole('checkbox') matches nothing, and clicking the row only
148
+ // sets cmdk's highlight -- aria-selected and data-selected both read
149
+ // "true" while data-staged stays "false" and "Add" stays disabled.
150
+ // Click the leading svg, which is the box itself, and gate on the one
151
+ // attribute that actually tracks the pick.
152
+ await (0, test_1.expect)(result).toBeVisible({ timeout: 30000 });
153
+ // Neither the row nor its box can be clicked into a staged state: the box
154
+ // is a decorative svg the design system gives `pointer-events: none`, so
155
+ // that click lands on the row, and a row click only moves cmdk's
156
+ // highlight -- across three live runs `data-staged` never left "false"
157
+ // while `aria-selected` read "true" and "Add" stayed disabled. The
158
+ // list's "Select all" control is what actually stages. It is a
159
+ // <button data-test="members-picker-select-all">, not a cmdk item, and
160
+ // its label is split across text nodes ("Select all (", "1", ")"), so it
161
+ // is addressed by its test id. The search box above has already been
162
+ // filled with this one address, so the guard below holds it to exactly
163
+ // the intended user rather than trusting the label's count.
164
+ const candidates = this.page
165
+ .locator('[cmdk-item]')
166
+ .filter({ hasText: email });
167
+ await (0, test_1.expect)(candidates).toHaveCount(1, { timeout: 15000 });
168
+ await this.page
169
+ .locator('[data-test="members-picker-select-all"]')
170
+ .click({ timeout: 15000 });
171
+ await (0, test_1.expect)(result).toHaveAttribute('data-staged', 'true', {
172
+ timeout: 15000,
173
+ });
174
+ if (role !== 'Editor') {
175
+ await this.selectRoleIn(this.page.getByRole('combobox', { name: 'Workspace role' }).first(), role);
176
+ }
177
+ await (0, test_1.expect)(this.addMemberSubmitButton).toBeEnabled({ timeout: 30000 });
178
+ await this.addMemberSubmitButton.click({ timeout: 30000 });
179
+ await (0, test_1.expect)(this.memberRow(email)).toBeVisible({ timeout: 60000 });
180
+ }
181
+ async selectRoleIn(control, role) {
182
+ await control.click({ timeout: 30000 });
183
+ await this.page
184
+ .getByRole('option', { name: role, exact: true })
185
+ .or(this.page.getByRole('menuitem', { name: role, exact: true }))
186
+ .first()
187
+ .click({ timeout: 30000 });
188
+ }
189
+ // Ensures the user holds `role` on this workspace, adding them first when
190
+ // they are not a member at all -- which is the usual case for a role flow,
191
+ // since the shared workspace is created by whichever setup user won the
192
+ // race and nobody else is added to it.
193
+ async setMemberRole(email, role) {
194
+ if (!(await this.isMember(email))) {
195
+ await this.addMember(email, role);
196
+ return;
197
+ }
198
+ const row = this.memberRow(email);
199
+ if ((await row.getByText(role, { exact: true }).count()) > 0) {
200
+ return;
201
+ }
202
+ // The role cell renders as a static pill until clicked, then becomes a
203
+ // select with its own confirm control; leaving it unconfirmed silently
204
+ // reverts the row to its previous role.
205
+ const roleControl = row
206
+ .getByRole('combobox')
207
+ .or(row.getByRole('button', {
208
+ name: /^(Workspace Admin|Editor|Commenter|Viewer)$/,
209
+ }))
210
+ .first();
211
+ await roleControl.click({ timeout: 30000 });
212
+ await this.selectRoleIn(roleControl, role);
213
+ // Clicked unconditionally, not behind an `isVisible()` probe: the
214
+ // confirmation is what persists the change, and the control can render a
215
+ // beat after the select. A probe would read `false` in that window, skip
216
+ // the click, and let the assertion below match the still-uncommitted
217
+ // value in the open editor just before the row reverts. Clicking outright
218
+ // makes Playwright wait for the control and fail here when it never
219
+ // arrives, rather than passing on an edit that was never saved.
220
+ await row
221
+ .getByRole('button', { name: /^(Confirm|Save|Apply|Update)$/i })
222
+ .or(row.locator('button[type="submit"]'))
223
+ .first()
224
+ .click({ timeout: 30000 });
225
+ await (0, test_1.expect)(row.getByText(role, { exact: true })).toBeVisible({
226
+ timeout: 60000,
227
+ });
228
+ }
229
+ // Undoes `setMemberRole`/`addMember`. Workspace membership is durable org
230
+ // state: left behind, it survives the test that granted it, so a Playwright
231
+ // retry starts with the user already an Editor and any assertion about the
232
+ // un-granted state fails on the second attempt. A no-op when the user is
233
+ // not on the list, so it is safe to call from teardown after a failure at
234
+ // any point in the flow.
235
+ async removeMember(email) {
236
+ if (!(await this.isMember(email))) {
237
+ return;
238
+ }
239
+ const row = this.memberRow(email);
240
+ // camunda-hub MembersTable.tsx: the row's icon trigger is
241
+ // aria-label="Actions for <name>", data-test="member-actions-trigger".
242
+ await row
243
+ .locator('[data-test="member-actions-trigger"]')
244
+ .or(row.getByRole('button', { name: /^Actions for / }))
245
+ .first()
246
+ .click({ timeout: 30000 });
247
+ await this.page
248
+ .getByRole('menuitem', { name: /^Remove( member)?$/i })
249
+ .or(this.page.getByRole('option', { name: /^Remove( member)?$/i }))
250
+ .first()
251
+ .click({ timeout: 30000 });
252
+ // RemoveMemberDialog.tsx is a Radix AlertDialog, i.e. role="alertdialog",
253
+ // which getByRole('dialog') does not match.
254
+ await this.page
255
+ .getByRole('alertdialog', { name: 'Remove member' })
256
+ .getByRole('button', { name: 'Remove', exact: true })
257
+ .click({ timeout: 30000 });
258
+ await (0, test_1.expect)(row).toBeHidden({ timeout: 60000 });
259
+ }
260
+ }
261
+ exports.WorkspaceMembersPage = WorkspaceMembersPage;
262
+ function escapeRegExp(value) {
263
+ return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
264
+ }
@@ -43,7 +43,7 @@
43
43
  source="You are a helpful, generic chat agent which can answer a wide amount of questions based on your knowledge and an optional set of available tools.&#10;&#10;If tools are provided, you should prefer them instead of guessing an answer. You can call the same tool multiple times by providing different input values. Don&#39;t guess any tools which were not explicitely configured. If no tool matches the request, try to generate an answer. If you&#39;re not able to find a good answer, return with a message stating why you&#39;re not able to.&#10;&#10;If you are prompted to interact with a person, never guess contact details, but use available user/person lookup tools instead and return with an error if you&#39;re not able to look up appropriate data.&#10;&#10;Thinking, step by step, before you execute your tools, you think using the template `&#60;thinking&#62;&#60;context&#62;&#60;/context&#62;&#60;reflection&#62;&#60;/reflection&#62;&#60;/thinking&#62;`"
44
44
  target="data.systemPrompt.prompt" />
45
45
  <zeebe:input
46
- source="=&#34;Generate a single sentence in the following exact format, always using a new random city and country each time:&#10;&#10;The current date and time in {City, Country}, is approximately {h:mm AM/PM} on {Month day, year}.&#10;&#10;But only with the sentence/format as above, nothing else&#34;"
46
+ source="=&#34;Use your tools to get the current date and time, then write a single sentence in the following exact format, with Berlin, Germany as the city and country:&#10;&#10;The current date and time in Berlin, Germany, is approximately {h:mm AM/PM} on {Month day, year}.&#10;&#10;But only with the sentence/format as above, nothing else&#34;"
47
47
  target="data.userPrompt.prompt" />
48
48
  <zeebe:input
49
49
  source="=if (is defined(followUpInput) or is defined(followUpDocuments)) then followUpDocuments else inputDocuments"