@camunda/e2e-test-suite 0.0.1513 → 0.0.1515

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.
@@ -51,6 +51,7 @@ export declare function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePag
51
51
  export declare function modelAndRunConnectorsTimerEventDiagram(modelerCreatePage: ModelerCreatePage, modelerHomePage: ModelerHomePage, processName: string, page: Page, connectorMarketplacePage: ConnectorMarketplacePage, clusterName: string, connectorTemplatePage: ConnectorTemplatePage): Promise<void>;
52
52
  export declare function createAPIClient(apiClientName: string, homePage: HomePage, clusterDetailsPage: ClusterDetailsPage, clusterName: string, clusterPage: ClusterPage): Promise<void>;
53
53
  export declare function ensureDefaultClusterApiCredentials(apiClientName: string, homePage: HomePage, clusterDetailsPage: ClusterDetailsPage, clusterName: string, clusterPage: ClusterPage): Promise<void>;
54
+ export declare function ensureClusterTypeApiCredentials(page: Page, clusterType: string, apiClientName: string, homePage: HomePage, clusterDetailsPage: ClusterDetailsPage, clusterName: string, clusterPage: ClusterPage, enableMcpSupport?: boolean): Promise<void>;
54
55
  export declare function expectCountToBeOneOf(locator: Locator, count1: number, count2: number): Promise<void>;
55
56
  export declare function assertTestUsesCorrectOrganizationFromModeler(page: Page): Promise<void>;
56
57
  export declare function waitForLoadingToFinish(page: Page, timeout?: number): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.waitForLoadingToFinish = exports.assertTestUsesCorrectOrganizationFromModeler = exports.expectCountToBeOneOf = exports.ensureDefaultClusterApiCredentials = exports.createAPIClient = exports.modelAndRunConnectorsTimerEventDiagram = exports.modelAndRunConnectorsDocHandlingDiagram = exports.deleteCluster = exports.deleteAllUserGroups = exports.assertTestUsesCorrectOrganization = exports.assertLatestAlertEmail = exports.clickInvitationLinkInEmail = exports.enableAuthorizations = exports.disableRBA = exports.goBackWithRetry = exports.consoleSessionRecovery = exports.runMultipleProcesses = exports.runProcess = exports.completeTaskWithRetry = exports.assertPageTextWithRetry = exports.openAppTabWithRetry = exports.assertLocatorVisibleWithRetry = exports.modelRestConnector = exports.modelDiagramFromFile = exports.withSessionRecovery = exports.isSignedOut = exports.loginWithRetry = void 0;
3
+ exports.waitForLoadingToFinish = exports.assertTestUsesCorrectOrganizationFromModeler = exports.expectCountToBeOneOf = exports.ensureClusterTypeApiCredentials = exports.ensureDefaultClusterApiCredentials = exports.createAPIClient = exports.modelAndRunConnectorsTimerEventDiagram = exports.modelAndRunConnectorsDocHandlingDiagram = exports.deleteCluster = exports.deleteAllUserGroups = exports.assertTestUsesCorrectOrganization = exports.assertLatestAlertEmail = exports.clickInvitationLinkInEmail = exports.enableAuthorizations = exports.disableRBA = exports.goBackWithRetry = exports.consoleSessionRecovery = exports.runMultipleProcesses = exports.runProcess = exports.completeTaskWithRetry = exports.assertPageTextWithRetry = exports.openAppTabWithRetry = exports.assertLocatorVisibleWithRetry = exports.modelRestConnector = exports.modelDiagramFromFile = exports.withSessionRecovery = exports.isSignedOut = exports.loginWithRetry = void 0;
4
4
  const test_1 = require("@playwright/test");
5
5
  const ModelerHomePage_1 = require("./ModelerHomePage");
6
6
  const HomePage_1 = require("./HomePage");
@@ -970,6 +970,61 @@ async function ensureDefaultClusterApiCredentials(apiClientName, homePage, clust
970
970
  await createAPIClient(apiClientName, homePage, clusterDetailsPage, clusterName, clusterPage);
971
971
  }
