@camunda/e2e-test-suite 0.0.1780 → 0.0.1782
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.11/ClusterPage.js +17 -1
- package/dist/tests/8.11/optimize-agentic-control-panel-api.spec.js +6 -2
- package/dist/tests/8.11/optimize-agentic-control-panel-ui.spec.js +5 -5
- package/dist/utils/agenticDashboardHelpers.d.ts +7 -0
- package/dist/utils/agenticDashboardHelpers.js +16 -1
- package/package.json +1 -1
|
@@ -529,7 +529,23 @@ class ClusterPage {
|
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
async clickClusterLink(name) {
|
|
532
|
-
|
|
532
|
+
const link = this.clusterLink(name);
|
|
533
|
+
// The Hub clusters list fetches its rows from the Console API, which under
|
|
534
|
+
// load answers 429 and leaves the list empty past clickLocatorWithRetry's
|
|
535
|
+
// 3x10s budget; re-open it (reloading to re-trigger a dropped fetch) until
|
|
536
|
+
// the row renders before clicking, as clickClustersBreadcrumb does.
|
|
537
|
+
await (0, test_1.expect)(async () => {
|
|
538
|
+
const rendered = await link
|
|
539
|
+
.waitFor({ state: 'visible', timeout: 15000 })
|
|
540
|
+
.then(() => true)
|
|
541
|
+
.catch(() => false);
|
|
542
|
+
if (!rendered) {
|
|
543
|
+
await this.page.reload({ waitUntil: 'domcontentloaded' });
|
|
544
|
+
await this.clickClusterBanner();
|
|
545
|
+
}
|
|
546
|
+
await (0, test_1.expect)(link).toBeVisible({ timeout: 15000 });
|
|
547
|
+
}).toPass({ timeout: 180000 });
|
|
548
|
+
await (0, clickLocatorWithRetry_1.clickLocatorWithRetry)(this.page, link, {
|
|
533
549
|
postAction: async () => {
|
|
534
550
|
await this.clickClusterBanner();
|
|
535
551
|
},
|
|
@@ -41,11 +41,15 @@ _8_11_1.test.describe('Agentic Control Plane Dashboard API Tests @agentic-dashbo
|
|
|
41
41
|
(0, _8_11_1.test)('Dashboard payload exposes execution count and comparison data', async ({ page, appsPage, optimizeHomePage, }) => {
|
|
42
42
|
const responses = await (0, agenticDashboardHelpers_1.captureDashboardResponses)(page, async () => {
|
|
43
43
|
await (0, agenticDashboardHelpers_1.openAgenticControlPlane)(page, appsPage, optimizeHomePage, clusterName);
|
|
44
|
-
});
|
|
44
|
+
}, { includeNonJsonReportEvaluations: true });
|
|
45
45
|
const definitionBodies = (0, agenticDashboardHelpers_1.parseJsonResponseBodies)(responses.filter(agenticDashboardHelpers_1.isAgenticDashboardDefinitionResponse));
|
|
46
46
|
(0, test_1.expect)(definitionBodies.length).toBeGreaterThan(0);
|
|
47
47
|
(0, test_1.expect)(definitionBodies.some(agenticDashboardHelpers_1.dashboardHasComparisonTile)).toBe(true);
|
|
48
|
-
|
|
48
|
+
// During an Optimize 5xx burst the report bodies are error payloads with
|
|
49
|
+
// no report name; wait for a healthy load, and fail explicitly if not.
|
|
50
|
+
const reportResponses = await (0, agenticDashboardHelpers_1.reloadUntilDashboardReportsHealthy)(page, responses, 6, 10000);
|
|
51
|
+
(0, test_1.expect)(reportResponses.filter((r) => r.status !== 200).map((r) => r.url), 'dashboard report evaluations returned non-200').toEqual([]);
|
|
52
|
+
const reportBodies = (0, agenticDashboardHelpers_1.parseJsonResponseBodies)(reportResponses);
|
|
49
53
|
(0, test_1.expect)(reportBodies.length).toBeGreaterThan(0);
|
|
50
54
|
const executionReport = (0, agenticDashboardHelpers_1.findReportByName)(reportBodies, agenticDashboardHelpers_1.EXECUTION_REPORT_NAME);
|
|
51
55
|
(0, test_1.expect)(executionReport).toBeDefined();
|
|
@@ -18,7 +18,7 @@ _8_11_1.test.describe('Agentic Control Plane Dashboard UI Tests @agentic-dashboa
|
|
|
18
18
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
19
19
|
});
|
|
20
20
|
(0, _8_11_1.test)('Dashboard navigation and default filters render correctly', async ({ page, appsPage, optimizeHomePage, }) => {
|
|
21
|
-
await (0, agenticDashboardHelpers_1.
|
|
21
|
+
await (0, agenticDashboardHelpers_1.openAgenticControlPlaneWithHealthyReports)(page, appsPage, optimizeHomePage, clusterName);
|
|
22
22
|
const heading = page.getByRole('heading', {
|
|
23
23
|
name: /agentic\s*control\s*plane/i,
|
|
24
24
|
});
|
|
@@ -33,21 +33,21 @@ _8_11_1.test.describe('Agentic Control Plane Dashboard UI Tests @agentic-dashboa
|
|
|
33
33
|
});
|
|
34
34
|
});
|
|
35
35
|
(0, _8_11_1.test)('Execution KPI uses Total Executions terminology', async ({ page, appsPage, optimizeHomePage, }) => {
|
|
36
|
-
await (0, agenticDashboardHelpers_1.
|
|
36
|
+
await (0, agenticDashboardHelpers_1.openAgenticControlPlaneWithHealthyReports)(page, appsPage, optimizeHomePage, clusterName);
|
|
37
37
|
await (0, test_1.expect)(page.getByText(/total\s*executions/i).first()).toBeVisible({
|
|
38
38
|
timeout: 60000,
|
|
39
39
|
});
|
|
40
40
|
await (0, test_1.expect)(page.getByText(/completed\s*agent\s*runs/i)).toHaveCount(0);
|
|
41
41
|
});
|
|
42
42
|
(0, _8_11_1.test)('Execution KPIs Delta tile is visible', async ({ page, appsPage, optimizeHomePage, }) => {
|
|
43
|
-
await (0, agenticDashboardHelpers_1.
|
|
43
|
+
await (0, agenticDashboardHelpers_1.openAgenticControlPlaneWithHealthyReports)(page, appsPage, optimizeHomePage, clusterName);
|
|
44
44
|
const deltaTile = page
|
|
45
45
|
.getByText(/execution\s*kpis\s*delta|avg\s*execution\s*duration/i)
|
|
46
46
|
.first();
|
|
47
47
|
await (0, test_1.expect)(deltaTile).toBeVisible({ timeout: 60000 });
|
|
48
48
|
});
|
|
49
49
|
(0, _8_11_1.test)('Process filter switches L0 to L1 chart behavior', async ({ page, appsPage, optimizeHomePage, }) => {
|
|
50
|
-
await (0, agenticDashboardHelpers_1.
|
|
50
|
+
await (0, agenticDashboardHelpers_1.openAgenticControlPlaneWithHealthyReports)(page, appsPage, optimizeHomePage, clusterName);
|
|
51
51
|
const l0Chart = page
|
|
52
52
|
.getByText(/tokens\s*by\s*process|top\s*token\s*consumers\s*by\s*process/i)
|
|
53
53
|
.first();
|
|
@@ -58,7 +58,7 @@ _8_11_1.test.describe('Agentic Control Plane Dashboard UI Tests @agentic-dashboa
|
|
|
58
58
|
await (0, test_1.expect)(page.getByText(/tokens\s*by\s*process|top\s*token\s*consumers\s*by\s*process/i)).toHaveCount(0);
|
|
59
59
|
});
|
|
60
60
|
(0, _8_11_1.test)('Tool Calls remains aggregate and out-of-scope UI controls are absent', async ({ page, appsPage, optimizeHomePage, }) => {
|
|
61
|
-
await (0, agenticDashboardHelpers_1.
|
|
61
|
+
await (0, agenticDashboardHelpers_1.openAgenticControlPlaneWithHealthyReports)(page, appsPage, optimizeHomePage, clusterName);
|
|
62
62
|
const toolCalls = page.getByText(/tool\s*calls/i).first();
|
|
63
63
|
await (0, test_1.expect)(toolCalls).toBeVisible({ timeout: 30000 });
|
|
64
64
|
await (0, test_1.expect)(page.getByText(/per-tool|tool\s*name\s*breakdown/i)).toHaveCount(0);
|
|
@@ -25,6 +25,13 @@ export declare const CURRENT_TERMINOLOGY = "total executions";
|
|
|
25
25
|
export declare const LEGACY_TERMINOLOGY = "completed agent runs";
|
|
26
26
|
export declare function clickFirstVisibleByName(page: Page, role: RoleName, names: string[]): Promise<boolean>;
|
|
27
27
|
export declare function openAgenticControlPlane(page: Page, appsPage: AppsPage, optimizeHomePage: OptimizeHomePage, clusterName: string): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Opens the agentic dashboard and waits until every report evaluation of the
|
|
30
|
+
* load returns 200, so a tile that would render "Error loading data" during an
|
|
31
|
+
* Optimize 5xx burst does not fail a UI assertion for the wrong reason. A
|
|
32
|
+
* persistent 5xx still fails here, naming the failing report URLs.
|
|
33
|
+
*/
|
|
34
|
+
export declare function openAgenticControlPlaneWithHealthyReports(page: Page, appsPage: AppsPage, optimizeHomePage: OptimizeHomePage, clusterName: string): Promise<void>;
|
|
28
35
|
export declare function changeDashboardDateRange(page: Page): Promise<boolean>;
|
|
29
36
|
/**
|
|
30
37
|
* Selects a date-range option on the agentic dashboard and returns its label,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.selectSingleProcessIfPossible = exports.dashboardHasComparisonTile = exports.getReportNumericResult = exports.findReportByName = exports.parseJsonResponseBodies = exports.reloadUntilDashboardReportsHealthy = exports.captureDashboardResponses = exports.isLikelyDashboardApiResponse = exports.isReportEvaluateResponse = exports.isAgenticDashboardDefinitionResponse = exports.selectDashboardDateRange = exports.changeDashboardDateRange = exports.openAgenticControlPlane = exports.clickFirstVisibleByName = exports.LEGACY_TERMINOLOGY = exports.CURRENT_TERMINOLOGY = exports.EXECUTION_REPORT_NAME = exports.REPORT_EVALUATE_PATH_PATTERN = exports.AGENTIC_DASHBOARD_DEFINITION_PATH = void 0;
|
|
3
|
+
exports.selectSingleProcessIfPossible = exports.dashboardHasComparisonTile = exports.getReportNumericResult = exports.findReportByName = exports.parseJsonResponseBodies = exports.reloadUntilDashboardReportsHealthy = exports.captureDashboardResponses = exports.isLikelyDashboardApiResponse = exports.isReportEvaluateResponse = exports.isAgenticDashboardDefinitionResponse = exports.selectDashboardDateRange = exports.changeDashboardDateRange = exports.openAgenticControlPlaneWithHealthyReports = exports.openAgenticControlPlane = exports.clickFirstVisibleByName = exports.LEGACY_TERMINOLOGY = exports.CURRENT_TERMINOLOGY = exports.EXECUTION_REPORT_NAME = exports.REPORT_EVALUATE_PATH_PATTERN = exports.AGENTIC_DASHBOARD_DEFINITION_PATH = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
exports.AGENTIC_DASHBOARD_DEFINITION_PATH = '/api/dashboard/agentic';
|
|
6
6
|
exports.REPORT_EVALUATE_PATH_PATTERN = /\/api\/report\/[^/]+\/evaluate/;
|
|
@@ -41,6 +41,21 @@ async function openAgenticControlPlane(page, appsPage, optimizeHomePage, cluster
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
exports.openAgenticControlPlane = openAgenticControlPlane;
|
|
44
|
+
/**
|
|
45
|
+
* Opens the agentic dashboard and waits until every report evaluation of the
|
|
46
|
+
* load returns 200, so a tile that would render "Error loading data" during an
|
|
47
|
+
* Optimize 5xx burst does not fail a UI assertion for the wrong reason. A
|
|
48
|
+
* persistent 5xx still fails here, naming the failing report URLs.
|
|
49
|
+
*/
|
|
50
|
+
async function openAgenticControlPlaneWithHealthyReports(page, appsPage, optimizeHomePage, clusterName) {
|
|
51
|
+
const responses = await captureDashboardResponses(page, async () => {
|
|
52
|
+
await openAgenticControlPlane(page, appsPage, optimizeHomePage, clusterName);
|
|
53
|
+
}, { includeNonJsonReportEvaluations: true });
|
|
54
|
+
const reports = await reloadUntilDashboardReportsHealthy(page, responses, 6, 10000);
|
|
55
|
+
(0, test_1.expect)(reports.filter((r) => r.status !== 200).map((r) => r.url), 'dashboard report evaluations returned non-200').toEqual([]);
|
|
56
|
+
(0, test_1.expect)(reports.length).toBeGreaterThan(0);
|
|
57
|
+
}
|
|
58
|
+
exports.openAgenticControlPlaneWithHealthyReports = openAgenticControlPlaneWithHealthyReports;
|
|
44
59
|
async function changeDashboardDateRange(page) {
|
|
45
60
|
return (await selectDashboardDateRange(page)) !== null;
|
|
46
61
|
}
|