@camunda/e2e-test-suite 0.0.1517 → 0.0.1518
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
|