@camunda/e2e-test-suite 0.0.1226 → 0.0.1228
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/SM-8.10/ModelerCreatePage.d.ts +1 -0
- package/dist/pages/SM-8.10/ModelerCreatePage.js +43 -19
- package/dist/pages/SM-8.10/OptimizeDashboardPage.js +6 -5
- package/dist/pages/SM-8.10/OptimizeHomePage.js +6 -8
- package/dist/pages/SM-8.10/UtilitiesPage.js +18 -5
- package/package.json +1 -1
|
@@ -218,6 +218,7 @@ declare class ModelerCreatePage {
|
|
|
218
218
|
embedForm(formName: string): Promise<void>;
|
|
219
219
|
clickFirstPlaceRESTConnector(): Promise<void>;
|
|
220
220
|
dismissCreatePad(): Promise<void>;
|
|
221
|
+
private isAuthenticationPanelOpen;
|
|
221
222
|
private openAuthenticationPanel;
|
|
222
223
|
setOAuthTokenEndpoint(elementToClick: Locator, endpoint: string, options?: {
|
|
223
224
|
retries?: number;
|
|
@@ -324,8 +324,11 @@ class ModelerCreatePage {
|
|
|
324
324
|
.getByText('zeebeClientId');
|
|
325
325
|
this.variableAssignmentValueTextboxThirdVariable = page.locator('#bio-properties-panel-StartEvent_1-output-2-source div');
|
|
326
326
|
this.firstPlaceRESTConnector = page.locator('g:nth-child(2) > .djs-element > .djs-hit');
|
|
327
|
+
// Scoped to the group header (not any div whose text is "Authentication")
|
|
328
|
+
// so its class list can be read: the header carries `open` exactly while
|
|
329
|
+
// the group is expanded, which openAuthenticationPanel keys on.
|
|
327
330
|
this.authenticationPanel = page
|
|
328
|
-
.locator('
|
|
331
|
+
.locator('.bio-properties-panel-group-header')
|
|
329
332
|
.filter({ hasText: /^Authentication$/ })
|
|
330
333
|
.first();
|
|
331
334
|
this.templateNotFoundTag = page
|
|
@@ -1739,6 +1742,17 @@ class ModelerCreatePage {
|
|
|
1739
1742
|
.waitFor({ state: 'hidden', timeout: 10000 })
|
|
1740
1743
|
.catch(() => false);
|
|
1741
1744
|
}
|
|
1745
|
+
async isAuthenticationPanelOpen() {
|
|
1746
|
+
const classes = await this.authenticationPanel
|
|
1747
|
+
.getAttribute('class', { timeout: 5000 })
|
|
1748
|
+
.catch(() => null);
|
|
1749
|
+
return (classes ?? '').split(/\s+/).includes('open');
|
|
1750
|
+
}
|
|
1751
|
+
// The header is a toggle, not an "open" button, and the properties panel
|
|
1752
|
+
// keeps a group's expanded state across element selections — so clicking it
|
|
1753
|
+
// unconditionally collapses a group that a previous element already opened.
|
|
1754
|
+
// Click only while `open` is absent, then wait for it to appear.
|
|
1755
|
+
//
|
|
1742
1756
|
// The Authentication group is contributed by the REST connector element
|
|
1743
1757
|
// template, so it renders only while the version the diagram pins in
|
|
1744
1758
|
// zeebe:modelerTemplateVersion is among the element templates Web Modeler
|
|
@@ -1746,22 +1760,30 @@ class ModelerCreatePage {
|
|
|
1746
1760
|
// "Template: Not found" and the group can never appear, so report that as
|
|
1747
1761
|
// its own cause instead of a bare 60s click timeout.
|
|
1748
1762
|
async openAuthenticationPanel() {
|
|
1749
|
-
|
|
1750
|
-
await this.
|
|
1751
|
-
|
|
1752
|
-
catch (err) {
|
|
1753
|
-
const templateMissing = await this.templateNotFoundTag
|
|
1754
|
-
.isVisible()
|
|
1755
|
-
.catch(() => false);
|
|
1756
|
-
if (templateMissing) {
|
|
1757
|
-
throw new Error('REST connector element template did not resolve for this element: ' +
|
|
1758
|
-
'the properties panel shows "Template: Not found", so its ' +
|
|
1759
|
-
'Authentication group never renders. The zeebe:modelerTemplateVersion ' +
|
|
1760
|
-
'pinned in the uploaded fixture is no longer one of the element ' +
|
|
1761
|
-
'template versions this Web Modeler offers — re-pin the fixture to ' +
|
|
1762
|
-
'the offered version.');
|
|
1763
|
+
for (let attempt = 1; attempt <= 3; attempt++) {
|
|
1764
|
+
if (await this.isAuthenticationPanelOpen()) {
|
|
1765
|
+
return;
|
|
1763
1766
|
}
|
|
1764
|
-
|
|
1767
|
+
try {
|
|
1768
|
+
await this.authenticationPanel.click({ timeout: 60000 });
|
|
1769
|
+
}
|
|
1770
|
+
catch (err) {
|
|
1771
|
+
const templateMissing = await this.templateNotFoundTag
|
|
1772
|
+
.isVisible()
|
|
1773
|
+
.catch(() => false);
|
|
1774
|
+
if (templateMissing) {
|
|
1775
|
+
throw new Error('REST connector element template did not resolve for this element: ' +
|
|
1776
|
+
'the properties panel shows "Template: Not found", so its ' +
|
|
1777
|
+
'Authentication group never renders. The zeebe:modelerTemplateVersion ' +
|
|
1778
|
+
'pinned in the uploaded fixture is no longer one of the element ' +
|
|
1779
|
+
'template versions this Web Modeler offers — re-pin the fixture to ' +
|
|
1780
|
+
'the offered version.');
|
|
1781
|
+
}
|
|
1782
|
+
throw err;
|
|
1783
|
+
}
|
|
1784
|
+
await (0, test_1.expect)(this.authenticationPanel)
|
|
1785
|
+
.toHaveClass(/(?:^|\s)open(?:\s|$)/, { timeout: 10000 })
|
|
1786
|
+
.catch(() => false);
|
|
1765
1787
|
}
|
|
1766
1788
|
}
|
|
1767
1789
|
async setOAuthTokenEndpoint(elementToClick, endpoint, options) {
|
|
@@ -1792,14 +1814,16 @@ class ModelerCreatePage {
|
|
|
1792
1814
|
let lastError;
|
|
1793
1815
|
for (let attempt = 1; attempt <= retries; attempt++) {
|
|
1794
1816
|
try {
|
|
1795
|
-
await (0, test_1.expect)(this.oauthTokenEndpointInput).toBeVisible({
|
|
1796
|
-
|
|
1817
|
+
await (0, test_1.expect)(this.oauthTokenEndpointInput).toBeVisible({
|
|
1818
|
+
timeout: 10000,
|
|
1819
|
+
});
|
|
1820
|
+
await this.oauthTokenEndpointInput.click({ timeout: 10000 });
|
|
1797
1821
|
await this.oauthTokenEndpointInput.fill(endpoint, { timeout: 30000 });
|
|
1798
1822
|
return;
|
|
1799
1823
|
}
|
|
1800
1824
|
catch (err) {
|
|
1801
1825
|
lastError = err;
|
|
1802
|
-
await this.
|
|
1826
|
+
await this.openAuthenticationPanel();
|
|
1803
1827
|
await (0, sleep_1.sleep)(settleMs);
|
|
1804
1828
|
}
|
|
1805
1829
|
}
|
|
@@ -7,12 +7,13 @@ class OptimizeDashboardPage {
|
|
|
7
7
|
filterTable;
|
|
8
8
|
constructor(page) {
|
|
9
9
|
this.page = page;
|
|
10
|
-
// Optimize's
|
|
11
|
-
// placeholder
|
|
12
|
-
//
|
|
10
|
+
// Optimize's Design System EntityList replaced the Carbon table toolbar
|
|
11
|
+
// search (placeholder "Filter table") with a plain input whose placeholder
|
|
12
|
+
// is the `home.search.name` translation, "Search for name...". Match
|
|
13
|
+
// either so the filter resolves on both shells.
|
|
13
14
|
this.filterTable = page
|
|
14
|
-
.getByPlaceholder(
|
|
15
|
-
.or(page.getByPlaceholder('
|
|
15
|
+
.getByPlaceholder(/Search for name/i)
|
|
16
|
+
.or(page.getByPlaceholder('Filter table'))
|
|
16
17
|
.first();
|
|
17
18
|
}
|
|
18
19
|
async clickFilterTable() {
|
|
@@ -14,10 +14,9 @@ class OptimizeHomePage {
|
|
|
14
14
|
licenseKeyTagProduction;
|
|
15
15
|
constructor(page) {
|
|
16
16
|
this.page = page;
|
|
17
|
-
//
|
|
18
|
-
// (`<nav aria-label="Main navigation">`),
|
|
19
|
-
//
|
|
20
|
-
// header-scoped lookup as a fallback so both shells resolve.
|
|
17
|
+
// Optimize's Design System navigation moved Dashboards/Collections out of
|
|
18
|
+
// the top banner into a left sidebar (`<nav aria-label="Main navigation">`),
|
|
19
|
+
// so a banner-scoped link can no longer resolve. Match either shell.
|
|
21
20
|
this.collectionsLink = page
|
|
22
21
|
.getByRole('navigation', { name: 'Main navigation' })
|
|
23
22
|
.getByRole('link', { name: 'Collections' })
|
|
@@ -25,10 +24,9 @@ class OptimizeHomePage {
|
|
|
25
24
|
.first();
|
|
26
25
|
this.dashboardLink = page.getByRole('link', { name: 'Dashboard' });
|
|
27
26
|
this.modalCloseButton = page.getByText('Close', { exact: true });
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
// either shell.
|
|
27
|
+
// See NavigationPage.optimizePageBanner: the Design System header renders
|
|
28
|
+
// the logo as its own anchor labelled "Camunda Optimize", so the legacy
|
|
29
|
+
// combined "Camunda logo Optimize" name is gone. Match either shell.
|
|
32
30
|
this.optimizeBanner = page
|
|
33
31
|
.getByRole('link', { name: 'Camunda logo Optimize' })
|
|
34
32
|
.or(page.getByRole('link', { name: 'Camunda Optimize', exact: true }))
|
|
@@ -546,17 +546,30 @@ async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modele
|
|
|
546
546
|
await page.reload();
|
|
547
547
|
await page.waitForLoadState('networkidle');
|
|
548
548
|
await modelerCreatePage.fillStartEventVariablesForDocHandling(zeebeUrl, zeebeClientId, zeebeClientSecret);
|
|
549
|
-
|
|
549
|
+
// bpmn-js reorders the canvas `<g>` groups as elements render and get
|
|
550
|
+
// selected, so `g:nth-child(N)` does not keep pointing at the task it was
|
|
551
|
+
// written for. Pin each shape by its BPMN id from the fixture instead: these
|
|
552
|
+
// are exactly the five REST tasks the fixture configures with
|
|
553
|
+
// `authentication.type = oauth-client-credentials-flow`, i.e. the ones that
|
|
554
|
+
// render an "OAuth 2.0 token endpoint" field. The sixth task
|
|
555
|
+
// (Activity_0jxgggi, "Download & store Image as 'doc' storage") is `noAuth`
|
|
556
|
+
// and has no such field.
|
|
557
|
+
const restTaskHit = (elementId) => page
|
|
558
|
+
.locator(`.djs-element[data-element-id="${elementId}"] .djs-hit`)
|
|
559
|
+
.first();
|
|
560
|
+
await modelerCreatePage.setOAuthTokenEndpoint(restTaskHit('Activity_0k0vloc'), endpoint);
|
|
550
561
|
await (0, sleep_1.sleep)(2000);
|
|
551
|
-
await modelerCreatePage.setOAuthTokenEndpoint(
|
|
562
|
+
await modelerCreatePage.setOAuthTokenEndpoint(restTaskHit('Activity_02hwevk'), endpoint);
|
|
552
563
|
await (0, sleep_1.sleep)(2000);
|
|
553
|
-
await modelerCreatePage.setOAuthTokenEndpoint(
|
|
564
|
+
await modelerCreatePage.setOAuthTokenEndpoint(restTaskHit('Activity_1oi90zl'), endpoint);
|
|
565
|
+
// The two parallel-branch tasks sit under the Details panel, so it has to be
|
|
566
|
+
// closed before their shape can be clicked and reopened afterwards.
|
|
554
567
|
await (0, sleep_1.sleep)(2000);
|
|
555
568
|
await modelerCreatePage.clickCloseDetailsPanel();
|
|
556
|
-
await modelerCreatePage.setOAuthTokenEndpoint(
|
|
569
|
+
await modelerCreatePage.setOAuthTokenEndpoint(restTaskHit('Activity_0iyt4gv'), endpoint, { openPanel: true });
|
|
557
570
|
await (0, sleep_1.sleep)(2000);
|
|
558
571
|
await modelerCreatePage.clickCloseDetailsPanel();
|
|
559
|
-
await modelerCreatePage.setOAuthTokenEndpoint(
|
|
572
|
+
await modelerCreatePage.setOAuthTokenEndpoint(restTaskHit('Activity_1oiegam'), endpoint, { openPanel: true });
|
|
560
573
|
await (0, sleep_1.sleep)(2000);
|
|
561
574
|
await modelerCreatePage.runProcessInstance('', tenant);
|
|
562
575
|
}
|