@camunda/e2e-test-suite 0.0.788 → 0.0.790
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/tests/8.10/optimize-agentic-control-panel-ui.spec.d.ts +1 -0
- package/dist/tests/8.10/optimize-agentic-control-panel-ui.spec.js +69 -0
- package/dist/tests/8.7/rba-enabled-user-flows.spec.js +16 -3
- package/dist/utils/agenticDashboardHelpers.d.ts +1 -0
- package/dist/utils/agenticDashboardHelpers.js +25 -1
- package/dist/utils/users.d.ts +4 -0
- package/dist/utils/users.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const test_1 = require("@playwright/test");
|
|
4
|
+
const _8_10_1 = require("../../fixtures/8.10");
|
|
5
|
+
const _setup_1 = require("../../test-setup.js");
|
|
6
|
+
const UtilitiesPage_1 = require("../../pages/8.10/UtilitiesPage");
|
|
7
|
+
const users_1 = require("../../utils/users");
|
|
8
|
+
const agenticDashboardHelpers_1 = require("../../utils/agenticDashboardHelpers");
|
|
9
|
+
const testUser = (0, users_1.getTestUser)('twentyFirstUser');
|
|
10
|
+
const clusterName = 'Test Cluster';
|
|
11
|
+
_8_10_1.test.describe.configure({ mode: 'parallel' });
|
|
12
|
+
_8_10_1.test.describe('Agentic Control Plane Dashboard UI Tests @agentic-dashboard-ui @8.10', () => {
|
|
13
|
+
_8_10_1.test.beforeEach(async ({ page, loginPage }, testInfo) => {
|
|
14
|
+
await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
|
|
15
|
+
});
|
|
16
|
+
_8_10_1.test.afterEach(async ({ page }, testInfo) => {
|
|
17
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
18
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
19
|
+
});
|
|
20
|
+
(0, _8_10_1.test)('Dashboard navigation and default filters render correctly', async ({ page, appsPage, optimizeHomePage, }) => {
|
|
21
|
+
await (0, agenticDashboardHelpers_1.openAgenticControlPlane)(page, appsPage, optimizeHomePage, clusterName);
|
|
22
|
+
const heading = page.getByRole('heading', {
|
|
23
|
+
name: /agentic\s*control\s*plane/i,
|
|
24
|
+
});
|
|
25
|
+
// The dashboard heading confirms the Agentic Control Plane page loaded.
|
|
26
|
+
await (0, test_1.expect)(heading.first()).toBeVisible({ timeout: 30000 });
|
|
27
|
+
await (0, test_1.expect)(page
|
|
28
|
+
.getByText(/total\s*executions|avg\s*execution\s*duration|tool\s*calls/i)
|
|
29
|
+
.first()).toBeVisible({ timeout: 60000 });
|
|
30
|
+
// The process scope filter defaults to the "All processes" placeholder.
|
|
31
|
+
await (0, test_1.expect)(page.getByPlaceholder(/all\s*processes/i)).toBeVisible({
|
|
32
|
+
timeout: 30000,
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
(0, _8_10_1.test)('Execution KPI uses Total Executions terminology', async ({ page, appsPage, optimizeHomePage, }) => {
|
|
36
|
+
await (0, agenticDashboardHelpers_1.openAgenticControlPlane)(page, appsPage, optimizeHomePage, clusterName);
|
|
37
|
+
await (0, test_1.expect)(page.getByText(/total\s*executions/i).first()).toBeVisible({
|
|
38
|
+
timeout: 60000,
|
|
39
|
+
});
|
|
40
|
+
await (0, test_1.expect)(page.getByText(/completed\s*agent\s*runs/i)).toHaveCount(0);
|
|
41
|
+
});
|
|
42
|
+
(0, _8_10_1.test)('Execution KPIs Delta tile is visible', async ({ page, appsPage, optimizeHomePage, }) => {
|
|
43
|
+
await (0, agenticDashboardHelpers_1.openAgenticControlPlane)(page, appsPage, optimizeHomePage, clusterName);
|
|
44
|
+
const deltaTile = page
|
|
45
|
+
.getByText(/execution\s*kpis\s*delta|avg\s*execution\s*duration/i)
|
|
46
|
+
.first();
|
|
47
|
+
await (0, test_1.expect)(deltaTile).toBeVisible({ timeout: 60000 });
|
|
48
|
+
});
|
|
49
|
+
(0, _8_10_1.test)('Process filter switches L0 to L1 chart behavior', async ({ page, appsPage, optimizeHomePage, }) => {
|
|
50
|
+
await (0, agenticDashboardHelpers_1.openAgenticControlPlane)(page, appsPage, optimizeHomePage, clusterName);
|
|
51
|
+
const l0Chart = page
|
|
52
|
+
.getByText(/tokens\s*by\s*process|top\s*token\s*consumers\s*by\s*process/i)
|
|
53
|
+
.first();
|
|
54
|
+
await (0, test_1.expect)(l0Chart).toBeVisible({ timeout: 30000 });
|
|
55
|
+
const selected = await (0, agenticDashboardHelpers_1.selectSingleProcessIfPossible)(page);
|
|
56
|
+
(0, test_1.expect)(selected).toBe(true);
|
|
57
|
+
await (0, test_1.expect)(page.getByText(/failure\s*rate\s*by\s*process\s*version/i).first()).toBeVisible({ timeout: 60000 });
|
|
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
|
+
});
|
|
60
|
+
(0, _8_10_1.test)('Tool Calls remains aggregate and out-of-scope UI controls are absent', async ({ page, appsPage, optimizeHomePage, }) => {
|
|
61
|
+
await (0, agenticDashboardHelpers_1.openAgenticControlPlane)(page, appsPage, optimizeHomePage, clusterName);
|
|
62
|
+
const toolCalls = page.getByText(/tool\s*calls/i).first();
|
|
63
|
+
await (0, test_1.expect)(toolCalls).toBeVisible({ timeout: 30000 });
|
|
64
|
+
await (0, test_1.expect)(page.getByText(/per-tool|tool\s*name\s*breakdown/i)).toHaveCount(0);
|
|
65
|
+
await (0, test_1.expect)(page.getByText(/reasoning\s*tokens/i)).toHaveCount(0);
|
|
66
|
+
await (0, test_1.expect)(page.getByText(/threshold|alert\s*configuration/i)).toHaveCount(0);
|
|
67
|
+
await (0, test_1.expect)(page.getByText(/healthy|degraded|failing/i)).toHaveCount(0);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
@@ -8,6 +8,13 @@ const sleep_1 = require("../../utils/sleep");
|
|
|
8
8
|
const resetSession_1 = require("../../utils/resetSession");
|
|
9
9
|
const users_1 = require("../../utils/users");
|
|
10
10
|
const mainUser = (0, users_1.getTestUser)('twentyFifthUser');
|
|
11
|
+
// "Permission for All Processes" runs in parallel with the two sibling RBA
|
|
12
|
+
// flows. Sharing one account across all three meant a shared login and a
|
|
13
|
+
// shared per-user authorization store, so a sibling's grant surfaced in this
|
|
14
|
+
// flow's assertion and the parallel logins contended. Give it a dedicated
|
|
15
|
+
// user (C8_USERNAME_TEST_27, org admin_18) so its login and authorizations
|
|
16
|
+
// are isolated from the two siblings.
|
|
17
|
+
const allProcessesUser = (0, users_1.getTestUser)('twentySeventhUser');
|
|
11
18
|
_8_7_1.test.describe.configure({ mode: 'parallel' });
|
|
12
19
|
_8_7_1.test.describe('RBA Enabled User Flows Test', () => {
|
|
13
20
|
const clusterNames = {
|
|
@@ -15,8 +22,14 @@ _8_7_1.test.describe('RBA Enabled User Flows Test', () => {
|
|
|
15
22
|
'RBA On User Flow - Permission for One Process': 'Second RBA Cluster',
|
|
16
23
|
'RBA On User Flow - Permission for All Processes': 'Third RBA Cluster',
|
|
17
24
|
};
|
|
25
|
+
const usersByTitle = {
|
|
26
|
+
'RBA On User Flow - No User Permission': mainUser,
|
|
27
|
+
'RBA On User Flow - Permission for One Process': mainUser,
|
|
28
|
+
'RBA On User Flow - Permission for All Processes': allProcessesUser,
|
|
29
|
+
};
|
|
18
30
|
_8_7_1.test.beforeEach(async ({ page, homePage, clusterPage, loginPage }, testInfo) => {
|
|
19
|
-
|
|
31
|
+
const currentUser = usersByTitle[testInfo.title] ?? mainUser;
|
|
32
|
+
await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, currentUser, (testInfo.workerIndex + 1) * 1000);
|
|
20
33
|
await (0, test_1.expect)(homePage.clusterTab).toBeVisible({ timeout: 120000 });
|
|
21
34
|
await homePage.clickClusters();
|
|
22
35
|
(0, test_1.expect)(clusterNames[testInfo.title]).toBeTruthy();
|
|
@@ -249,7 +262,7 @@ _8_7_1.test.describe('RBA Enabled User Flows Test', () => {
|
|
|
249
262
|
await appsPage.clickConsoleLink();
|
|
250
263
|
await homePage.clickOrganization();
|
|
251
264
|
await consoleOrganizationsPage.clickUsersTab();
|
|
252
|
-
await consoleOrganizationsPage.clickMainUser(
|
|
265
|
+
await consoleOrganizationsPage.clickMainUser(allProcessesUser.username);
|
|
253
266
|
await consoleOrganizationsPage.clickAuthorizations();
|
|
254
267
|
await consoleOrganizationsPage.authorizedResourcesAssertion([
|
|
255
268
|
processId,
|
|
@@ -269,7 +282,7 @@ _8_7_1.test.describe('RBA Enabled User Flows Test', () => {
|
|
|
269
282
|
await appsPage.clickConsoleLink();
|
|
270
283
|
await homePage.clickOrganization();
|
|
271
284
|
await consoleOrganizationsPage.clickUsersTab();
|
|
272
|
-
await consoleOrganizationsPage.clickMainUser(
|
|
285
|
+
await consoleOrganizationsPage.clickMainUser(allProcessesUser.username);
|
|
273
286
|
await consoleOrganizationsPage.clickAuthorizations();
|
|
274
287
|
await consoleOrganizationsPage.authorizedResourcesAssertion([
|
|
275
288
|
processId1,
|
|
@@ -34,4 +34,5 @@ export declare function parseJsonResponseBodies(responses: CapturedResponse[]):
|
|
|
34
34
|
export declare function findReportByName(bodies: unknown[], name: string): unknown;
|
|
35
35
|
export declare function getReportNumericResult(body: unknown): number | undefined;
|
|
36
36
|
export declare function dashboardHasComparisonTile(definition: unknown): boolean;
|
|
37
|
+
export declare function selectSingleProcessIfPossible(page: Page): Promise<boolean>;
|
|
37
38
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dashboardHasComparisonTile = exports.getReportNumericResult = exports.findReportByName = exports.parseJsonResponseBodies = exports.captureDashboardResponses = exports.isLikelyDashboardApiResponse = exports.isReportEvaluateResponse = exports.isAgenticDashboardDefinitionResponse = 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.captureDashboardResponses = exports.isLikelyDashboardApiResponse = exports.isReportEvaluateResponse = exports.isAgenticDashboardDefinitionResponse = 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;
|
|
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/;
|
|
@@ -184,3 +184,27 @@ function dashboardHasComparisonTile(definition) {
|
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
exports.dashboardHasComparisonTile = dashboardHasComparisonTile;
|
|
187
|
+
async function selectSingleProcessIfPossible(page) {
|
|
188
|
+
const processFilter = page.getByPlaceholder(/all\s*processes/i).first();
|
|
189
|
+
if (!(await processFilter.isVisible({ timeout: 10000 }).catch(() => false))) {
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
await processFilter.click({ timeout: 15000 });
|
|
193
|
+
const options = page.getByRole('option');
|
|
194
|
+
await options
|
|
195
|
+
.first()
|
|
196
|
+
.waitFor({ state: 'visible', timeout: 10000 })
|
|
197
|
+
.catch(() => { });
|
|
198
|
+
const optionCount = await options.count();
|
|
199
|
+
for (let i = 0; i < optionCount; i++) {
|
|
200
|
+
const option = options.nth(i);
|
|
201
|
+
const text = (await option.textContent())?.trim().toLowerCase() || '';
|
|
202
|
+
if (text.length > 0 && !text.includes('all process')) {
|
|
203
|
+
await option.click({ timeout: 10000 });
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
await page.keyboard.press('Escape').catch(() => { });
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
exports.selectSingleProcessIfPossible = selectSingleProcessIfPossible;
|
package/dist/utils/users.d.ts
CHANGED
package/dist/utils/users.js
CHANGED
|
@@ -70,6 +70,10 @@ exports.testUsers = {
|
|
|
70
70
|
username: process.env.C8_USERNAME_TEST_26,
|
|
71
71
|
password: process.env.C8_PASSWORD_TEST_26,
|
|
72
72
|
},
|
|
73
|
+
twentySeventhUser: {
|
|
74
|
+
username: process.env.C8_USERNAME_TEST_27,
|
|
75
|
+
password: process.env.C8_PASSWORD_TEST_27,
|
|
76
|
+
},
|
|
73
77
|
};
|
|
74
78
|
exports.smokeTestUsers = {
|
|
75
79
|
mainUser: {
|