972
972
  exports.ensureDefaultClusterApiCredentials = ensureDefaultClusterApiCredentials;
973
+ // Same gap as ensureDefaultClusterApiCredentials, for a named cluster type
974
+ // whose credentials live in suffixed env vars (ZEEBE_API_*_<TYPE>, read by
975
+ // getClusterCredentials(clusterType) in utils/apiHelpers.ts). test-setup's
976
+ // "Create Agentic Orchestration Cluster" sets them for 'agentic_cluster', but
977
+ // only in its own process, so a --no-deps run of an MCP spec has none and
978
+ // every API call throws "Credentials for cluster type ... not found".
979
+ //
980
+ // The org may not have the cluster at all: the SaaS flakiness validate loop
981
+ // gives each iteration a fresh org and only runs "Create Default Cluster", so
982
+ // clicking the cluster link failed on every attempt. Provision it the way
983
+ // test-setup does (ensureClusterViaApi adopts an existing one) and, when
984
+ // `enableMcpSupport` is set, turn MCP support on before creating the client.
985
+ //
986
+ // Requires `page` to already be logged in to Console as an org admin. Creating
987
+ // the cluster can take ~25 min, so callers must raise their timeout.
988
+ async function ensureClusterTypeApiCredentials(page, clusterType, apiClientName, homePage, clusterDetailsPage, clusterName, clusterPage, enableMcpSupport = false) {
989
+ const suffix = clusterType.toUpperCase().replace(/[\s-]/g, '_');
990
+ const required = [
991
+ `ZEEBE_API_CLIENT_ID_${suffix}`,
992
+ `ZEEBE_API_CLIENT_SECRET_${suffix}`,
993
+ `ZEEBE_API_AUTH_URL_${suffix}`,
994
+ `ZEEBE_API_URL_${suffix}`,
995
+ `ZEEBE_API_TOKEN_AUDIENCE_${suffix}`,
996
+ ];
997
+ if (required.every((key) => process.env[key])) {
998
+ return;
999
+ }
1000
+ console.log(`"${clusterType}" API credentials are not in the environment; ` +
1001
+ `creating an API client on "${clusterName}".`);
1002
+ const clusterUuid = await (0, consoleApiHelpers_1.ensureClusterViaApi)(page, clusterName);
1003
+ await (0, consoleApiHelpers_1.waitForClusterHealthyViaApi)(page, clusterUuid, 1500000);
1004
+ await homePage.closeInformationDialog();
1005
+ await homePage.clickClusters();
1006
+ await clusterPage.clickClusterLink(clusterName);
1007
+ if (enableMcpSupport) {
1008
+ await clusterDetailsPage.clickSettingsTab();
1009
+ await (0, test_1.expect)(clusterDetailsPage.mcpSupportToggle).toBeVisible({
1010
+ timeout: 60000,
1011
+ });
1012
+ if (!(await clusterDetailsPage.mcpSupportToggle.isChecked())) {
1013
+ // Same order as test-setup: the restart the MCP toggle triggers is what
1014
+ // makes the audit-log configuration live.
1015
+ await (0, consoleApiHelpers_1.ensureClientAuditLoggingViaApi)(page, clusterUuid);
1016
+ await clusterDetailsPage.checkMcpSupportToggle();
1017
+ await (0, consoleApiHelpers_1.waitForClusterRestartHealthyViaApi)(page, clusterUuid, 1500000);
1018
+ await homePage.clickClusters();
1019
+ await clusterPage.assertClusterHealthyStatusWithRetry(clusterName);
1020
+ await clusterPage.clickClusterLink(clusterName);
1021
+ }
1022
+ }
1023
+ await clusterDetailsPage.clickAPITab();
1024
+ await clusterDetailsPage.createAPIClientAndReturnVariables(apiClientName, true, clusterType);
1025
+ await clusterDetailsPage.clickCloseModalButton();
1026
+ }
1027
+ exports.ensureClusterTypeApiCredentials = ensureClusterTypeApiCredentials;
973
1028
  async function expectCountToBeOneOf(locator, count1, count2) {
974
1029
  try {
975
1030
  await Promise.race([
@@ -6,6 +6,7 @@ declare class ConnectorTemplatePage {
6
6
  constructor(page: Page);
7
7
  clickPublishToOrgButton(): Promise<void>;
8
8
  clickPublishButton(): Promise<void>;
9
+ publishImportedTemplateToWorkspace(version: number): Promise<void>;
9
10
  publishConnector(): Promise<void>;
10
11
  }
11
12
  export { ConnectorTemplatePage };
@@ -20,6 +20,21 @@ class ConnectorTemplatePage {
20
20
  async clickPublishButton() {
21
21
  await this.publishButton.click({ timeout: 90000 });
22
22
  }
23
+ async publishImportedTemplateToWorkspace(version) {
24
+ await this.page.getByRole('button', { name: 'Publish', exact: true }).click();
25
+ await this.page
26
+ .getByRole('menuitem', { name: 'Publish to workspace', exact: true })
27
+ .click();
28
+ const dialog = this.page.getByRole('dialog').filter({
29
+ has: this.page.getByRole('heading', {
30
+ name: 'Publish version to workspace',
31
+ exact: true,
32
+ }),
33
+ });
34
+ await (0, test_1.expect)(dialog.getByRole('spinbutton', { name: 'Version number', exact: true })).toHaveValue(String(version));
35
+ await dialog.getByRole('button', { name: 'Publish', exact: true }).click();
36
+ await (0, test_1.expect)(dialog).toBeHidden({ timeout: 60000 });
37
+ }
23
38
  async publishConnector() {
24
39
  try {
25
40
  await (0, test_1.expect)(this.publishToOrgButton).toBeVisible({ timeout: 15000 });
@@ -174,6 +174,17 @@ declare class ModelerCreatePage {
174
174
  private openChangeElementPopup;
175
175
  openChangeElementPopupForElement(elementId: string): Promise<void>;
176
176
  assertChangeElementTemplateListed(option: Locator, searchTerm: string, elementId: string): Promise<void>;
177
+ appendTemplateTarget(previousElementId: string, type: 'task' | 'receiveTask' | 'intermediateCatchEvent'): Promise<string>;
178
+ applyImportedTemplate(elementId: string, template: {
179
+ id: string;
180
+ name: string;
181
+ }): Promise<void>;
182
+ assertExportedTemplateBindings(bindings: {
183
+ elementId: string;
184
+ id: string;
185
+ version: number;
186
+ elementType: string;
187
+ }[]): Promise<void>;
177
188
  changeElementToAdHocSubProcess(elementId: string): Promise<void>;
178
189
  applyAiAgentSubProcessTemplate(): Promise<void>;
179
190
  private clickChangeElementTemplateOption;
@@ -1384,6 +1384,84 @@ class ModelerCreatePage {
1384
1384
  await (0, test_1.expect)(option).toBeVisible({ timeout: 30000 });
1385
1385
  await (0, test_1.expect)(option).toBeEnabled({ timeout: 30000 });
1386
1386
  }
1387
+ async appendTemplateTarget(previousElementId, type) {
1388
+ const previous = this.page.locator(`.djs-shape[data-element-id="${previousElementId}"]`);
1389
+ await this.page.keyboard.press('Escape');
1390
+ if (!(await previous.evaluate((shape) => shape.classList.contains('selected')))) {
1391
+ await previous.click();
1392
+ }
1393
+ await this.page
1394
+ .getByRole('button', {
1395
+ name: type === 'intermediateCatchEvent'
1396
+ ? 'Append intermediate/boundary event'
1397
+ : 'Append task',
1398
+ exact: true,
1399
+ })
1400
+ .click();
1401
+ const selected = this.page.locator('.djs-shape.selected');
1402
+ await (0, test_1.expect)(selected).not.toHaveAttribute('data-element-id', previousElementId);
1403
+ const elementId = await selected.getAttribute('data-element-id');
1404
+ if (!elementId)
1405
+ throw new Error('The appended template target has no ID.');
1406
+ if (type !== 'task') {
1407
+ await this.openChangeElementPopupForElement(elementId);
1408
+ await this.changeElementSearchInput.fill('');
1409
+ await this.changeElementSearchInput.pressSequentially(type === 'receiveTask'
1410
+ ? 'Receive task'
1411
+ : 'Message intermediate catch event');
1412
+ const entry = type === 'receiveTask'
1413
+ ? 'replace-with-receive-task'
1414
+ : 'replace-with-message-intermediate-catch';
1415
+ await this.page.locator(`.djs-popup [data-id="${entry}"]`).click();
1416
+ }
1417
+ return elementId;
1418
+ }
1419
+ async applyImportedTemplate(elementId, template) {
1420
+ const option = this.page.locator(`.djs-popup [data-id="replace.template-${template.id}"]`);
1421
+ await this.assertChangeElementTemplateListed(option, template.name, elementId);
1422
+ await option.click();
1423
+ await (0, test_1.expect)(this.changeElementSearchInput).toBeHidden();
1424
+ const selected = this.page.locator(`.djs-shape[data-element-id="${elementId}"]`);
1425
+ await (0, test_1.expect)(selected).toHaveClass(/(?:^|\s)selected(?:\s|$)/);
1426
+ const details = this.page.getByRole('region', { name: 'Details panel' });
1427
+ await (0, test_1.expect)(details
1428
+ .locator('[data-test="properties-panel-header-container"]')
1429
+ .getByText(template.name, { exact: true })).toBeVisible();
1430
+ await (0, test_1.expect)(details.getByText('Applied', { exact: true })).toBeVisible();
1431
+ await (0, test_1.expect)(this.templateNotFoundTag).toBeHidden();
1432
+ }
1433
+ async assertExportedTemplateBindings(bindings) {
1434
+ await this.page
1435
+ .getByRole('button', { name: 'Browse more actions', exact: true })
1436
+ .click();
1437
+ const downloadPromise = this.page.waitForEvent('download');
1438
+ await this.page
1439
+ .getByRole('menuitem', { name: 'Download as BPMN 2.0 XML', exact: true })
1440
+ .click();
1441
+ const download = await downloadPromise;
1442
+ const stream = await download.createReadStream();
1443
+ if (!stream)
1444
+ throw new Error('The BPMN download has no readable content.');
1445
+ const chunks = [];
1446
+ for await (const chunk of stream)
1447
+ chunks.push(Buffer.from(chunk));
1448
+ const xml = Buffer.concat(chunks).toString('utf8');
1449
+ const actual = await this.page.evaluate(({ xml, bindings }) => {
1450
+ const document = new DOMParser().parseFromString(xml, 'application/xml');
1451
+ if (document.querySelector('parsererror'))
1452
+ throw new Error('Invalid BPMN XML.');
1453
+ return bindings.map(({ elementId }) => {
1454
+ const element = Array.from(document.getElementsByTagName('*')).find((element) => element.getAttribute('id') === elementId);
1455
+ return {
1456
+ elementId,
1457
+ id: element?.getAttribute('zeebe:modelerTemplate'),
1458
+ version: Number(element?.getAttribute('zeebe:modelerTemplateVersion')),
1459
+ elementType: element?.localName,
1460
+ };
1461
+ });
1462
+ }, { xml, bindings });
1463
+ (0, test_1.expect)(actual).toEqual(bindings);
1464
+ }
1387
1465
  async changeElementToAdHocSubProcess(elementId) {
1388
1466
  const element = this.page.locator(`.djs-shape[data-element-id="${elementId}"]`);
1389
1467
  await this.openChangeElementPopupForElement(elementId);
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import { Browser, Page, Locator } from '@playwright/test';
2
3
  declare class ModelerHomePage {
3
4
  private page;
@@ -76,7 +77,7 @@ declare class ModelerHomePage {
76
77
  private openWorkspaceTile;
77
78
  private openOrCreateLegacyFolder;
78
79
  private dismissModals;
79
- clickProcessDiagram(name: string): Promise<void>;
80
+ clickProcessDiagram(name: string, exact?: boolean): Promise<void>;
80
81
  clickHomeBreadcrumb(): Promise<void>;
81
82
  clickChooseBpmnTemplateButton(): Promise<void>;
82
83
  clickDiagramTypeDropdown(): Promise<void>;
@@ -88,6 +89,12 @@ declare class ModelerHomePage {
88
89
  clickProjectBreadcrumb(): Promise<void>;
89
90
  clickWorkspaceBreadcrumb(): Promise<void>;
90
91
  enterResourceContainer(name?: string, assignEnvironment?: boolean): Promise<void>;
92
+ uploadTemplateFiles(files: {
93
+ name: string;
94
+ buffer: Buffer;
95
+ }[]): Promise<void>;
96
+ private importedTemplateRow;
97
+ openImportedTemplate(resourceName: string): Promise<void>;
91
98
  private clickCreateProcessApplication;
92
99
  private ensureInResourceContainer;
93
100
  returnToResourceContainer(): Promise<void>;
@@ -673,16 +673,20 @@ class ModelerHomePage {
673
673
  // entirely (to Optimize, to Operate) and come back via
674
674
  // clickCrossComponentProjectFolder(), which lands at workspace root -- the
675
675
  // resource is one level down, so re-enter the container first.
676
- async clickProcessDiagram(name) {
676
+ async clickProcessDiagram(name, exact = false) {
677
677
  await this.ensureInResourceContainer();
678
678
  // A Design System table row opens through a link laid over the row, which
679
679
  // sits on top of the title text and takes its clicks -- so click the link.
680
680
  // The link comes before the title in DOM order, so `first()` picks it
681
681
  // whenever it exists; the title stays as the fallback for the classic table.
682
- const row = this.rows.filter({ hasText: name });
682
+ const row = exact
683
+ ? this.importedTemplateRow(name)
684
+ : this.rows.filter({ hasText: name });
685
+ if (exact)
686
+ await (0, test_1.expect)(row).toHaveCount(1);
683
687
  const process = row
684
- .getByRole('link', { name })
685
- .or(row.getByTitle(name))
688
+ .getByRole('link', { name, exact })
689
+ .or(row.getByTitle(name, { exact }))
686
690
  .first();
687
691
  await (0, test_1.expect)(process).toBeVisible({ timeout: 90000 });
688
692
  await process.click();
@@ -910,6 +914,38 @@ class ModelerHomePage {
910
914
  await this.processApplicationPage.ensureStageCluster(process.env.MODELER_CLUSTER_NAME);
911
915
  }
912
916
  }
917
+ async uploadTemplateFiles(files) {
918
+ await (0, test_1.expect)(this.processApplicationPage.createNewDropdown).toBeVisible({
919
+ timeout: 30000,
920
+ });
921
+ for (const file of files) {
922
+ await (0, test_1.expect)(this.importedTemplateRow(file.name.replace(/\.json$/, ''))).toHaveCount(0);
923
+ }
924
+ await this.processApplicationPage.createNewDropdown.click();
925
+ const chooserPromise = this.page.waitForEvent('filechooser');
926
+ await this.page
927
+ .getByRole('menuitem', { name: 'Upload files', exact: true })
928
+ .click();
929
+ await (await chooserPromise).setFiles(files.map((file) => ({ ...file, mimeType: 'application/json' })));
930
+ // The batch handler can report success for a partial upload.
931
+ for (const file of files) {
932
+ const row = this.importedTemplateRow(file.name.replace(/\.json$/, ''));
933
+ await (0, test_1.expect)(row).toHaveCount(1, { timeout: 60000 });
934
+ await (0, test_1.expect)(row).toBeVisible({ timeout: 60000 });
935
+ }
936
+ }
937
+ importedTemplateRow(name) {
938
+ return this.rows.filter({
939
+ has: this.page
940
+ .getByRole('link', { name, exact: true })
941
+ .or(this.page.getByTitle(name, { exact: true }))
942
+ .or(this.page.getByRole('cell', { name, exact: true })),
943
+ });
944
+ }
945
+ async openImportedTemplate(resourceName) {
946
+ await this.clickProcessDiagram(resourceName, true);
947
+ await this.page.waitForURL(/\/element-templates\//, { timeout: 30000 });
948
+ }
913
949
  // Which control creates a process application depends on the hub version
914
950
  // under test. Since camunda/camunda-hub#25831 it is a plain primary button on
915
951
  // the workspace root, and the "Create new" menu explicitly hides the item
@@ -16,16 +16,38 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  */
17
17
  const _8_10_1 = require("../../../../fixtures/8.10");
18
18
  const test_1 = require("@playwright/test");
19
+ const UtilitiesPage_1 = require("../../../../pages/8.10/UtilitiesPage");
20
+ const _setup_1 = require("../../../../test-setup.js");
19
21
  const apiHelpers_1 = require("../../../../utils/apiHelpers");
20
22
  const constants_1 = require("../../../../utils/constants");
21
23
  const mcpHelpers_1 = require("../../../../utils/mcpHelpers");
24
+ const users_1 = require("../../../../utils/users");
25
+ const testUser = (0, users_1.getTestUser)();
26
+ let suiteSetup;
22
27
  let authToken;
23
28
  let mcpProcessesUrl;
24
29
  let messageSubscriptionsSearchUrl;
25
30
  let mcpSessionId = null;
26
31
  _8_10_1.test.describe
27
32
  .parallel('Orchestration Cluster MCP Server — /mcp/processes tools/list', () => {
28
- _8_10_1.test.beforeAll(async () => {
33
+ // The agentic-cluster credentials come from test-setup and only reach this
34
+ // spec within the same `playwright test` invocation. Runs launched with
35
+ // --no-deps (flakiness validate loop, fix-agent verification) lack them, so
36
+ // provision our own API client first. That needs a logged-in Console page,
37
+ // i.e. test-scoped fixtures, hence beforeEach + a once-per-worker setup
38
+ // instead of beforeAll. No browser work happens when the creds are present.
39
+ _8_10_1.test.beforeEach(async ({ page, loginPage, homePage, clusterPage, clusterDetailsPage }, testInfo) => {
40
+ if (!process.env.ZEEBE_API_CLIENT_ID_AGENTIC_CLUSTER) {
41
+ // Provisioning the cluster when the org lacks it outlasts the default
42
+ // timeout; same budget the setup test gets for it (create + restart).
43
+ _8_10_1.test.setTimeout(testInfo.timeout + 3600000);
44
+ await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
45
+ await (0, UtilitiesPage_1.ensureClusterTypeApiCredentials)(page, 'agentic_cluster', 'MCP_List_Tools_API_Client' + (await (0, _setup_1.generateRandomStringAsync)(3)), homePage, clusterDetailsPage, 'Agentic Orchestration Cluster', clusterPage, true);
46
+ }
47
+ suiteSetup ??= setupSuite();
48
+ await suiteSetup;
49
+ });
50
+ const setupSuite = async () => {
29
51
  authToken = await (0, apiHelpers_1.authSaasAPI)(undefined, 'agentic_cluster');
30
52
  mcpProcessesUrl = (0, apiHelpers_1.buildZeebeApiUrl)('/mcp/processes', 'saas', 'agentic_cluster');
31
53
  messageSubscriptionsSearchUrl = (0, apiHelpers_1.buildZeebeApiUrl)('/v2/message-subscriptions/search', 'saas', 'agentic_cluster');
@@ -56,7 +78,7 @@ _8_10_1.test.describe
56
78
  const v2Key = await (0, apiHelpers_1.deployProcess)('./resources/mcp_server_saas/mcp_as_tool_v2.bpmn', authToken, 'saas', 'agentic_cluster');
57
79
  if (v2Key == null)
58
80
  throw new Error('Failed to deploy mcp_as_tool_v2.bpmn');
59
- });
81
+ };
60
82
  (0, _8_10_1.test)('SC-MCP-02 — Static observability tools always present in tools/list', async () => {
61
83
  const apiContext = await (0, apiHelpers_1.getApiRequestContext)();
62
84
  await (0, test_1.expect)(async () => {
@@ -693,6 +693,13 @@ _8_7_1.test.describe('Web Modeler User Flow Tests', () => {
693
693
  await modelerCreatePage.modelCamundaUserTaskDiagram(processName, processName);
694
694
  await modelerCreatePage.linkFormToStartEvent(formName);
695
695
  await modelerCreatePage.enablePublicAccessIfDisabled();
696
+ // The deploy sends what the server holds, and the public-access toggle
697
+ // (the last edit) is only persisted by Hub's ~10s debounced autosave.
698
+ // Deploying before it lands publishes no public link, so the
699
+ // Publication tab never renders its "Copy to clipboard" code block.
700
+ // 15s covers that debounce without paying the full default when the
701
+ // save already landed during the toggle's own wait.
702
+ await modelerCreatePage.waitForAutosaveAfterEdits(15000);
696
703
  await modelerCreatePage.deployDiagram(clusterName);
697
704
  await (0, sleep_1.sleep)(10000);
698
705
  });
@@ -706,10 +713,14 @@ _8_7_1.test.describe('Web Modeler User Flow Tests', () => {
706
713
  });
707
714
  await _8_7_1.test.step('Access Public Form After Session Reset and Submit the Form', async () => {
708
715
  console.log('Navigating to public form:', publicFormLink);
709
- await page.goto(publicFormLink);
710
- await (0, test_1.expect)(taskDetailsPage.textInput).toBeVisible({
711
- timeout: 30000,
712
- });
716
+ // The public form can take a moment to become servable right after the
717
+ // deploy; re-open the link rather than waiting on one blank page.
718
+ await (0, test_1.expect)(async () => {
719
+ await page.goto(publicFormLink);
720
+ await (0, test_1.expect)(taskDetailsPage.textInput).toBeVisible({
721
+ timeout: 30000,
722
+ });
723
+ }).toPass({ timeout: 120000, intervals: [5000] });
713
724
  await taskDetailsPage.fillTextInput('Public Form Test Value');
714
725
  await taskDetailsPage.clickSubmitButton();
715
726
  await (0, test_1.expect)(page.getByRole('heading', { name: 'Success!' })).toBeVisible({
@@ -343,6 +343,106 @@ test.describe('Connectors User Flow Tests @tasklistV2', () => {
343
343
  await modelerCreatePage.applyAiAgentSubProcessTemplate();
344
344
  });
345
345
  });
346
+ test('Agentic Connector Template File Import User Flow', async ({ request, modelerHomePage, modelerCreatePage, connectorTemplatePage, }) => {
347
+ const suffix = await (0, _setup_1.generateRandomStringAsync)(8);
348
+ const source = 'https://raw.githubusercontent.com/camunda/connectors/' +
349
+ '44784a99762663e60b5224578645ecbff4a1065f/' +
350
+ 'connectors/agentic-ai/connector-agentic-ai/element-templates/';
351
+ const templates = [
352
+ {
353
+ file: 'agenticai-mcp-client-outbound-connector.json',
354
+ id: 'io.camunda.connectors.agenticai.mcp.client.v0',
355
+ name: 'MCP Client',
356
+ version: 3,
357
+ engine: '^8.9',
358
+ target: 'task',
359
+ },
360
+ {
361
+ file: 'agenticai-mcp-remote-client-outbound-connector.json',
362
+ id: 'io.camunda.connectors.agenticai.mcp.remoteclient.v0',
363
+ name: 'MCP Remote Client',
364
+ version: 3,
365
+ engine: '^8.9',
366
+ target: 'task',
367
+ },
368
+ {
369
+ file: 'agenticai-adhoctoolsschema-outbound-connector.json',
370
+ id: 'io.camunda.connectors.agenticai.adhoctoolsschema.v1',
371
+ name: 'Ad-hoc tools schema',
372
+ version: 2,
373
+ engine: '^8.8',
374
+ target: 'task',
375
+ },
376
+ {
377
+ file: 'agenticai-a2a-client-webhook-inbound-connector-receive.json',
378
+ id: 'io.camunda.connectors.agenticai.a2a.client.webhook.receive.v0',
379
+ name: 'A2A Client Webhook Receive Task Connector (early access)',
380
+ version: 1,
381
+ engine: '^8.9',
382
+ target: 'receiveTask',
383
+ },
384
+ {
385
+ file: 'agenticai-a2a-client-webhook-inbound-connector-intermediate.json',
386
+ id: 'io.camunda.connectors.agenticai.a2a.client.webhook.intermediate.v0',
387
+ name: 'A2A Client Webhook Intermediate Catch Event Connector (early access)',
388
+ version: 1,
389
+ engine: '^8.9',
390
+ target: 'intermediateCatchEvent',
391
+ },
392
+ ];
393
+ const files = await test.step('Download pinned compatible template files', async () => {
394
+ const files = [];
395
+ for (const template of templates) {
396
+ const response = await request.get(source + template.file);
397
+ (0, test_1.expect)(response.ok(), `Download ${template.file}: ${response.status()}`).toBe(true);
398
+ const buffer = await response.body();
399
+ const content = JSON.parse(buffer.toString('utf8'));
400
+ (0, test_1.expect)(content).toMatchObject({
401
+ id: template.id,
402
+ name: template.name,
403
+ version: template.version,
404
+ engines: { camunda: template.engine },
405
+ });
406
+ (0, test_1.expect)(content).not.toHaveProperty('deprecated');
407
+ files.push({ name: `${template.id}_${suffix}.json`, buffer });
408
+ }
409
+ return files;
410
+ });
411
+ await test.step('Import files into a fresh Workspace project', async () => {
412
+ await modelerHomePage.createDisposableWorkspace(`Template import ${suffix}`);
413
+ await modelerHomePage.enterResourceContainer(`Template import ${suffix}`, false);
414
+ await modelerHomePage.uploadTemplateFiles(files);
415
+ });
416
+ await test.step('Publish each imported draft to this Workspace only', async () => {
417
+ for (const template of templates) {
418
+ await modelerHomePage.openImportedTemplate(`${template.id}_${suffix}`);
419
+ await connectorTemplatePage.publishImportedTemplateToWorkspace(template.version);
420
+ await modelerHomePage.returnToResourceContainer();
421
+ }
422
+ });
423
+ await modelerHomePage.createBpmnTemplateWithoutEnvironment();
424
+ await modelerCreatePage.enterDiagramName(`Imported templates ${suffix}`);
425
+ // Modeler's diagram targets stop at 8.10; the suite targets SM 8.11.
426
+ await modelerCreatePage.setEngineVersion('8.10');
427
+ let previousElementId = 'StartEvent_1';
428
+ const bindings = [];
429
+ for (const template of templates) {
430
+ await test.step(`Apply ${template.name} to its supported element`, async () => {
431
+ const elementId = await modelerCreatePage.appendTemplateTarget(previousElementId, template.target);
432
+ await modelerCreatePage.applyImportedTemplate(elementId, template);
433
+ bindings.push({
434
+ elementId,
435
+ id: template.id,
436
+ version: template.version,
437
+ elementType: template.target === 'task' ? 'serviceTask' : template.target,
438
+ });
439
+ previousElementId = elementId;
440
+ });
441
+ }
442
+ await test.step('Verify exact template IDs and versions in the exported diagram', async () => {
443
+ await modelerCreatePage.assertExportedTemplateBindings(bindings);
444
+ });
445
+ });
346
446
  //Skipped due to bug 1252: https://github.com/camunda/c8-cross-component-e2e-tests/issues/1252
347
447
  test.skip('Connectors Timer Event User Flow', async ({ page, modelerHomePage, modelerCreatePage, connectorMarketplacePage, connectorTemplatePage, navigationPage, operateProcessInstancePage, operateHomePage, operateProcessesPage, }) => {
348
448
  test.slow();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1513",
3
+ "version": "0.0.1515",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",