@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.
- package/dist/pages/8.10/AppsPage.d.ts +7 -3
- package/dist/pages/8.10/AppsPage.js +166 -49
- package/dist/pages/8.10/ClusterDetailsPage.d.ts +2 -0
- package/dist/pages/8.10/ClusterDetailsPage.js +49 -2
- package/dist/pages/8.10/ClusterSecretsPage.js +5 -1
- package/dist/pages/8.10/ConnectorMarketplacePage.d.ts +6 -0
- package/dist/pages/8.10/ConnectorMarketplacePage.js +107 -1
- package/dist/pages/8.10/ConsoleOrganizationPage.d.ts +3 -2
- package/dist/pages/8.10/ConsoleOrganizationPage.js +64 -27
- package/dist/pages/8.10/FormJsPage.js +36 -18
- package/dist/pages/8.10/IdpCreatePage.js +6 -2
- package/dist/pages/8.10/ModelerCreatePage.d.ts +8 -0
- package/dist/pages/8.10/ModelerCreatePage.js +316 -40
- package/dist/pages/8.10/ModelerHomePage.d.ts +10 -0
- package/dist/pages/8.10/ModelerHomePage.js +165 -55
- package/dist/pages/8.10/OCIdentityClusterVariablesPage.js +3 -1
- package/dist/pages/8.10/OCIdentityHomePage.js +7 -3
- package/dist/pages/8.10/OptimizeHomePage.d.ts +0 -1
- package/dist/pages/8.10/OptimizeHomePage.js +10 -46
- package/dist/pages/8.10/PlayPage.js +9 -3
- package/dist/pages/8.10/ProcessApplicationPage.d.ts +1 -0
- package/dist/pages/8.10/ProcessApplicationPage.js +128 -6
- package/dist/pages/8.10/UtilitiesPage.js +44 -17
- package/dist/pages/8.10/WorkspaceMembersPage.d.ts +21 -0
- package/dist/pages/8.10/WorkspaceMembersPage.js +264 -0
- package/dist/resources/agentic_ai/ai-agent-chat-with-tools_gemini_vertex.bpmn +1 -1
- package/dist/tests/8.10/access-user-role-management.spec.js +142 -26
- package/dist/tests/8.10/idp-user-flows.spec.js +2 -1
- package/dist/tests/8.10/rba-enabled-v2-user-flows.spec.js +13 -4
- package/dist/tests/8.10/smoke-tests.spec.js +9 -25
- package/dist/tests/8.10/test-setup.spec.js +57 -4
- package/dist/tests/8.10/web-modeler-user-flows.spec.js +2 -1
- package/package.json +1 -1
- package/resources/agentic_ai/ai-agent-chat-with-tools_gemini_vertex.bpmn +1 -1
|
@@ -6,6 +6,8 @@ const sleep_1 = require("../../utils/sleep");
|
|
|
6
6
|
const ConnectorMarketplacePage_1 = require("./ConnectorMarketplacePage");
|
|
7
7
|
const ProcessApplicationPage_1 = require("./ProcessApplicationPage");
|
|
8
8
|
const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
|
|
9
|
+
const modelerCluster_1 = require("../../utils/modelerCluster");
|
|
10
|
+
const sessionRecovery_1 = require("../../utils/sessionRecovery");
|
|
9
11
|
class ModelerCreatePage {
|
|
10
12
|
page;
|
|
11
13
|
processApplicationPage;
|
|
@@ -21,8 +23,11 @@ class ModelerCreatePage {
|
|
|
21
23
|
viewProcessInstanceLink;
|
|
22
24
|
nameInput;
|
|
23
25
|
diagramBreadcrumb;
|
|
26
|
+
diagramActionsButton;
|
|
24
27
|
renameDiagramNameButton;
|
|
25
28
|
diagramNameInput;
|
|
29
|
+
renameInput;
|
|
30
|
+
renameSubmitButton;
|
|
26
31
|
variableInput;
|
|
27
32
|
businessIdInput;
|
|
28
33
|
embedFormButton;
|
|
@@ -111,6 +116,8 @@ class ModelerCreatePage {
|
|
|
111
116
|
eighthPlacedElement;
|
|
112
117
|
deployAndRunMainButton;
|
|
113
118
|
deployAndRunSubButton;
|
|
119
|
+
deployRunActions;
|
|
120
|
+
deployAndRunMenuItem;
|
|
114
121
|
dialog;
|
|
115
122
|
backupDeployButton;
|
|
116
123
|
globalConnectToolButton;
|
|
@@ -164,6 +171,13 @@ class ModelerCreatePage {
|
|
|
164
171
|
name: 'Deploy & run',
|
|
165
172
|
exact: true,
|
|
166
173
|
});
|
|
174
|
+
// camunda-hub deploy-run-combo-action: both the Carbon ComboButton and
|
|
175
|
+
// the design-system SplitButton carry this test id.
|
|
176
|
+
this.deployRunActions = page.getByTestId('deploy-run-actions');
|
|
177
|
+
this.deployAndRunMenuItem = page.getByRole('menuitem', {
|
|
178
|
+
name: 'Deploy & run',
|
|
179
|
+
exact: true,
|
|
180
|
+
});
|
|
167
181
|
this.deployAndRunSubButton = this.dialog.getByRole('button', {
|
|
168
182
|
name: 'Deploy & run',
|
|
169
183
|
exact: true,
|
|
@@ -174,17 +188,42 @@ class ModelerCreatePage {
|
|
|
174
188
|
this.viewProcessInstanceLink = page.getByRole('button', {
|
|
175
189
|
name: 'View process instance',
|
|
176
190
|
});
|
|
177
|
-
this.viewProcessLink = page
|
|
178
|
-
name: 'View process in Operate'
|
|
179
|
-
|
|
191
|
+
this.viewProcessLink = page
|
|
192
|
+
.getByRole('button', { name: 'View process in Operate' })
|
|
193
|
+
.or(page.getByText('view process in Operate'))
|
|
194
|
+
.or(page.getByText(/^(Diagram|Project|Process application) deployed!$/))
|
|
195
|
+
.first();
|
|
180
196
|
this.nameInput = page.getByLabel('Name', { exact: true });
|
|
181
197
|
this.diagramBreadcrumb = page.locator('[data-test="breadcrumb-diagram"]');
|
|
182
|
-
|
|
198
|
+
// Hub's newer nav (isNavV2, camunda-hub use-file-page-actions.ts) renders
|
|
199
|
+
// no breadcrumb-diagram dropdown: Rename/Duplicate/Delete sit behind a
|
|
200
|
+
// kebab next to the current (last) crumb, named "<entity name> actions".
|
|
201
|
+
// Same locator as camunda-hub's own e2e BasePage.breadcrumbActionsButton.
|
|
202
|
+
this.diagramActionsButton = page
|
|
203
|
+
.getByRole('navigation', { name: 'Context navigation' })
|
|
204
|
+
.or(page.getByRole('navigation', { name: 'Breadcrumb', exact: true }))
|
|
205
|
+
.getByRole('button', { name: / actions$/ })
|
|
206
|
+
.last();
|
|
207
|
+
this.renameDiagramNameButton = page
|
|
208
|
+
.getByRole('menuitem', { name: 'Rename', exact: true })
|
|
209
|
+
.or(page.locator('[data-test="diagram-menu-item-rename-diagram"]'))
|
|
210
|
+
.first();
|
|
183
211
|
this.diagramNameInput = page.locator('[data-test="editable-input"]');
|
|
212
|
+
// The nav-v2 Rename opens a modal dialog (camunda-hub RenameDialog.tsx)
|
|
213
|
+
// instead of the legacy inline breadcrumb editor, and a fresh diagram no
|
|
214
|
+
// longer opens with its name in edit mode.
|
|
215
|
+
this.renameInput = page.locator('[data-test="rename-input"]');
|
|
216
|
+
this.renameSubmitButton = page.locator('[data-test="rename-submit"]');
|
|
184
217
|
this.variableInput = page.locator('textarea#variables-json');
|
|
185
218
|
this.businessIdInput = page.locator('[id^="business-id-input"]');
|
|
186
219
|
this.embedFormButton = page.getByRole('button', { name: 'Link form' });
|
|
187
|
-
|
|
220
|
+
// With workspaces on, Hub's "Link a form" picker is LinkTargetModal, which
|
|
221
|
+
// confirms with `link-target-confirm`; `confirm-move` is the legacy
|
|
222
|
+
// TargetSelector's.
|
|
223
|
+
this.embedButton = page
|
|
224
|
+
.locator('[data-test="link-target-confirm"]')
|
|
225
|
+
.or(page.locator('[data-test="confirm-move"]'))
|
|
226
|
+
.first();
|
|
188
227
|
this.newForm = page
|
|
189
228
|
.locator('[data-test="item-New form"]')
|
|
190
229
|
.getByText('New form');
|
|
@@ -213,10 +252,14 @@ class ModelerCreatePage {
|
|
|
213
252
|
this.webhookIsActiveButton = page.getByRole('button', {
|
|
214
253
|
name: 'Webhook is active in Test',
|
|
215
254
|
});
|
|
255
|
+
// Hub's design-system panel renders the webhook "Path" as a code block
|
|
256
|
+
// (<div data-slot="code-block"><pre><code>URL) with a separate copy button;
|
|
257
|
+
// the <code> holds the URL. The "Path" block precedes the log blocks.
|
|
216
258
|
this.copyWebhookUrlToClipboardButton = page
|
|
217
259
|
.getByRole('textbox', {
|
|
218
260
|
name: 'Copy to clipboard',
|
|
219
261
|
})
|
|
262
|
+
.or(page.locator('[data-slot="code-block"] code'))
|
|
220
263
|
.first();
|
|
221
264
|
this.createTask = page.getByTitle('Create task');
|
|
222
265
|
this.createEndEvent = page.getByTitle('Create end event');
|
|
@@ -229,7 +272,12 @@ class ModelerCreatePage {
|
|
|
229
272
|
this.firstPlacedElement = page.locator('g:nth-child(2) > .djs-element > .djs-hit');
|
|
230
273
|
this.secondPlacedElement = page.locator('g:nth-child(2) > .djs-element > .djs-hit');
|
|
231
274
|
this.payloadInput = page.locator('[class="fjs-input"]');
|
|
232
|
-
|
|
275
|
+
// camunda-hub's change-element popup replaced the Marketplace entry with
|
|
276
|
+
// "Browse all" (browse-all-popup-menu-provider.ts).
|
|
277
|
+
this.marketPlaceButton = page
|
|
278
|
+
.getByTitle('Browse Marketplace for more Connectors')
|
|
279
|
+
.or(page.getByTitle('Browse all available elements and assets'))
|
|
280
|
+
.first();
|
|
233
281
|
// Match either marketplace display name — the connector was renamed from
|
|
234
282
|
// "Public Holiday Outbound" to "Worldwide Public Holiday"; accepting both
|
|
235
283
|
// keeps the flow green whichever the marketplace currently serves.
|
|
@@ -265,9 +313,14 @@ class ModelerCreatePage {
|
|
|
265
313
|
name: 'Toggle public access',
|
|
266
314
|
});
|
|
267
315
|
this.publicationTab = page.getByRole('tab', { name: 'Publication' });
|
|
268
|
-
|
|
316
|
+
// Legacy Carbon snippet (copy button) or Hub's design-system code block,
|
|
317
|
+
// whose <code> holds the link (see getPublicationLink()).
|
|
318
|
+
this.copyPublicLinkButton = page
|
|
319
|
+
.getByRole('button', {
|
|
269
320
|
name: 'Copy to clipboard',
|
|
270
|
-
})
|
|
321
|
+
})
|
|
322
|
+
.or(page.locator('[data-slot="code-block"]'))
|
|
323
|
+
.first();
|
|
271
324
|
this.closeButton = page.getByRole('button', { name: 'Close', exact: true });
|
|
272
325
|
this.rbaEnabledDeployedDialog = page.getByRole('dialog', {
|
|
273
326
|
name: 'Process successfully deployed',
|
|
@@ -354,12 +407,22 @@ class ModelerCreatePage {
|
|
|
354
407
|
name: 'Deploy',
|
|
355
408
|
});
|
|
356
409
|
this.globalConnectToolButton = page.locator('[title="Activate global connect tool"]');
|
|
410
|
+
// Under the design system Hub raises this as a design-system toast, not a
|
|
411
|
+
// Carbon `cds--toast-*` node, so match the message text itself.
|
|
357
412
|
this.formLinkedSuccessMessage = page
|
|
413
|
+
.getByText('Form has been successfully linked.')
|
|
414
|
+
.or(page
|
|
358
415
|
.locator('.cds--toast-notification__subtitle')
|
|
359
|
-
.getByText('Form has been successfully linked.')
|
|
360
|
-
|
|
416
|
+
.getByText('Form has been successfully linked.'))
|
|
417
|
+
.first();
|
|
418
|
+
// The legacy breadcrumb shows the name directly; the nav-v2 kebab embeds
|
|
419
|
+
// it in its own accessible name ("<name> actions").
|
|
420
|
+
this.diagramNameBreadcrumb = (diagramName) => page
|
|
421
|
+
.locator('button[data-test="breadcrumb-diagram"]', {
|
|
361
422
|
hasText: diagramName,
|
|
362
|
-
})
|
|
423
|
+
})
|
|
424
|
+
.or(page.getByRole('button', { name: `${diagramName} actions` }))
|
|
425
|
+
.first();
|
|
363
426
|
this.webhookActiveMessage = page.getByText('Webhook is active');
|
|
364
427
|
}
|
|
365
428
|
async clickSecondDeployButton() {
|
|
@@ -630,10 +693,14 @@ class ModelerCreatePage {
|
|
|
630
693
|
// a form with the same name and the picker then lists two identical entries.
|
|
631
694
|
// Scope to the first matching item so the link step stays deterministic on retry
|
|
632
695
|
// instead of failing with a strict-mode violation.
|
|
696
|
+
// LinkTargetModal lists each form as a button labelled "Select <name>"
|
|
697
|
+
// inside `link-target-list` and renders no `item-<name>` node; the legacy
|
|
698
|
+
// id stays as a fallback for the TargetSelector picker.
|
|
633
699
|
await this.page
|
|
634
|
-
.locator(
|
|
700
|
+
.locator('[data-test="link-target-list"]')
|
|
701
|
+
.getByRole('button', { name: `Select ${name}`, exact: true })
|
|
702
|
+
.or(this.page.locator(`[data-test="item-${name}"]`).first().getByText(name))
|
|
635
703
|
.first()
|
|
636
|
-
.getByText(name)
|
|
637
704
|
.click({ timeout: 90000 });
|
|
638
705
|
}
|
|
639
706
|
async clickUserTask(id) {
|
|
@@ -713,6 +780,20 @@ class ModelerCreatePage {
|
|
|
713
780
|
await (0, test_1.expect)(this.viewProcessLink).toBeVisible({ timeout: 30000 });
|
|
714
781
|
await (0, test_1.expect)(this.viewProcessLink).toBeHidden({ timeout: 30000 });
|
|
715
782
|
}
|
|
783
|
+
// For a user whose org role lacks instance/workflow create permissions,
|
|
784
|
+
// Hub's checkIfAllowedToRun is false: the split button's primary action
|
|
785
|
+
// becomes "Deploy" and "Deploy & run" moves into its menu, disabled
|
|
786
|
+
// (camunda-hub BPMNDeployAndRunButtonsDs.tsx).
|
|
787
|
+
async assertDeployAndRunNotPermitted() {
|
|
788
|
+
await (0, test_1.expect)(this.deployRunActions.getByRole('button', { name: 'Deploy', exact: true })).toBeVisible({ timeout: 60000 });
|
|
789
|
+
await (0, test_1.expect)(this.deployAndRunMainButton).toHaveCount(0);
|
|
790
|
+
await this.deployRunActions
|
|
791
|
+
.getByRole('button', { name: 'Additional actions' })
|
|
792
|
+
.click({ timeout: 30000 });
|
|
793
|
+
await (0, test_1.expect)(this.deployAndRunMenuItem).toBeVisible({ timeout: 30000 });
|
|
794
|
+
await (0, test_1.expect)(this.deployAndRunMenuItem).toBeDisabled();
|
|
795
|
+
await this.page.keyboard.press('Escape');
|
|
796
|
+
}
|
|
716
797
|
async clickStartInstanceMainButton() {
|
|
717
798
|
await this.deployAndRunMainButton.click({ timeout: 30000 });
|
|
718
799
|
}
|
|
@@ -801,6 +882,27 @@ class ModelerCreatePage {
|
|
|
801
882
|
throw new Error(`Process application has no cluster assigned to any stage, so "${clusterName}" cannot be deployed to. ` +
|
|
802
883
|
'ProcessApplicationPage.ensureStageCluster() should have bound it before the deploy dialog was opened.');
|
|
803
884
|
}
|
|
885
|
+
// Hub's environment-based dialog (camunda-hub#29210) lists every
|
|
886
|
+
// Environment assigned to the workspace, preselects the first -- which
|
|
887
|
+
// need not be this one -- and renders a <label> per row that the legacy
|
|
888
|
+
// toggle detection below would mistake for its own. The dialog is visible
|
|
889
|
+
// a beat before its rows, so wait briefly rather than sampling once.
|
|
890
|
+
const hasEnvironmentRow = await this.dialog
|
|
891
|
+
.locator('[data-test^="environment-row-"]')
|
|
892
|
+
.first()
|
|
893
|
+
.waitFor({ state: 'visible', timeout: 10000 })
|
|
894
|
+
.then(() => true)
|
|
895
|
+
.catch(() => false);
|
|
896
|
+
if (hasEnvironmentRow) {
|
|
897
|
+
try {
|
|
898
|
+
await (0, modelerCluster_1.selectDeployEnvironment)(this.dialog, clusterName);
|
|
899
|
+
}
|
|
900
|
+
catch (error) {
|
|
901
|
+
this.processApplicationPage.forgetStageCluster();
|
|
902
|
+
throw error;
|
|
903
|
+
}
|
|
904
|
+
return;
|
|
905
|
+
}
|
|
804
906
|
const legacyClusterToggle = this.dialog.locator('label').filter({
|
|
805
907
|
hasText: new RegExp(`^${clusterName}`),
|
|
806
908
|
});
|
|
@@ -849,13 +951,27 @@ class ModelerCreatePage {
|
|
|
849
951
|
async fillNamedInput(name) {
|
|
850
952
|
await this.nameInput.fill(name, { timeout: 60000 });
|
|
851
953
|
}
|
|
852
|
-
//
|
|
954
|
+
// Opens the current diagram's crumb menu: the legacy breadcrumb dropdown, or
|
|
955
|
+
// the nav-v2 "<name> actions" kebab. Waits for the properties panel first:
|
|
956
|
+
// until the diagram has loaded, nav-v2 keeps showing the previous page's
|
|
957
|
+
// crumbs (camunda-hub NavProvider), so the last kebab would belong to the
|
|
958
|
+
// parent container and Rename would rename that instead.
|
|
959
|
+
async clickDiagramBreadcrumb() {
|
|
960
|
+
await (0, test_1.expect)(this.generalPanel).toBeVisible({ timeout: 120000 });
|
|
961
|
+
await this.clickDiagramMenuTrigger(60000);
|
|
962
|
+
}
|
|
963
|
+
// 10s was too tight for the first click after the editor opens: the trigger
|
|
853
964
|
// is already resolved, visible and stable, and the click then waits out its
|
|
854
965
|
// whole budget on the actionability check while the bpmn-js canvas is still
|
|
855
|
-
// settling ("done scrolling" is the last line before the timeout).
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
await this.
|
|
966
|
+
// settling ("done scrolling" is the last line before the timeout).
|
|
967
|
+
async clickDiagramMenuTrigger(timeout) {
|
|
968
|
+
await (0, test_1.expect)(this.diagramBreadcrumb.or(this.diagramActionsButton).first()).toBeVisible({ timeout });
|
|
969
|
+
if (await this.diagramActionsButton.isVisible().catch(() => false)) {
|
|
970
|
+
await this.diagramActionsButton.click({ timeout });
|
|
971
|
+
}
|
|
972
|
+
else {
|
|
973
|
+
await this.diagramBreadcrumb.click({ timeout });
|
|
974
|
+
}
|
|
859
975
|
}
|
|
860
976
|
// Opening the breadcrumb menu leaves the pointer on the breadcrumb button,
|
|
861
977
|
// and hub renders that button's truncated-name tooltip on top of the menu,
|
|
@@ -876,8 +992,10 @@ class ModelerCreatePage {
|
|
|
876
992
|
// Bounded well below the loop budget rather than reusing
|
|
877
993
|
// `clickDiagramBreadcrumb`'s 60s: at 60s a single reopen is the whole
|
|
878
994
|
// retry window, so the attempt that would have recovered never got to
|
|
879
|
-
// run and toPass reported the previous attempt's error instead.
|
|
880
|
-
|
|
995
|
+
// run and toPass reported the previous attempt's error instead. Gated
|
|
996
|
+
// on the properties panel for the same reason as there.
|
|
997
|
+
await (0, test_1.expect)(this.generalPanel).toBeVisible({ timeout: 20000 });
|
|
998
|
+
await this.clickDiagramMenuTrigger(20000);
|
|
881
999
|
}
|
|
882
1000
|
// Park the pointer so the breadcrumb's own tooltip gets a chance to
|
|
883
1001
|
// unmount -- best effort, because it is not reliably hover-driven, and
|
|
@@ -898,7 +1016,7 @@ class ModelerCreatePage {
|
|
|
898
1016
|
// failure: the assertion below is what decides whether this worked.
|
|
899
1017
|
await this.renameDiagramNameButton.dispatchEvent('click');
|
|
900
1018
|
}
|
|
901
|
-
await (0, test_1.expect)(this.diagramNameInput).toBeVisible({ timeout: 10000 });
|
|
1019
|
+
await (0, test_1.expect)(this.diagramNameInput.or(this.renameInput).first()).toBeVisible({ timeout: 10000 });
|
|
902
1020
|
// The menu also closes on its own: `modelDiagramFromFile` opens it right
|
|
903
1021
|
// after the diagram is picked, and when bpmn-js finishes importing it
|
|
904
1022
|
// takes focus, which dismisses the menu that `isVisible` had just seen.
|
|
@@ -916,10 +1034,20 @@ class ModelerCreatePage {
|
|
|
916
1034
|
// (Operate's instance list, Tasklist, Play) can never match, which is what the
|
|
917
1035
|
// nightly showed: three instances deployed as "New BPMN diagram". Confirm the
|
|
918
1036
|
// name landed in the breadcrumb and re-open the editor to retry if it didn't.
|
|
1037
|
+
// Nav-v2 has no inline editor: Rename opens a dialog, and a fresh diagram
|
|
1038
|
+
// does not open with its name in edit mode, so fill whichever editor shows.
|
|
919
1039
|
async enterDiagramName(name) {
|
|
920
1040
|
const maxAttempts = 3;
|
|
921
1041
|
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
922
1042
|
try {
|
|
1043
|
+
// The dialog's submit stays disabled while the input equals the stored
|
|
1044
|
+
// name, so a retry after a rename that committed late cannot resubmit.
|
|
1045
|
+
if (attempt > 0 &&
|
|
1046
|
+
(await this.diagramNameBreadcrumb(name)
|
|
1047
|
+
.isVisible()
|
|
1048
|
+
.catch(() => false))) {
|
|
1049
|
+
return;
|
|
1050
|
+
}
|
|
923
1051
|
// Creating the diagram does not reliably leave the name editor open --
|
|
924
1052
|
// hub opens the editor on the breadcrumb, and a slow canvas render
|
|
925
1053
|
// lands on a closed one. The input therefore has to be opened on the
|
|
@@ -935,8 +1063,16 @@ class ModelerCreatePage {
|
|
|
935
1063
|
// long budget only delayed the retry that actually recovers -- and at
|
|
936
1064
|
// 90s x 2 x 3 attempts this loop could outlive the 12min test timeout,
|
|
937
1065
|
// losing the artifacts that explain the failure.
|
|
938
|
-
await this.
|
|
939
|
-
|
|
1066
|
+
if (await this.renameInput.isVisible().catch(() => false)) {
|
|
1067
|
+
await this.renameInput.fill(name, { timeout: 20000 });
|
|
1068
|
+
await (0, test_1.expect)(this.renameInput).toHaveValue(name, { timeout: 5000 });
|
|
1069
|
+
await this.renameSubmitButton.click({ timeout: 10000 });
|
|
1070
|
+
await (0, test_1.expect)(this.renameInput).toBeHidden({ timeout: 30000 });
|
|
1071
|
+
}
|
|
1072
|
+
else {
|
|
1073
|
+
await this.diagramNameInput.fill(name, { timeout: 20000 });
|
|
1074
|
+
await this.diagramNameInput.press('Enter', { timeout: 20000 });
|
|
1075
|
+
}
|
|
940
1076
|
await this.diagramNameBreadcrumb(name).waitFor({
|
|
941
1077
|
state: 'visible',
|
|
942
1078
|
timeout: 30000,
|
|
@@ -951,6 +1087,8 @@ class ModelerCreatePage {
|
|
|
951
1087
|
}
|
|
952
1088
|
async diagramNameEditorOpen() {
|
|
953
1089
|
return this.diagramNameInput
|
|
1090
|
+
.or(this.renameInput)
|
|
1091
|
+
.first()
|
|
954
1092
|
.waitFor({ state: 'visible', timeout: 5000 })
|
|
955
1093
|
.then(() => true)
|
|
956
1094
|
.catch(() => false);
|
|
@@ -1554,6 +1692,29 @@ class ModelerCreatePage {
|
|
|
1554
1692
|
}
|
|
1555
1693
|
await this.playTab.click();
|
|
1556
1694
|
}
|
|
1695
|
+
// Scopes the "Set up test run" deploy step to the diagram under test.
|
|
1696
|
+
// Hub's step 2 ("Choose resources to deploy") pre-selects "All resources"
|
|
1697
|
+
// (`#deploy-mode-bundle`), which deploys the whole shared project and is
|
|
1698
|
+
// rejected with a 400 for other specs' invalid resources. "Only this
|
|
1699
|
+
// resource" (`#deploy-mode-single-file`) deploys just this process. Matched
|
|
1700
|
+
// by id: the radio has no accessible name of its own. Ported from pages/8.9.
|
|
1701
|
+
async selectPlayDeploySingleResource() {
|
|
1702
|
+
const singleResourceOption = this.page.locator('#deploy-mode-single-file:not([disabled])');
|
|
1703
|
+
const hasOption = await singleResourceOption
|
|
1704
|
+
.waitFor({ state: 'visible', timeout: 15000 })
|
|
1705
|
+
.then(() => true)
|
|
1706
|
+
.catch(() => false);
|
|
1707
|
+
if (!hasOption) {
|
|
1708
|
+
return;
|
|
1709
|
+
}
|
|
1710
|
+
await (0, test_1.expect)(async () => {
|
|
1711
|
+
if ((await singleResourceOption.getAttribute('aria-checked')) === 'true') {
|
|
1712
|
+
return;
|
|
1713
|
+
}
|
|
1714
|
+
await singleResourceOption.click({ timeout: 10000 });
|
|
1715
|
+
await (0, test_1.expect)(singleResourceOption).toHaveAttribute('aria-checked', 'true', { timeout: 10000 });
|
|
1716
|
+
}).toPass({ timeout: 30000 });
|
|
1717
|
+
}
|
|
1557
1718
|
async completePlayConfiguration(clusterName) {
|
|
1558
1719
|
// Play is a tab on the diagram page, not its own URL, so the stage-cluster
|
|
1559
1720
|
// detour's goto() lands back on the Modeler tab and every Play locator
|
|
@@ -1654,8 +1815,26 @@ class ModelerCreatePage {
|
|
|
1654
1815
|
.locator('[data-test="test-studio-configuration-overlay"]')
|
|
1655
1816
|
.or(this.page.locator('[data-test="play-configuration-overlay"]'))
|
|
1656
1817
|
.or(this.page.getByText('Set up environment'))
|
|
1818
|
+
// With Hub's Environments feature on, the card is titled "Set up test
|
|
1819
|
+
// run" (steps "Choose where to run" / "Choose resources to deploy" /
|
|
1820
|
+
// "Configure test case") and none of the locators above match.
|
|
1821
|
+
.or(this.page.getByText('Set up test run', { exact: true }))
|
|
1657
1822
|
.first();
|
|
1658
1823
|
const configureTestPanel = this.page.getByTestId('configure-test-panel');
|
|
1824
|
+
// Step 2's content (the Deploy button) only renders visibly while its
|
|
1825
|
+
// accordion item is expanded; clicking the heading is the recovery when it
|
|
1826
|
+
// did not expand on its own.
|
|
1827
|
+
const deployStepHeading = this.page
|
|
1828
|
+
.getByRole('button', { name: 'Deploy process' })
|
|
1829
|
+
.or(this.page.getByRole('button', { name: 'Choose resources to deploy' }))
|
|
1830
|
+
.first();
|
|
1831
|
+
// Step-3 accordion heading. Fallback click target only, while the panel is
|
|
1832
|
+
// closed and the heading enabled -- never a completion probe, since it is
|
|
1833
|
+
// visible while disabled (see configureScenarioButton).
|
|
1834
|
+
const configureStepHeading = this.page.getByRole('button', {
|
|
1835
|
+
name: 'Configure test case',
|
|
1836
|
+
exact: true,
|
|
1837
|
+
});
|
|
1659
1838
|
await (0, test_1.expect)(configurationOverlay
|
|
1660
1839
|
.or(this.continueToPlayButton)
|
|
1661
1840
|
.or(configureTestPanel)
|
|
@@ -1683,6 +1862,8 @@ class ModelerCreatePage {
|
|
|
1683
1862
|
// Wait until the panel settles into one of three stable states before
|
|
1684
1863
|
// deciding, then branch:
|
|
1685
1864
|
// - "Connect cluster" button visible → no cluster connected, connect one
|
|
1865
|
+
// (Environments panel: "Select environment"; or "Cluster
|
|
1866
|
+
// unavailable", re-picked through "Change")
|
|
1686
1867
|
// - Deploy button enabled → a cluster is already connected
|
|
1687
1868
|
// - deploy already complete → re-entering an already deployed
|
|
1688
1869
|
// process application, where the Deploy button is replaced by the
|
|
@@ -1717,10 +1898,24 @@ class ModelerCreatePage {
|
|
|
1717
1898
|
const connectClusterButton = this.page.getByRole('button', {
|
|
1718
1899
|
name: 'Connect cluster',
|
|
1719
1900
|
});
|
|
1901
|
+
// Environments panel: step 1 ("Choose where to run") offers "Select
|
|
1902
|
+
// environment", which opens the "Choose where to run" dialog of the
|
|
1903
|
+
// workspace's environment rows.
|
|
1904
|
+
const selectEnvironmentButton = this.page.getByRole('button', {
|
|
1905
|
+
name: 'Select environment',
|
|
1906
|
+
});
|
|
1907
|
+
// Once a cluster is bound the same picker is reached through "Change";
|
|
1908
|
+
// an unusable one shows "Cluster unavailable" and keeps Deploy disabled
|
|
1909
|
+
// for good, so treat it as "step 1 not done".
|
|
1910
|
+
const changeClusterButton = this.page
|
|
1911
|
+
.getByRole('button', { name: 'Change', exact: true })
|
|
1912
|
+
.first();
|
|
1913
|
+
const clusterHealthyIcon = this.page.locator('[aria-label="Cluster healthy"]');
|
|
1914
|
+
const clusterUnavailableIcon = this.page.locator('[aria-label="Cluster unavailable"]');
|
|
1720
1915
|
await (0, test_1.expect)(async () => {
|
|
1721
|
-
const connectVisible = await connectClusterButton
|
|
1722
|
-
.isVisible()
|
|
1723
|
-
.catch(() => false);
|
|
1916
|
+
const connectVisible = (await connectClusterButton.isVisible().catch(() => false)) ||
|
|
1917
|
+
(await selectEnvironmentButton.isVisible().catch(() => false)) ||
|
|
1918
|
+
(await clusterUnavailableIcon.isVisible().catch(() => false));
|
|
1724
1919
|
const deployEnabled = await setupDeployButton
|
|
1725
1920
|
.isEnabled()
|
|
1726
1921
|
.catch(() => false);
|
|
@@ -1730,15 +1925,43 @@ class ModelerCreatePage {
|
|
|
1730
1925
|
const settled = connectVisible || deployEnabled || (await isDeployComplete());
|
|
1731
1926
|
(0, test_1.expect)(settled).toBe(true);
|
|
1732
1927
|
}).toPass({ timeout: 30000 });
|
|
1733
|
-
const
|
|
1928
|
+
const chooseWhereToRunDialog = this.page.getByRole('dialog', {
|
|
1929
|
+
name: 'Choose where to run',
|
|
1930
|
+
});
|
|
1931
|
+
const configureEnvDialog = this.page
|
|
1932
|
+
.getByRole('dialog')
|
|
1933
|
+
.filter({ hasText: 'Configure environment' });
|
|
1934
|
+
const chooseEnvironment = async () => {
|
|
1935
|
+
await (0, test_1.expect)(chooseWhereToRunDialog).toBeVisible({ timeout });
|
|
1936
|
+
await (0, modelerCluster_1.selectDeployEnvironment)(chooseWhereToRunDialog, clusterName);
|
|
1937
|
+
await chooseWhereToRunDialog
|
|
1938
|
+
.getByRole('button', { name: 'Save', exact: true })
|
|
1939
|
+
.click({ timeout });
|
|
1940
|
+
await (0, test_1.expect)(chooseWhereToRunDialog).toBeHidden({ timeout });
|
|
1941
|
+
};
|
|
1942
|
+
const hasSelectEnvironment = await selectEnvironmentButton
|
|
1734
1943
|
.isVisible()
|
|
1735
1944
|
.catch(() => false);
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1945
|
+
const hasConnectButton = await connectClusterButton
|
|
1946
|
+
.isVisible()
|
|
1947
|
+
.catch(() => false);
|
|
1948
|
+
const needsClusterConnect = hasConnectButton ||
|
|
1949
|
+
(await clusterUnavailableIcon.isVisible().catch(() => false));
|
|
1950
|
+
if (hasSelectEnvironment || needsClusterConnect) {
|
|
1951
|
+
let openPickerButton = changeClusterButton;
|
|
1952
|
+
if (hasSelectEnvironment) {
|
|
1953
|
+
openPickerButton = selectEnvironmentButton;
|
|
1954
|
+
}
|
|
1955
|
+
else if (hasConnectButton) {
|
|
1956
|
+
openPickerButton = connectClusterButton;
|
|
1957
|
+
}
|
|
1958
|
+
await openPickerButton.click({ timeout: 15000 });
|
|
1959
|
+
await (0, test_1.expect)(chooseWhereToRunDialog.or(configureEnvDialog).first()).toBeVisible({ timeout });
|
|
1960
|
+
}
|
|
1961
|
+
if (await chooseWhereToRunDialog.isVisible()) {
|
|
1962
|
+
await chooseEnvironment();
|
|
1963
|
+
}
|
|
1964
|
+
else if (await configureEnvDialog.isVisible()) {
|
|
1742
1965
|
// The "Configure environment" modal lists each available cluster as a
|
|
1743
1966
|
// labelled toggle switch (cds--toggle), not as a combobox+option list.
|
|
1744
1967
|
// Mirror the legacy `selectCluster` deploy-dialog logic: scope by the
|
|
@@ -1762,8 +1985,6 @@ class ModelerCreatePage {
|
|
|
1762
1985
|
await configureEnvDialog
|
|
1763
1986
|
.getByRole('button', { name: 'Save' })
|
|
1764
1987
|
.click({ timeout });
|
|
1765
|
-
// Wait for Deploy button to become enabled after cluster is saved.
|
|
1766
|
-
await (0, test_1.expect)(setupDeployButton).toBeEnabled({ timeout: 30000 });
|
|
1767
1988
|
}
|
|
1768
1989
|
// Step 2: deploy, unless the overlay already opened with the
|
|
1769
1990
|
// deploy step complete. checkExistingDeployment only runs when
|
|
@@ -1772,13 +1993,47 @@ class ModelerCreatePage {
|
|
|
1772
1993
|
// has nothing to deploy and renders no Deploy button at all. Keyed on
|
|
1773
1994
|
// the shared completion probe defined above, never on the success badge.
|
|
1774
1995
|
if (!(await isDeployComplete())) {
|
|
1775
|
-
//
|
|
1776
|
-
//
|
|
1777
|
-
|
|
1778
|
-
|
|
1996
|
+
// Gate on the cluster step having completed: ClusterStepIcon renders
|
|
1997
|
+
// this label in the accordion heading exactly when DeployStepContent
|
|
1998
|
+
// enables Deploy, so a cluster problem fails here, not as "Deploy
|
|
1999
|
+
// never enabled".
|
|
2000
|
+
await (0, test_1.expect)(clusterHealthyIcon).toBeVisible({ timeout: 90000 });
|
|
2001
|
+
// Expand the deploy step if it did not open by itself. The probe must
|
|
2002
|
+
// wait: isVisible() does not, and clicking an already-open heading
|
|
2003
|
+
// collapses it.
|
|
2004
|
+
const deployButtonShown = await setupDeployButton
|
|
2005
|
+
.waitFor({ state: 'visible', timeout: 30000 })
|
|
2006
|
+
.then(() => true)
|
|
2007
|
+
.catch(() => false);
|
|
2008
|
+
const canExpandDeployStep = await deployStepHeading
|
|
2009
|
+
.isEnabled()
|
|
2010
|
+
.catch(() => false);
|
|
2011
|
+
if (!deployButtonShown && canExpandDeployStep) {
|
|
2012
|
+
await deployStepHeading.click({ timeout });
|
|
2013
|
+
}
|
|
2014
|
+
// Stays disabled until the backend confirms the cluster from step 1.
|
|
2015
|
+
await (0, test_1.expect)(setupDeployButton).toBeEnabled({ timeout: 60000 });
|
|
2016
|
+
await this.selectPlayDeploySingleResource();
|
|
2017
|
+
// Re-click only while the deploy is provably incomplete and the button
|
|
2018
|
+
// enabled (an in-flight deploy disables it), because the accordion
|
|
2019
|
+
// re-renders around the button and a click can land on a detached node.
|
|
1779
2020
|
await (0, test_1.expect)(async () => {
|
|
2021
|
+
if (await isDeployComplete()) {
|
|
2022
|
+
return;
|
|
2023
|
+
}
|
|
2024
|
+
const isButtonShown = await setupDeployButton
|
|
2025
|
+
.isVisible()
|
|
2026
|
+
.catch(() => false);
|
|
2027
|
+
if (!isButtonShown) {
|
|
2028
|
+
if (await deployStepHeading.isEnabled().catch(() => false)) {
|
|
2029
|
+
await deployStepHeading.click({ timeout });
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
else if (await setupDeployButton.isEnabled().catch(() => false)) {
|
|
2033
|
+
await setupDeployButton.click({ timeout });
|
|
2034
|
+
}
|
|
1780
2035
|
(0, test_1.expect)(await isDeployComplete()).toBe(true);
|
|
1781
|
-
}).toPass({ timeout:
|
|
2036
|
+
}).toPass({ timeout: 120000, intervals: [1000, 2000, 5000] });
|
|
1782
2037
|
}
|
|
1783
2038
|
// Step 3: reach the configure-test panel and confirm it really rendered.
|
|
1784
2039
|
// The accordion panel opens step 3 on its own once the deploy step
|
|
@@ -1798,6 +2053,12 @@ class ModelerCreatePage {
|
|
|
1798
2053
|
if (hasConfigureButton) {
|
|
1799
2054
|
await configureScenarioButton.click({ timeout });
|
|
1800
2055
|
}
|
|
2056
|
+
else if (!(await configureTestPanel.isVisible()) &&
|
|
2057
|
+
(await configureStepHeading
|
|
2058
|
+
.isEnabled({ timeout: 5000 })
|
|
2059
|
+
.catch(() => false))) {
|
|
2060
|
+
await configureStepHeading.click({ timeout: 15000 });
|
|
2061
|
+
}
|
|
1801
2062
|
await (0, test_1.expect)(configureTestPanel).toBeVisible({ timeout: 15000 });
|
|
1802
2063
|
}).toPass({ timeout: 90000 });
|
|
1803
2064
|
return;
|
|
@@ -1838,6 +2099,7 @@ class ModelerCreatePage {
|
|
|
1838
2099
|
}
|
|
1839
2100
|
async fillStartEventVariablesForDocHandling(zeebeUrl, zeebeClientId, zeebeClientSecret) {
|
|
1840
2101
|
console.log(`URL: ${zeebeUrl}, ClientId: ${zeebeClientId}, Secret: ${zeebeClientSecret}`);
|
|
2102
|
+
await (0, sessionRecovery_1.recoverStuckModelerLogin)(this.page);
|
|
1841
2103
|
await (0, test_1.expect)(this.connectorsDocHandlingStartEventElement).toBeVisible({
|
|
1842
2104
|
timeout: 60000,
|
|
1843
2105
|
});
|
|
@@ -1969,6 +2231,20 @@ class ModelerCreatePage {
|
|
|
1969
2231
|
async getPublicationLink() {
|
|
1970
2232
|
await this.clickPublicationTab();
|
|
1971
2233
|
await (0, test_1.expect)(this.copyPublicLinkButton).toBeVisible({ timeout: 60000 });
|
|
2234
|
+
// The design-system code block shows the link as text; its copy button is
|
|
2235
|
+
// a separate control, so read the <code> instead of the clipboard.
|
|
2236
|
+
const codeBlock = this.page.locator('[data-slot="code-block"]').first();
|
|
2237
|
+
if (await codeBlock.isVisible()) {
|
|
2238
|
+
const codeBlockLink = codeBlock.locator('code');
|
|
2239
|
+
// The publication tab polls for active links; wait for the URL to render.
|
|
2240
|
+
await (0, test_1.expect)(codeBlockLink).toContainText(/https?:\/\//, {
|
|
2241
|
+
timeout: 60000,
|
|
2242
|
+
});
|
|
2243
|
+
const link = (await codeBlockLink.innerText()).trim();
|
|
2244
|
+
(0, test_1.expect)(link).toMatch(/^https?:\/\//);
|
|
2245
|
+
console.log('Captured public link:', link);
|
|
2246
|
+
return link;
|
|
2247
|
+
}
|
|
1972
2248
|
await this.clickCopyPublicLinkButton();
|
|
1973
2249
|
await (0, sleep_1.sleep)(1000);
|
|
1974
2250
|
const context = this.page.context();
|
|
@@ -31,6 +31,9 @@ declare class ModelerHomePage {
|
|
|
31
31
|
readonly messageBanner: Locator;
|
|
32
32
|
readonly idpTemplateOption: Locator;
|
|
33
33
|
readonly idpEmptyStateButton: Locator;
|
|
34
|
+
readonly idpProjectsTab: Locator;
|
|
35
|
+
readonly createIdpProjectButton: Locator;
|
|
36
|
+
readonly createActionDropdown: Locator;
|
|
34
37
|
readonly idpApplicationNameInput: Locator;
|
|
35
38
|
readonly createIdpApplicationButton: Locator;
|
|
36
39
|
readonly dialog: Locator;
|
|
@@ -39,6 +42,11 @@ declare class ModelerHomePage {
|
|
|
39
42
|
readonly blockingDialogDismiss: Locator;
|
|
40
43
|
readonly optionsButton: Locator;
|
|
41
44
|
readonly formNameBreadcrumb: (formName: string) => Locator;
|
|
45
|
+
readonly formBreadcrumbButton: Locator;
|
|
46
|
+
readonly formActionsButton: Locator;
|
|
47
|
+
readonly renameFormMenuItem: Locator;
|
|
48
|
+
readonly renameInput: Locator;
|
|
49
|
+
readonly renameSubmitButton: Locator;
|
|
42
50
|
readonly breadcrumbProjectMenu: Locator;
|
|
43
51
|
readonly renameProjectMenuItem: Locator;
|
|
44
52
|
readonly defaultNamedProjectRow: Locator;
|
|
@@ -58,6 +66,7 @@ declare class ModelerHomePage {
|
|
|
58
66
|
clickBpmnTemplateOption(): Promise<void>;
|
|
59
67
|
clickFormOption(): Promise<void>;
|
|
60
68
|
enterFormName(name: string): Promise<void>;
|
|
69
|
+
openFormRenameEditor(): Promise<void>;
|
|
61
70
|
enterFormNameWithRetry(name: string): Promise<void>;
|
|
62
71
|
clickProjectBreadcrumb(): Promise<void>;
|
|
63
72
|
clickWorkspaceBreadcrumb(): Promise<void>;
|
|
@@ -66,6 +75,7 @@ declare class ModelerHomePage {
|
|
|
66
75
|
private clickCreateProcessApplication;
|
|
67
76
|
private ensureInResourceContainer;
|
|
68
77
|
returnToResourceContainer(): Promise<void>;
|
|
78
|
+
private isOnHubLoginRoute;
|
|
69
79
|
startBlankBpmnDiagram(): Promise<void>;
|
|
70
80
|
private becameVisible;
|
|
71
81
|
private createWorkspaceViaWizard;
|