@camunda/e2e-test-suite 0.0.1517 → 0.0.1519
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.
|
@@ -371,9 +371,16 @@ class ModelerCreatePage {
|
|
|
371
371
|
name: 'Toggle public access',
|
|
372
372
|
});
|
|
373
373
|
this.publicationTab = page.getByRole('tab', { name: 'Publication' });
|
|
374
|
-
|
|
374
|
+
// Hub's PublicationDs.tsx renders each active public link as a
|
|
375
|
+
// design-system CodeBlock (<div data-slot="code-block"><pre><code>URL)
|
|
376
|
+
// instead of the legacy Carbon "Copy to clipboard" control, so accept
|
|
377
|
+
// either; getPublicationLink reads the URL from the <code>.
|
|
378
|
+
this.copyPublicLinkButton = page
|
|
379
|
+
.getByRole('button', {
|
|
375
380
|
name: 'Copy to clipboard',
|
|
376
|
-
})
|
|
381
|
+
})
|
|
382
|
+
.or(page.locator('[data-slot="code-block"]'))
|
|
383
|
+
.first();
|
|
377
384
|
// Legacy Carbon toast vs. the design-system's Sonner-based toast
|
|
378
385
|
// (data-sonner-toast, confirmed from a nightly DOM snapshot) -- same
|
|
379
386
|
// migration already handled for the deploy/instance-started toasts
|
|
@@ -593,11 +600,14 @@ class ModelerCreatePage {
|
|
|
593
600
|
// locator that dialog never had. Give it a real window to render before
|
|
594
601
|
// deciding.
|
|
595
602
|
const environmentRows = this.deployDiagramDialog.locator('[data-test^="environment-row-"]');
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
.
|
|
603
|
+
// Wait for whichever dialog variant renders its content -- a fixed 10s
|
|
604
|
+
// probe for the environment rows alone was too short on a slow Hub, so
|
|
605
|
+
// the environment-based dialog fell through to the legacy branch.
|
|
606
|
+
const legacyClusterLabel = this.deployDiagramDialog
|
|
607
|
+
.locator('label')
|
|
608
|
+
.filter({ hasText: new RegExp(`^${clusterName}`) });
|
|
609
|
+
await (0, test_1.expect)(environmentRows.first().or(legacyClusterLabel).first()).toBeVisible({ timeout: 60000 });
|
|
610
|
+
const hasEnvironmentRows = (await environmentRows.count()) > 0;
|
|
601
611
|
if (hasEnvironmentRows) {
|
|
602
612
|
await (0, modelerCluster_1.selectDeployEnvironment)(this.deployDiagramDialog, clusterName);
|
|
603
613
|
const targetRow = environmentRows.filter({ hasText: clusterName }).first();
|
|
@@ -607,9 +617,7 @@ class ModelerCreatePage {
|
|
|
607
617
|
}
|
|
608
618
|
else {
|
|
609
619
|
//Select the correct cluster if multiple exist
|
|
610
|
-
const clusterLabel =
|
|
611
|
-
.locator('label')
|
|
612
|
-
.filter({ hasText: new RegExp(`^${clusterName}`) });
|
|
620
|
+
const clusterLabel = legacyClusterLabel;
|
|
613
621
|
await (0, test_1.expect)(clusterLabel).toBeVisible({ timeout: 30000 });
|
|
614
622
|
await clusterLabel.click();
|
|
615
623
|
await (0, test_1.expect)(clusterLabel.getByRole('switch').or(clusterLabel.getByRole('radio'))).toBeChecked({ timeout: 30000 });
|
|
@@ -2044,15 +2052,29 @@ class ModelerCreatePage {
|
|
|
2044
2052
|
await this.copyPublicLinkButton.click({ timeout: 60000 });
|
|
2045
2053
|
}
|
|
2046
2054
|
async getPublicationLink() {
|
|
2047
|
-
|
|
2048
|
-
//
|
|
2049
|
-
//
|
|
2050
|
-
|
|
2051
|
-
|
|
2055
|
+
await this.clickPublicationTab();
|
|
2056
|
+
// The Publication tab only lists a link once its 3s poll sees the public
|
|
2057
|
+
// endpoint on a healthy cluster, which can lag the deploy by a while.
|
|
2058
|
+
await (0, test_1.expect)(this.copyPublicLinkButton).toBeVisible({ timeout: 120000 });
|
|
2059
|
+
const codeBlockLink = this.page
|
|
2060
|
+
.locator('[data-slot="code-block"]')
|
|
2061
|
+
.first()
|
|
2062
|
+
.locator('code');
|
|
2063
|
+
if ((await codeBlockLink.count()) > 0) {
|
|
2064
|
+
// The design-system code block shows the URL as text; read it there
|
|
2065
|
+
// rather than through the clipboard.
|
|
2066
|
+
await (0, test_1.expect)(codeBlockLink).toContainText(/https?:\/\//, {
|
|
2067
|
+
timeout: 60000,
|
|
2068
|
+
});
|
|
2069
|
+
const link = (await codeBlockLink.innerText({ timeout: 10000 })).trim();
|
|
2070
|
+
(0, test_1.expect)(link).toMatch(/^https?:\/\//);
|
|
2071
|
+
console.log('Captured public link:', link);
|
|
2072
|
+
return link;
|
|
2073
|
+
}
|
|
2074
|
+
// Legacy Carbon copy button: 'clipboard-write' must be granted BEFORE the
|
|
2075
|
+
// click that copies the link.
|
|
2052
2076
|
const context = this.page.context();
|
|
2053
2077
|
await context.grantPermissions(['clipboard-read', 'clipboard-write']);
|
|
2054
|
-
await this.clickPublicationTab();
|
|
2055
|
-
await (0, test_1.expect)(this.copyPublicLinkButton).toBeVisible({ timeout: 60000 });
|
|
2056
2078
|
await this.clickCopyPublicLinkButton();
|
|
2057
2079
|
// Poll instead of one blind read after a fixed sleep -- the write is
|
|
2058
2080
|
// async on the page's side and has no visible completion signal to wait
|
|
@@ -419,9 +419,11 @@ class ModelerHomePage {
|
|
|
419
419
|
// Hub's newer nav (isNavV2) makes formBreadcrumbButton a no-op and moves
|
|
420
420
|
// the dropdown behind a separate "<name> actions" kebab instead -- prefer
|
|
421
421
|
// it when present, and only fall back to the legacy breadcrumb otherwise.
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
422
|
+
// isVisible() does not wait (its timeout is ignored), so on a slow page
|
|
423
|
+
// the kebab was not rendered yet and the legacy breadcrumb -- absent in
|
|
424
|
+
// the newer nav -- was clicked instead. Wait for either control first.
|
|
425
|
+
await (0, test_1.expect)(this.formActionsButton.or(this.formBreadcrumbButton).first()).toBeVisible({ timeout: 60000 });
|
|
426
|
+
const kebabVisible = await this.formActionsButton.isVisible();
|
|
425
427
|
if (kebabVisible) {
|
|
426
428
|
await this.formActionsButton.click({ timeout: 60000 });
|
|
427
429
|
}
|
|
@@ -112,7 +112,9 @@ class ProcessApplicationPage {
|
|
|
112
112
|
pageReady() {
|
|
113
113
|
return this.folderExplorer.or(this.breadcrumb).first();
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
// 180s: the page alone can take ~35s to render on SaaS integration, and
|
|
116
|
+
// each reload inside waitWithReload costs ~15-20s more of the same budget.
|
|
117
|
+
async waitForProcessApplication(timeout = 180000) {
|
|
116
118
|
await this.waitWithReload(this.pageReady(), timeout);
|
|
117
119
|
}
|
|
118
120
|
// Waits for the create menu inside the folder explorer, reloading when Hub
|
|
@@ -231,18 +231,29 @@ _8_7_1.test.describe('Connectors User Flow Tests', () => {
|
|
|
231
231
|
(0, _8_7_1.test)('Connector Secrets User Flow - AWS', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, connectorSettingsPage, clusterPage, clusterSecretsPage, operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
|
|
232
232
|
_8_7_1.test.slow();
|
|
233
233
|
const processName = 'REST_Connector_Process' + (await (0, _setup_1.generateRandomStringAsync)(3));
|
|
234
|
+
// Per-run secret keys, as in the GCP flow: concurrent runs on "AWS Cluster"
|
|
235
|
+
// otherwise collide on the fixed keys ("Secret names must be unique") and
|
|
236
|
+
// one run's cleanup deletes the secrets another run is about to resolve.
|
|
237
|
+
const secretSuffix = await (0, _setup_1.generateRandomStringAsync)(6);
|
|
238
|
+
const endpointUrlKey = `endpoint_url_${secretSuffix}`;
|
|
239
|
+
const usernameKey = `username_${secretSuffix}`;
|
|
240
|
+
const passwordKey = `password_${secretSuffix}`;
|
|
234
241
|
await _8_7_1.test.step('Navigate to Cluster Secrets', async () => {
|
|
235
242
|
await homePage.clickClusters();
|
|
236
243
|
await clusterPage.clickClusterLink(awsCluster);
|
|
237
244
|
await clusterPage.clickConnectorSecretesTab(awsCluster);
|
|
238
245
|
});
|
|
239
246
|
await _8_7_1.test.step('Delete Connector Secrets If Exist', async () => {
|
|
240
|
-
await clusterSecretsPage.deleteConnectorSecretsIfExist(
|
|
247
|
+
await clusterSecretsPage.deleteConnectorSecretsIfExist([
|
|
248
|
+
endpointUrlKey,
|
|
249
|
+
usernameKey,
|
|
250
|
+
passwordKey,
|
|
251
|
+
]);
|
|
241
252
|
});
|
|
242
253
|
await _8_7_1.test.step('Create Cluster Secrets', async () => {
|
|
243
|
-
await clusterSecretsPage.createNewSecret(awsCluster,
|
|
244
|
-
await clusterSecretsPage.createNewSecret(awsCluster,
|
|
245
|
-
await clusterSecretsPage.createNewSecret(awsCluster,
|
|
254
|
+
await clusterSecretsPage.createNewSecret(awsCluster, endpointUrlKey, constants_1.REST_MOCK_BASIC_AUTH_URL);
|
|
255
|
+
await clusterSecretsPage.createNewSecret(awsCluster, usernameKey, 'username');
|
|
256
|
+
await clusterSecretsPage.createNewSecret(awsCluster, passwordKey, 'password');
|
|
246
257
|
});
|
|
247
258
|
await _8_7_1.test.step('Navigate to Web Modeler', async () => {
|
|
248
259
|
await appsPage.clickCamundaApps();
|
|
@@ -257,7 +268,10 @@ _8_7_1.test.describe('Connectors User Flow Tests', () => {
|
|
|
257
268
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
258
269
|
});
|
|
259
270
|
await _8_7_1.test.step('Create BPMN Diagram with REST Connector using secrets and Start Process Instance', async () => {
|
|
260
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, processName,
|
|
271
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, processName, `secrets.${endpointUrlKey}`, 'basic', '{message:response.body.message}', 'result', {
|
|
272
|
+
username: `secrets.${usernameKey}`,
|
|
273
|
+
password: `secrets.${passwordKey}`,
|
|
274
|
+
});
|
|
261
275
|
await modelerCreatePage.runProcessInstance(awsCluster);
|
|
262
276
|
await (0, test_1.expect)(modelerCreatePage.viewProcessInstanceLink).toBeVisible();
|
|
263
277
|
});
|