@camunda/e2e-test-suite 0.0.1328 → 0.0.1330
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/.github/c8_versions.json +1 -0
- package/README.md +1 -0
- package/dist/fixtures/8.11.d.ts +83 -0
- package/dist/fixtures/8.11.js +203 -0
- package/dist/pages/8.11/AppsPage.d.ts +60 -0
- package/dist/pages/8.11/AppsPage.js +1060 -0
- package/dist/pages/8.11/AuditLogPage.d.ts +14 -0
- package/dist/pages/8.11/AuditLogPage.js +69 -0
- package/dist/pages/8.11/Authorization.d.ts +44 -0
- package/dist/pages/8.11/Authorization.js +409 -0
- package/dist/pages/8.11/ClientCredentialsDetailsPage.d.ts +12 -0
- package/dist/pages/8.11/ClientCredentialsDetailsPage.js +36 -0
- package/dist/pages/8.11/ClusterDetailsPage.d.ts +107 -0
- package/dist/pages/8.11/ClusterDetailsPage.js +892 -0
- package/dist/pages/8.11/ClusterPage.d.ts +96 -0
- package/dist/pages/8.11/ClusterPage.js +657 -0
- package/dist/pages/8.11/ClusterSecretsPage.d.ts +48 -0
- package/dist/pages/8.11/ClusterSecretsPage.js +406 -0
- package/dist/pages/8.11/ConnectorMarketplacePage.d.ts +29 -0
- package/dist/pages/8.11/ConnectorMarketplacePage.js +156 -0
- package/dist/pages/8.11/ConnectorSettingsPage.d.ts +39 -0
- package/dist/pages/8.11/ConnectorSettingsPage.js +150 -0
- package/dist/pages/8.11/ConnectorTemplatePage.d.ts +11 -0
- package/dist/pages/8.11/ConnectorTemplatePage.js +34 -0
- package/dist/pages/8.11/ConsoleOrganizationPage.d.ts +77 -0
- package/dist/pages/8.11/ConsoleOrganizationPage.js +457 -0
- package/dist/pages/8.11/DataFiltersPage.d.ts +30 -0
- package/dist/pages/8.11/DataFiltersPage.js +135 -0
- package/dist/pages/8.11/FormJsPage.d.ts +38 -0
- package/dist/pages/8.11/FormJsPage.js +283 -0
- package/dist/pages/8.11/HomePage.d.ts +29 -0
- package/dist/pages/8.11/HomePage.js +176 -0
- package/dist/pages/8.11/IdpCreatePage.d.ts +118 -0
- package/dist/pages/8.11/IdpCreatePage.js +514 -0
- package/dist/pages/8.11/LoginPage.d.ts +45 -0
- package/dist/pages/8.11/LoginPage.js +214 -0
- package/dist/pages/8.11/ModelerCreatePage.d.ts +256 -0
- package/dist/pages/8.11/ModelerCreatePage.js +2272 -0
- package/dist/pages/8.11/ModelerHomePage.d.ts +100 -0
- package/dist/pages/8.11/ModelerHomePage.js +1168 -0
- package/dist/pages/8.11/ModelerUserInvitePage.d.ts +29 -0
- package/dist/pages/8.11/ModelerUserInvitePage.js +136 -0
- package/dist/pages/8.11/OCIdentityAuthorizationsPage.d.ts +11 -0
- package/dist/pages/8.11/OCIdentityAuthorizationsPage.js +25 -0
- package/dist/pages/8.11/OCIdentityClusterVariablesPage.d.ts +21 -0
- package/dist/pages/8.11/OCIdentityClusterVariablesPage.js +128 -0
- package/dist/pages/8.11/OCIdentityGroupsPage.d.ts +38 -0
- package/dist/pages/8.11/OCIdentityGroupsPage.js +176 -0
- package/dist/pages/8.11/OCIdentityHomePage.d.ts +21 -0
- package/dist/pages/8.11/OCIdentityHomePage.js +111 -0
- package/dist/pages/8.11/OCIdentityMappingRulesPage.d.ts +23 -0
- package/dist/pages/8.11/OCIdentityMappingRulesPage.js +124 -0
- package/dist/pages/8.11/OCIdentityRolesPage.d.ts +43 -0
- package/dist/pages/8.11/OCIdentityRolesPage.js +236 -0
- package/dist/pages/8.11/OperateHomePage.d.ts +28 -0
- package/dist/pages/8.11/OperateHomePage.js +150 -0
- package/dist/pages/8.11/OperateProcessInstancePage.d.ts +43 -0
- package/dist/pages/8.11/OperateProcessInstancePage.js +893 -0
- package/dist/pages/8.11/OperateProcessesPage.d.ts +28 -0
- package/dist/pages/8.11/OperateProcessesPage.js +153 -0
- package/dist/pages/8.11/OptimizeCollectionsPage.d.ts +30 -0
- package/dist/pages/8.11/OptimizeCollectionsPage.js +175 -0
- package/dist/pages/8.11/OptimizeDashboardPage.d.ts +11 -0
- package/dist/pages/8.11/OptimizeDashboardPage.js +71 -0
- package/dist/pages/8.11/OptimizeHomePage.d.ts +17 -0
- package/dist/pages/8.11/OptimizeHomePage.js +171 -0
- package/dist/pages/8.11/OptimizeReportPage.d.ts +49 -0
- package/dist/pages/8.11/OptimizeReportPage.js +184 -0
- package/dist/pages/8.11/OptimizeSharePage.d.ts +16 -0
- package/dist/pages/8.11/OptimizeSharePage.js +100 -0
- package/dist/pages/8.11/PlayPage.d.ts +17 -0
- package/dist/pages/8.11/PlayPage.js +157 -0
- package/dist/pages/8.11/ProcessApplicationPage.d.ts +32 -0
- package/dist/pages/8.11/ProcessApplicationPage.js +496 -0
- package/dist/pages/8.11/SettingsPage.d.ts +10 -0
- package/dist/pages/8.11/SettingsPage.js +53 -0
- package/dist/pages/8.11/SignUpPage.d.ts +42 -0
- package/dist/pages/8.11/SignUpPage.js +134 -0
- package/dist/pages/8.11/TaskDetailsPage.d.ts +77 -0
- package/dist/pages/8.11/TaskDetailsPage.js +324 -0
- package/dist/pages/8.11/TaskPanelPage.d.ts +26 -0
- package/dist/pages/8.11/TaskPanelPage.js +245 -0
- package/dist/pages/8.11/TaskProcessesPage.d.ts +18 -0
- package/dist/pages/8.11/TaskProcessesPage.js +134 -0
- package/dist/pages/8.11/UtilitiesPage.d.ts +56 -0
- package/dist/pages/8.11/UtilitiesPage.js +1024 -0
- package/dist/pages/8.11/WorkspaceMembersPage.d.ts +21 -0
- package/dist/pages/8.11/WorkspaceMembersPage.js +268 -0
- package/dist/tests/8.11/access-user-role-management.spec.d.ts +1 -0
- package/dist/tests/8.11/access-user-role-management.spec.js +487 -0
- package/dist/tests/8.11/agentic-ai-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/agentic-ai-user-flows.spec.js +209 -0
- package/dist/tests/8.11/aws-cluster-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/aws-cluster-user-flows.spec.js +188 -0
- package/dist/tests/8.11/aws-connectors-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/aws-connectors-user-flows.spec.js +167 -0
- package/dist/tests/8.11/cluster-variables.spec.d.ts +1 -0
- package/dist/tests/8.11/cluster-variables.spec.js +202 -0
- package/dist/tests/8.11/connectors-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/connectors-user-flows.spec.js +537 -0
- package/dist/tests/8.11/console-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/console-user-flows.spec.js +199 -0
- package/dist/tests/8.11/hto-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/hto-user-flows.spec.js +358 -0
- package/dist/tests/8.11/idp-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/idp-user-flows.spec.js +316 -0
- package/dist/tests/8.11/login-negative-tests.spec.d.ts +1 -0
- package/dist/tests/8.11/login-negative-tests.spec.js +29 -0
- package/dist/tests/8.11/login.spec.d.ts +1 -0
- package/dist/tests/8.11/login.spec.js +29 -0
- package/dist/tests/8.11/navigation.spec.d.ts +1 -0
- package/dist/tests/8.11/navigation.spec.js +59 -0
- package/dist/tests/8.11/operate-access-flow.spec.d.ts +1 -0
- package/dist/tests/8.11/operate-access-flow.spec.js +136 -0
- package/dist/tests/8.11/optimize-agentic-control-panel-api.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-agentic-control-panel-api.spec.js +96 -0
- package/dist/tests/8.11/optimize-agentic-control-panel-ui.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-agentic-control-panel-ui.spec.js +69 -0
- package/dist/tests/8.11/optimize-api-tests.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-api-tests.spec.js +1194 -0
- package/dist/tests/8.11/optimize-collections-api.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-collections-api.spec.js +184 -0
- package/dist/tests/8.11/optimize-collections-ui.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-collections-ui.spec.js +46 -0
- package/dist/tests/8.11/optimize-data-filters-api.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-data-filters-api.spec.js +195 -0
- package/dist/tests/8.11/optimize-data-filters-ui.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-data-filters-ui.spec.js +306 -0
- package/dist/tests/8.11/optimize-exporter-filters-importer-e2e.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-exporter-filters-importer-e2e.spec.js +316 -0
- package/dist/tests/8.11/optimize-sharing-alerts-export-api.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-sharing-alerts-export-api.spec.js +337 -0
- package/dist/tests/8.11/optimize-sharing-alerts-export-ui.spec.d.ts +1 -0
- package/dist/tests/8.11/optimize-sharing-alerts-export-ui.spec.js +198 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-audit-log.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-audit-log.spec.js +146 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-call-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-call-tools.spec.js +208 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-e2e-flow.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-e2e-flow.spec.js +151 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-list-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/api/mcp-processes-list-tools.spec.js +242 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.js +75 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-incident-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-incident-tools.spec.js +123 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.js +151 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-variable-tools.spec.d.ts +1 -0
- package/dist/tests/8.11/orchestration-cluster-mcp-server/mcp-variable-tools.spec.js +123 -0
- package/dist/tests/8.11/play.spec.d.ts +1 -0
- package/dist/tests/8.11/play.spec.js +93 -0
- package/dist/tests/8.11/rba-enabled-v2-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/rba-enabled-v2-user-flows.spec.js +495 -0
- package/dist/tests/8.11/saas-migration-path-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/saas-migration-path-user-flows.spec.js +133 -0
- package/dist/tests/8.11/smoke-tests.spec.d.ts +1 -0
- package/dist/tests/8.11/smoke-tests.spec.js +339 -0
- package/dist/tests/8.11/test-setup.spec.d.ts +1 -0
- package/dist/tests/8.11/test-setup.spec.js +256 -0
- package/dist/tests/8.11/web-modeler-user-flows.spec.d.ts +1 -0
- package/dist/tests/8.11/web-modeler-user-flows.spec.js +523 -0
- package/dist/utils/clusterVersions.d.ts +2 -1
- package/dist/utils/clusterVersions.js +1 -0
- package/dist/utils/consoleApiHelpers.js +1 -0
- package/package.json +1 -1
- package/playwright.config.ts +10 -0
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const test_1 = require("@playwright/test");
|
|
4
|
+
const _8_11_1 = require("../../fixtures/8.11");
|
|
5
|
+
const _setup_1 = require("../../test-setup.js");
|
|
6
|
+
const UtilitiesPage_1 = require("../../pages/8.11/UtilitiesPage");
|
|
7
|
+
const randomName_1 = require("../../utils/randomName");
|
|
8
|
+
const fileUpload_1 = require("../../utils/fileUpload");
|
|
9
|
+
const connectorSecrets_1 = require("../../utils/connectorSecrets");
|
|
10
|
+
const users_1 = require("../../utils/users");
|
|
11
|
+
const testUser = (0, users_1.getTestUser)('twentiethUser');
|
|
12
|
+
let idpApplicationName;
|
|
13
|
+
let idpDocumentExtractionTemplateName;
|
|
14
|
+
const unstructuredTestCases = [
|
|
15
|
+
{
|
|
16
|
+
provider: 'AWS',
|
|
17
|
+
model: 'Claude Sonnet 4',
|
|
18
|
+
uploadFiles: ['idp/idp_sample_bank_statement.pdf'],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
provider: 'Azure',
|
|
22
|
+
model: 'OpenAI Model Router',
|
|
23
|
+
uploadFiles: ['idp/idp_sample_bank_statement.pdf'],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
provider: 'GCP',
|
|
27
|
+
model: 'Gemini 2.5 Pro',
|
|
28
|
+
uploadFiles: ['idp/idp_sample_bank_statement.pdf'],
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
const structuredTestCases = [
|
|
32
|
+
{
|
|
33
|
+
provider: 'AWS',
|
|
34
|
+
model: '',
|
|
35
|
+
uploadFiles: ['idp/structured_invoice_test.pdf'],
|
|
36
|
+
extractionFiles: [
|
|
37
|
+
'idp/structured_invoice_1.pdf',
|
|
38
|
+
'idp/structured_invoice_2.pdf',
|
|
39
|
+
'idp/structured_invoice_3.pdf',
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
provider: 'GCP',
|
|
44
|
+
model: '',
|
|
45
|
+
uploadFiles: ['idp/structured_invoice_test.pdf'],
|
|
46
|
+
extractionFiles: [
|
|
47
|
+
'idp/structured_invoice_1.pdf',
|
|
48
|
+
'idp/structured_invoice_2.pdf',
|
|
49
|
+
'idp/structured_invoice_3.pdf',
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
]; /* For structured documents, the model is empty since is not necessary */
|
|
53
|
+
const classificationTestCases = [
|
|
54
|
+
{
|
|
55
|
+
provider: 'AWS',
|
|
56
|
+
model: 'Claude Sonnet 4',
|
|
57
|
+
uploadFiles: ['idp/idp_sample_bank_statement.pdf'],
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
_8_11_1.test.describe.configure({ mode: 'parallel' });
|
|
61
|
+
_8_11_1.test.describe('IDP User Flow Tests', () => {
|
|
62
|
+
const clusterName = 'Test Cluster';
|
|
63
|
+
_8_11_1.test.afterEach(async ({ page }, testInfo) => {
|
|
64
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
65
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
66
|
+
});
|
|
67
|
+
_8_11_1.test.beforeEach(async ({ page, loginPage }, testInfo) => {
|
|
68
|
+
await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
|
|
69
|
+
});
|
|
70
|
+
_8_11_1.test.describe('Unstructured Extraction', () => {
|
|
71
|
+
for (const params of unstructuredTestCases) {
|
|
72
|
+
// Still fails after bug #8500 was fixed -- that bug was specifically
|
|
73
|
+
// about outbound REST connectors + {{secrets.*}} masking, unrelated to
|
|
74
|
+
// this symptom: "Save as test case" never becomes enabled after
|
|
75
|
+
// extraction is triggered (120s timeout, both attempt and retry, same
|
|
76
|
+
// for AWS and GCP -- see PR #3348 run 34109991740). Mis-attributed to
|
|
77
|
+
// #8500 originally; needs its own bug filed before unskipping again.
|
|
78
|
+
_8_11_1.test.skip(`${params.provider} unstructured (${params.model}) - User creates an idp application with a document extraction template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
|
|
79
|
+
_8_11_1.test.slow();
|
|
80
|
+
idpApplicationName = await (0, randomName_1.randomNameAgregator)(`${params.provider} unstructured` + ' - IDP_Application_Name');
|
|
81
|
+
idpDocumentExtractionTemplateName = await (0, randomName_1.randomNameAgregator)(`${params.provider} unstructured` + ' - IDP_Extraction_Template_Name');
|
|
82
|
+
await _8_11_1.test.step('Navigate to Connectors Secrets', async () => {
|
|
83
|
+
await homePage.clickClusters();
|
|
84
|
+
await clusterPage.clickClusterLink(clusterName);
|
|
85
|
+
await clusterPage.clickConnectorSecretsTab(clusterName);
|
|
86
|
+
await clusterSecretsPage.assertSecretsOrCreate(clusterName, connectorSecrets_1.allConnectorSecrets[params.provider]);
|
|
87
|
+
});
|
|
88
|
+
await _8_11_1.test.step('Navigate to Web Modeler', async () => {
|
|
89
|
+
await (0, test_1.expect)(homePage.camundaComponentsButton).toBeVisible({
|
|
90
|
+
timeout: 120000,
|
|
91
|
+
});
|
|
92
|
+
await appsPage.clickCamundaApps();
|
|
93
|
+
await appsPage.clickModeler();
|
|
94
|
+
await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
|
|
95
|
+
timeout: 120000,
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
await _8_11_1.test.step('Navigate to Cross Component Test Project', async () => {
|
|
99
|
+
await modelerHomePage.clickMessageBanner();
|
|
100
|
+
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
101
|
+
});
|
|
102
|
+
await _8_11_1.test.step('Add an IDP application to the project', async () => {
|
|
103
|
+
// Workspace root only: an IDP application can never be created
|
|
104
|
+
// inside a process application. The entry point there is the create
|
|
105
|
+
// menu or the empty state, depending on whether the workspace
|
|
106
|
+
// already holds a resource.
|
|
107
|
+
await modelerHomePage.startIdpApplicationCreation();
|
|
108
|
+
});
|
|
109
|
+
await _8_11_1.test.step('Creates a document extraction template', async () => {
|
|
110
|
+
await modelerHomePage.enterIdpApplicationName(idpApplicationName);
|
|
111
|
+
await modelerHomePage.selectCluster(clusterName);
|
|
112
|
+
await modelerHomePage.clickCreateIdpApplicationButton();
|
|
113
|
+
await idpCreatePage.clickCreateIdpTemplateButton();
|
|
114
|
+
await idpCreatePage.fillIdpExtractionTemplateName(`${idpDocumentExtractionTemplateName}`);
|
|
115
|
+
await idpCreatePage.fillIdpExtractionDescriptionField(`${idpDocumentExtractionTemplateName} description`);
|
|
116
|
+
await idpCreatePage.selectProvider(params.provider);
|
|
117
|
+
await idpCreatePage.clickCreateIdpExtractationTemplateButton();
|
|
118
|
+
});
|
|
119
|
+
await _8_11_1.test.step('Upload a file for extraction', async () => {
|
|
120
|
+
await idpCreatePage.clickUnstructuredUploadFilesButton();
|
|
121
|
+
await (0, fileUpload_1.uploadFile)(page, params.uploadFiles);
|
|
122
|
+
await idpCreatePage.clickExtractButton();
|
|
123
|
+
});
|
|
124
|
+
await _8_11_1.test.step('Add a field for extraction and extract the data', async () => {
|
|
125
|
+
await idpCreatePage.fillExtractFieldName('bank_account_number');
|
|
126
|
+
await idpCreatePage.fillPromptField();
|
|
127
|
+
await idpCreatePage.clickAddExtractionFieldButton();
|
|
128
|
+
await idpCreatePage.selectExtractionModelOption(params.model);
|
|
129
|
+
await idpCreatePage.clickExtractDocumentButton();
|
|
130
|
+
});
|
|
131
|
+
await _8_11_1.test.step('Save extracted data as a test case', async () => {
|
|
132
|
+
await idpCreatePage.clickSaveAsTestCaseButton();
|
|
133
|
+
await idpCreatePage.clickCloseToastNotification();
|
|
134
|
+
});
|
|
135
|
+
await _8_11_1.test.step('Validate extraction', async () => {
|
|
136
|
+
await idpCreatePage.clickValidateExtractionTab();
|
|
137
|
+
await idpCreatePage.clickExpandAllRowsButton();
|
|
138
|
+
await idpCreatePage.assertPassTestCaseResultsRow();
|
|
139
|
+
});
|
|
140
|
+
await _8_11_1.test.step('Publish the IDP application to project', async () => {
|
|
141
|
+
await idpCreatePage.clickPublishButton();
|
|
142
|
+
await idpCreatePage.clickPublishToProjecOption();
|
|
143
|
+
await idpCreatePage.fillVersionFieldName(idpApplicationName);
|
|
144
|
+
await idpCreatePage.fillVersionFieldDescription(idpApplicationName);
|
|
145
|
+
await idpCreatePage.clickPublishButtonModal();
|
|
146
|
+
await idpCreatePage.assertIdpSuccessPublishNotification();
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
_8_11_1.test.describe('Structured Extraction', () => {
|
|
152
|
+
for (const params of structuredTestCases) {
|
|
153
|
+
// Same still-open issue as Unstructured Extraction above -- see that
|
|
154
|
+
// comment. Not bug #8500.
|
|
155
|
+
_8_11_1.test.skip(`${params.provider} structured - User creates an idp application with a document extraction template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
|
|
156
|
+
_8_11_1.test.slow();
|
|
157
|
+
idpApplicationName = await (0, randomName_1.randomNameAgregator)(`${params.provider} structured` + ' - IDP_Application_Name');
|
|
158
|
+
idpDocumentExtractionTemplateName = await (0, randomName_1.randomNameAgregator)(`${params.provider} structured` + ' - IDP_Extraction_Template_Name');
|
|
159
|
+
await _8_11_1.test.step('Navigate to Connectors Secrets', async () => {
|
|
160
|
+
await homePage.clickClusters();
|
|
161
|
+
await clusterPage.clickClusterLink(clusterName);
|
|
162
|
+
await clusterPage.clickConnectorSecretsTab(clusterName);
|
|
163
|
+
await clusterSecretsPage.assertSecretsOrCreate(clusterName, connectorSecrets_1.allConnectorSecrets[params.provider]);
|
|
164
|
+
});
|
|
165
|
+
await _8_11_1.test.step('Navigate to Web Modeler', async () => {
|
|
166
|
+
await (0, test_1.expect)(homePage.camundaComponentsButton).toBeVisible({
|
|
167
|
+
timeout: 120000,
|
|
168
|
+
});
|
|
169
|
+
await appsPage.clickCamundaApps();
|
|
170
|
+
await appsPage.clickModeler();
|
|
171
|
+
await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
|
|
172
|
+
timeout: 120000,
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
await _8_11_1.test.step('Navigate to Cross Component Test Project', async () => {
|
|
176
|
+
await modelerHomePage.clickMessageBanner();
|
|
177
|
+
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
178
|
+
});
|
|
179
|
+
await _8_11_1.test.step('Add an IDP application to the project', async () => {
|
|
180
|
+
// Workspace root only: an IDP application can never be created
|
|
181
|
+
// inside a process application. The entry point there is the create
|
|
182
|
+
// menu or the empty state, depending on whether the workspace
|
|
183
|
+
// already holds a resource.
|
|
184
|
+
await modelerHomePage.startIdpApplicationCreation();
|
|
185
|
+
});
|
|
186
|
+
await _8_11_1.test.step('Creates a document extraction template', async () => {
|
|
187
|
+
await modelerHomePage.enterIdpApplicationName(idpApplicationName);
|
|
188
|
+
await modelerHomePage.selectCluster(clusterName);
|
|
189
|
+
await modelerHomePage.clickCreateIdpApplicationButton();
|
|
190
|
+
await idpCreatePage.clickCreateIdpTemplateButton();
|
|
191
|
+
await idpCreatePage.selectStructuredDataExtractionMethod();
|
|
192
|
+
await idpCreatePage.fillIdpExtractionTemplateName(`${idpDocumentExtractionTemplateName}`);
|
|
193
|
+
await idpCreatePage.fillIdpExtractionDescriptionField(`${idpDocumentExtractionTemplateName} - description`);
|
|
194
|
+
await idpCreatePage.selectProvider(params.provider);
|
|
195
|
+
await idpCreatePage.clickCreateIdpExtractationTemplateButton();
|
|
196
|
+
});
|
|
197
|
+
await _8_11_1.test.step('Upload a file for extraction', async () => {
|
|
198
|
+
await idpCreatePage.clickStructuredUploadFilesButton();
|
|
199
|
+
await (0, fileUpload_1.uploadFile)(page, params.uploadFiles);
|
|
200
|
+
});
|
|
201
|
+
await _8_11_1.test.step('Select all the fields extracted rows', async () => {
|
|
202
|
+
await idpCreatePage.selectAllExtractionFields();
|
|
203
|
+
});
|
|
204
|
+
await _8_11_1.test.step('Switch to the tables tab', async () => {
|
|
205
|
+
await idpCreatePage.clickTablesTab();
|
|
206
|
+
});
|
|
207
|
+
await _8_11_1.test.step('Select all the extracted tables', async () => {
|
|
208
|
+
await idpCreatePage.selectAllExtractedTables();
|
|
209
|
+
});
|
|
210
|
+
await _8_11_1.test.step('Confirm selection of fields and tables', async () => {
|
|
211
|
+
await idpCreatePage.assertFieldsAndTablesSelection();
|
|
212
|
+
});
|
|
213
|
+
await _8_11_1.test.step('Click on the Test Template tab', async () => {
|
|
214
|
+
await idpCreatePage.clickTestTemplateTab();
|
|
215
|
+
});
|
|
216
|
+
await _8_11_1.test.step('Upload multiples files for testing the extraction', async () => {
|
|
217
|
+
await idpCreatePage.clickStructuredUploadFilesButton();
|
|
218
|
+
await (0, fileUpload_1.uploadFile)(page, params.extractionFiles);
|
|
219
|
+
await idpCreatePage.clickTestExtractionTemplateButton();
|
|
220
|
+
});
|
|
221
|
+
await _8_11_1.test.step('Test Summary Results and Details Results sections are visible ', async () => {
|
|
222
|
+
await idpCreatePage.extractionResultsAreVisible();
|
|
223
|
+
});
|
|
224
|
+
await _8_11_1.test.step('Publish the IDP application to project', async () => {
|
|
225
|
+
await idpCreatePage.clickPublishTemplateButton();
|
|
226
|
+
await idpCreatePage.clickPublishToProjecOption();
|
|
227
|
+
await idpCreatePage.fillVersionFieldName(idpApplicationName);
|
|
228
|
+
await idpCreatePage.fillVersionFieldDescription(idpApplicationName);
|
|
229
|
+
await idpCreatePage.clickPublishTemplateToProjectButton();
|
|
230
|
+
await idpCreatePage.assertStructuredTemplateSuccessNotification();
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
_8_11_1.test.describe('Classification Template', () => {
|
|
236
|
+
for (const params of classificationTestCases) {
|
|
237
|
+
// Skipped due to bug #29644: https://github.com/camunda/camunda-hub/issues/29644
|
|
238
|
+
_8_11_1.test.skip(`${params.provider} classification - User creates an idp application with a classification template`, async ({ page, idpCreatePage, modelerHomePage, homePage, appsPage, clusterPage, clusterSecretsPage, }) => {
|
|
239
|
+
_8_11_1.test.slow();
|
|
240
|
+
const idpApplicationName = await (0, randomName_1.randomNameAgregator)(`${params.provider} classification` + ' - IDP_Application_Name');
|
|
241
|
+
const idpClassificationTemplateName = await (0, randomName_1.randomNameAgregator)(`${params.provider} classification` +
|
|
242
|
+
' - IDP_Classification_Template_Name');
|
|
243
|
+
await _8_11_1.test.step('Navigate to Connectors Secrets', async () => {
|
|
244
|
+
await homePage.clickClusters();
|
|
245
|
+
await clusterPage.clickClusterLink(clusterName);
|
|
246
|
+
await clusterPage.clickConnectorSecretsTab(clusterName);
|
|
247
|
+
await clusterSecretsPage.assertSecretsOrCreate(clusterName, connectorSecrets_1.allConnectorSecrets[params.provider]);
|
|
248
|
+
});
|
|
249
|
+
await _8_11_1.test.step('Navigate to Web Modeler', async () => {
|
|
250
|
+
await (0, test_1.expect)(homePage.camundaComponentsButton).toBeVisible({
|
|
251
|
+
timeout: 120000,
|
|
252
|
+
});
|
|
253
|
+
await appsPage.clickCamundaApps();
|
|
254
|
+
await appsPage.clickModeler();
|
|
255
|
+
await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
|
|
256
|
+
timeout: 120000,
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
await _8_11_1.test.step('Navigate to Cross Component Test Project', async () => {
|
|
260
|
+
await modelerHomePage.clickMessageBanner();
|
|
261
|
+
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
262
|
+
});
|
|
263
|
+
await _8_11_1.test.step('Add an IDP application to the project', async () => {
|
|
264
|
+
// Workspace root only: an IDP application can never be created
|
|
265
|
+
// inside a process application. The entry point there is the create
|
|
266
|
+
// menu or the empty state, depending on whether the workspace
|
|
267
|
+
// already holds a resource.
|
|
268
|
+
await modelerHomePage.startIdpApplicationCreation();
|
|
269
|
+
});
|
|
270
|
+
await _8_11_1.test.step('Creates a classification template', async () => {
|
|
271
|
+
await modelerHomePage.enterIdpApplicationName(idpApplicationName);
|
|
272
|
+
await modelerHomePage.selectCluster(clusterName);
|
|
273
|
+
await modelerHomePage.clickCreateIdpApplicationButton();
|
|
274
|
+
await idpCreatePage.clickCreateIdpClassificationTemplateButton();
|
|
275
|
+
await idpCreatePage.fillIdpClassificationTemplateName(`${idpClassificationTemplateName}`);
|
|
276
|
+
await idpCreatePage.fillIdpClassificationDescriptionField(`${idpClassificationTemplateName} - description`);
|
|
277
|
+
await idpCreatePage.selectProvider(params.provider);
|
|
278
|
+
await idpCreatePage.clickCreateTemplateButton();
|
|
279
|
+
});
|
|
280
|
+
await _8_11_1.test.step('Add two predefined document types', async () => {
|
|
281
|
+
await idpCreatePage.clickAddDocumentTypeButton();
|
|
282
|
+
await idpCreatePage.clickInvoiceTypeOption();
|
|
283
|
+
await idpCreatePage.clickBankStatementTypeOption();
|
|
284
|
+
await idpCreatePage.clickAddTypesButton();
|
|
285
|
+
});
|
|
286
|
+
await _8_11_1.test.step('Click on the Test Template tab', async () => {
|
|
287
|
+
await idpCreatePage.clickTestTemplateTab();
|
|
288
|
+
});
|
|
289
|
+
await _8_11_1.test.step('Upload a file for classification', async () => {
|
|
290
|
+
await idpCreatePage.clickClassificationUploadFilesButton();
|
|
291
|
+
await idpCreatePage.clickSelectDocumentDropdown();
|
|
292
|
+
await idpCreatePage.selectDocumentTypeOption('Bank Statement');
|
|
293
|
+
await idpCreatePage.clickSelectFilesButton();
|
|
294
|
+
await (0, fileUpload_1.uploadFile)(page, params.uploadFiles);
|
|
295
|
+
});
|
|
296
|
+
await _8_11_1.test.step('Test the classification', async () => {
|
|
297
|
+
await idpCreatePage.clickClassificationRunTestButton();
|
|
298
|
+
await idpCreatePage.classifyingProgressIsComplete();
|
|
299
|
+
});
|
|
300
|
+
await _8_11_1.test.step('Validate classification results', async () => {
|
|
301
|
+
await idpCreatePage.assertClassificationTestResultsArePresent();
|
|
302
|
+
await idpCreatePage.assertClassificationModelName(params.model);
|
|
303
|
+
await idpCreatePage.assertClassificationAccuracyIsPresent();
|
|
304
|
+
});
|
|
305
|
+
await _8_11_1.test.step('Publish the IDP classification template to project', async () => {
|
|
306
|
+
await idpCreatePage.clickPublishTemplateButton();
|
|
307
|
+
await idpCreatePage.clickPublishToProjecOption();
|
|
308
|
+
await idpCreatePage.fillVersionFieldName(idpApplicationName);
|
|
309
|
+
await idpCreatePage.fillVersionFieldDescription(idpApplicationName);
|
|
310
|
+
await idpCreatePage.clickPublishTemplateToProjectButton();
|
|
311
|
+
await idpCreatePage.assertClassificationTemplateSuccessNotification();
|
|
312
|
+
});
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const test_1 = require("@playwright/test");
|
|
4
|
+
const _setup_1 = require("../../test-setup.js");
|
|
5
|
+
const _8_11_1 = require("../../fixtures/8.11");
|
|
6
|
+
const sleep_1 = require("../../utils/sleep");
|
|
7
|
+
_8_11_1.test.describe.configure({ mode: 'parallel' });
|
|
8
|
+
_8_11_1.test.describe('Login Tests - invalid-input - (negative) generated', () => {
|
|
9
|
+
_8_11_1.test.beforeEach(async ({ page }, testInfo) => {
|
|
10
|
+
await page.goto('/');
|
|
11
|
+
await (0, sleep_1.sleep)((testInfo.workerIndex + 1) * 1000);
|
|
12
|
+
});
|
|
13
|
+
_8_11_1.test.afterEach(async ({ page }, testInfo) => {
|
|
14
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
15
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
16
|
+
});
|
|
17
|
+
(0, _8_11_1.test)('Basic Login - invalid usernameInput minlength', async ({ loginPage }) => {
|
|
18
|
+
const usernameInputTooShort = 'aaaa';
|
|
19
|
+
await loginPage.fillUsername(usernameInputTooShort);
|
|
20
|
+
await loginPage.clickContinueButton();
|
|
21
|
+
await (0, test_1.expect)(loginPage.usernameInput.locator).toHaveAttribute('aria-invalid', 'true');
|
|
22
|
+
});
|
|
23
|
+
(0, _8_11_1.test)('Basic Login - invalid usernameInput maxlength', async ({ loginPage }) => {
|
|
24
|
+
const usernameInputTooLong = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
|
|
25
|
+
await loginPage.fillUsername(usernameInputTooLong);
|
|
26
|
+
await loginPage.clickContinueButton();
|
|
27
|
+
await (0, test_1.expect)(loginPage.usernameInput.locator).toHaveAttribute('aria-invalid', 'true');
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const test_1 = require("@playwright/test");
|
|
4
|
+
const _setup_1 = require("../../test-setup.js");
|
|
5
|
+
const _8_11_1 = require("../../fixtures/8.11");
|
|
6
|
+
const sleep_1 = require("../../utils/sleep");
|
|
7
|
+
_8_11_1.test.describe.configure({ mode: 'parallel' });
|
|
8
|
+
_8_11_1.test.describe('Login Tests', () => {
|
|
9
|
+
_8_11_1.test.beforeEach(async ({ page }, testInfo) => {
|
|
10
|
+
await page.context().clearCookies();
|
|
11
|
+
await page.goto('/');
|
|
12
|
+
await (0, sleep_1.sleep)((testInfo.workerIndex + 1) * 1000);
|
|
13
|
+
});
|
|
14
|
+
_8_11_1.test.afterEach(async ({ page }, testInfo) => {
|
|
15
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
16
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
17
|
+
});
|
|
18
|
+
(0, _8_11_1.test)('Basic Login', async ({ loginPage, homePage }) => {
|
|
19
|
+
await (0, test_1.expect)(loginPage.loginMessage).toBeVisible({ timeout: 60000 });
|
|
20
|
+
await (0, test_1.expect)(loginPage.usernameInput.locator).toBeVisible({ timeout: 60000 });
|
|
21
|
+
await loginPage.fillUsername(process.env.C8_USERNAME);
|
|
22
|
+
await loginPage.clickContinueButton();
|
|
23
|
+
await (0, test_1.expect)(loginPage.passwordHeading).toBeVisible({ timeout: 60000 });
|
|
24
|
+
await (0, test_1.expect)(loginPage.passwordInput).toBeVisible({ timeout: 60000 });
|
|
25
|
+
await loginPage.fillPassword(process.env.C8_PASSWORD);
|
|
26
|
+
await loginPage.clickLoginButton();
|
|
27
|
+
await (0, test_1.expect)(homePage.consoleBanner).toBeVisible({ timeout: 120000 });
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const test_1 = require("@playwright/test");
|
|
4
|
+
const _8_11_1 = require("../../fixtures/8.11");
|
|
5
|
+
const _setup_1 = require("../../test-setup.js");
|
|
6
|
+
const UtilitiesPage_1 = require("../../pages/8.11/UtilitiesPage");
|
|
7
|
+
const users_1 = require("../../utils/users");
|
|
8
|
+
const testUser = (0, users_1.getTestUser)('twentyFirstUser');
|
|
9
|
+
_8_11_1.test.describe.configure({ mode: 'parallel' });
|
|
10
|
+
_8_11_1.test.describe('Navigation Tests', () => {
|
|
11
|
+
const clusterName = 'Test Cluster';
|
|
12
|
+
_8_11_1.test.beforeEach(async ({ page, loginPage }, testInfo) => {
|
|
13
|
+
await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
|
|
14
|
+
});
|
|
15
|
+
_8_11_1.test.afterEach(async ({ page }, testInfo) => {
|
|
16
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
17
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
18
|
+
});
|
|
19
|
+
(0, _8_11_1.test)('Navigate to Web Modeler', async ({ appsPage, modelerHomePage }) => {
|
|
20
|
+
await appsPage.clickCamundaApps();
|
|
21
|
+
await appsPage.clickModeler();
|
|
22
|
+
await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
|
|
23
|
+
timeout: 120000,
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
(0, _8_11_1.test)('Navigate to Console', async ({ appsPage, homePage }) => {
|
|
27
|
+
await appsPage.clickCamundaApps();
|
|
28
|
+
await appsPage.clickConsoleLink();
|
|
29
|
+
await (0, test_1.expect)(homePage.consoleBanner).toBeVisible({ timeout: 120000 });
|
|
30
|
+
});
|
|
31
|
+
(0, _8_11_1.test)('Navigate to Operate', async ({ page, appsPage, operateHomePage }) => {
|
|
32
|
+
await appsPage.clickCamundaApps();
|
|
33
|
+
await appsPage.clickOperate(clusterName);
|
|
34
|
+
// Operate is a Vite SPA: when a module chunk 404s mid-deploy it renders a
|
|
35
|
+
// terminal "Something went wrong - Please reload the page" error boundary
|
|
36
|
+
// on which no amount of waiting helps. Reload between attempts so the next
|
|
37
|
+
// one fetches an index.html whose asset hashes resolve.
|
|
38
|
+
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(page, operateHomePage.operateBanner, 'Operate banner', 60000, false, 3);
|
|
39
|
+
});
|
|
40
|
+
(0, _8_11_1.test)('Navigate to Optimize', async ({ appsPage, optimizeHomePage }) => {
|
|
41
|
+
await appsPage.clickCamundaApps();
|
|
42
|
+
await appsPage.clickOptimize(clusterName);
|
|
43
|
+
await (0, test_1.expect)(optimizeHomePage.optimizeBanner).toBeVisible({
|
|
44
|
+
timeout: 120000,
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
(0, _8_11_1.test)('Navigate to Tasklist', async ({ appsPage, taskPanelPage }) => {
|
|
48
|
+
await appsPage.clickCamundaApps();
|
|
49
|
+
await appsPage.clickTasklist(clusterName);
|
|
50
|
+
await (0, test_1.expect)(taskPanelPage.taskListPageBanner).toBeVisible({
|
|
51
|
+
timeout: 120000,
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
(0, _8_11_1.test)('Navigate to Admin', async ({ appsPage, ocIdentityHomePage }) => {
|
|
55
|
+
await appsPage.clickCamundaApps();
|
|
56
|
+
await appsPage.clickAdmin(clusterName);
|
|
57
|
+
await (0, test_1.expect)(ocIdentityHomePage.adminBanner).toBeVisible({ timeout: 120000 });
|
|
58
|
+
});
|
|
59
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const test_1 = require("@playwright/test");
|
|
4
|
+
const _8_11_1 = require("../../fixtures/8.11");
|
|
5
|
+
const UtilitiesPage_1 = require("../../pages/8.11/UtilitiesPage");
|
|
6
|
+
const _setup_1 = require("../../test-setup.js");
|
|
7
|
+
const apiHelpers_1 = require("../../utils/apiHelpers");
|
|
8
|
+
const users_1 = require("../../utils/users");
|
|
9
|
+
const urlHelpers_1 = require("../../utils/urlHelpers");
|
|
10
|
+
const testUser = (0, users_1.getTestUser)('twentySecondUser');
|
|
11
|
+
// This suite covers the manual scenario: create a new API client via UI,
|
|
12
|
+
// copy the API URL from the credentials, and verify that the cluster's V2
|
|
13
|
+
// API endpoints require authentication.
|
|
14
|
+
//
|
|
15
|
+
// V2 endpoints (/v2/process-definitions/search, /v2/user-tasks/search, ...)
|
|
16
|
+
// are served by the Zeebe REST API exposed at ZEEBE_REST_ADDRESS in the
|
|
17
|
+
// client credentials — NOT by the Operate URL (the Operate URL is the SPA
|
|
18
|
+
// frontend and returns 200 + HTML for unknown paths, so a previous version
|
|
19
|
+
// of this spec that POSTed V2 paths to it always saw 200/HTML and never
|
|
20
|
+
// the auth response under test).
|
|
21
|
+
_8_11_1.test.describe.configure({ mode: 'parallel' });
|
|
22
|
+
_8_11_1.test.describe('Cluster V2 API requires authentication @tasklistV2', () => {
|
|
23
|
+
let clientName;
|
|
24
|
+
const clusterName = 'Test Cluster';
|
|
25
|
+
_8_11_1.test.beforeEach(async ({ page, loginPage }, testInfo) => {
|
|
26
|
+
await (0, UtilitiesPage_1.loginWithRetry)(page, loginPage, testUser, (testInfo.workerIndex + 1) * 1000);
|
|
27
|
+
});
|
|
28
|
+
_8_11_1.test.afterEach(async ({ page, homePage, clusterPage, clusterDetailsPage }, testInfo) => {
|
|
29
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
30
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
31
|
+
if (clientName) {
|
|
32
|
+
await homePage.clickClusters();
|
|
33
|
+
await clusterPage.clickClusterLink(clusterName);
|
|
34
|
+
await clusterDetailsPage.clickAPITab();
|
|
35
|
+
await clusterDetailsPage.deleteAPIClientsIfExist(clientName);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
(0, _8_11_1.test)('check that request POST /v2/process-definitions/search returns 401 without credentials', async ({ homePage, clusterPage, clusterDetailsPage, request, }) => {
|
|
39
|
+
clientName = `cluster-deny-${await (0, _setup_1.generateRandomStringAsync)(5)}`;
|
|
40
|
+
let zeebeRestUrl = '';
|
|
41
|
+
await _8_11_1.test.step('Add API Client and capture Zeebe REST URL', async () => {
|
|
42
|
+
await homePage.clickClusters();
|
|
43
|
+
await clusterPage.clickClusterLink(clusterName);
|
|
44
|
+
await clusterDetailsPage.clickAPITab();
|
|
45
|
+
const variables = await clusterDetailsPage.createAPIClientAndReturnVariables(clientName, true);
|
|
46
|
+
zeebeRestUrl = variables.zeebeUrl;
|
|
47
|
+
(0, test_1.expect)(zeebeRestUrl).toMatch(/^https?:\/\//);
|
|
48
|
+
await clusterDetailsPage.clickCloseModalButton();
|
|
49
|
+
await (0, test_1.expect)(clusterDetailsPage.clientsList.filter({ hasText: clientName })).toBeVisible({ timeout: 6000 });
|
|
50
|
+
});
|
|
51
|
+
await _8_11_1.test.step('POST search endpoint without auth should be rejected', async () => {
|
|
52
|
+
const sanitizedUrl = (0, urlHelpers_1.sanitizeUrl)(zeebeRestUrl);
|
|
53
|
+
const response = await request.post(`${sanitizedUrl}/v2/process-definitions/search`, {
|
|
54
|
+
data: { filter: {}, page: { limit: 10 } },
|
|
55
|
+
});
|
|
56
|
+
(0, test_1.expect)(response.status()).toBe(401);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
(0, _8_11_1.test)('check that request POST /v2/process-definitions/search returns 200 with valid credentials', async ({ homePage, clusterPage, clusterDetailsPage, request, }) => {
|
|
60
|
+
clientName = `cluster-allow-${await (0, _setup_1.generateRandomStringAsync)(5)}`;
|
|
61
|
+
let zeebeRestUrl = '';
|
|
62
|
+
await _8_11_1.test.step('Add API Client and capture Zeebe REST URL', async () => {
|
|
63
|
+
await homePage.clickClusters();
|
|
64
|
+
await clusterPage.clickClusterLink(clusterName);
|
|
65
|
+
await clusterDetailsPage.clickAPITab();
|
|
66
|
+
const variables = await clusterDetailsPage.createAPIClientAndReturnVariables(clientName, true);
|
|
67
|
+
zeebeRestUrl = variables.zeebeUrl;
|
|
68
|
+
(0, test_1.expect)(zeebeRestUrl).toMatch(/^https?:\/\//);
|
|
69
|
+
await clusterDetailsPage.clickCloseModalButton();
|
|
70
|
+
await (0, test_1.expect)(clusterDetailsPage.clientsList.filter({ hasText: clientName })).toBeVisible({ timeout: 6000 });
|
|
71
|
+
});
|
|
72
|
+
await _8_11_1.test.step('POST search endpoint with valid Zeebe bearer token returns 200 or is routed', async () => {
|
|
73
|
+
const validToken = await (0, apiHelpers_1.authSaasAPI)();
|
|
74
|
+
const sanitizedUrl = (0, urlHelpers_1.sanitizeUrl)(zeebeRestUrl);
|
|
75
|
+
const response = await request.post(`${sanitizedUrl}/v2/process-definitions/search`, {
|
|
76
|
+
headers: {
|
|
77
|
+
Authorization: validToken,
|
|
78
|
+
'Content-Type': 'application/json',
|
|
79
|
+
},
|
|
80
|
+
data: { filter: {}, page: { limit: 10 } },
|
|
81
|
+
});
|
|
82
|
+
(0, test_1.expect)([200, 400, 405]).toContain(response.status());
|
|
83
|
+
if (response.status() === 200) {
|
|
84
|
+
const body = await response.json();
|
|
85
|
+
(0, test_1.expect)(body).toHaveProperty('items');
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
(0, _8_11_1.test)('check that POST /v2/user-tasks/search returns 401 without credentials', async ({ homePage, clusterPage, clusterDetailsPage, request, }) => {
|
|
90
|
+
clientName = `tasklist-deny-${await (0, _setup_1.generateRandomStringAsync)(5)}`;
|
|
91
|
+
let zeebeRestUrl = '';
|
|
92
|
+
await _8_11_1.test.step('Add API Client and capture Zeebe REST URL', async () => {
|
|
93
|
+
await homePage.clickClusters();
|
|
94
|
+
await clusterPage.clickClusterLink(clusterName);
|
|
95
|
+
await clusterDetailsPage.clickAPITab();
|
|
96
|
+
const variables = await clusterDetailsPage.createAPIClientAndReturnVariables(clientName, true);
|
|
97
|
+
zeebeRestUrl = variables.zeebeUrl;
|
|
98
|
+
(0, test_1.expect)(zeebeRestUrl).toMatch(/^https?:\/\//);
|
|
99
|
+
await clusterDetailsPage.clickCloseModalButton();
|
|
100
|
+
await (0, test_1.expect)(clusterDetailsPage.clientsList.filter({ hasText: clientName })).toBeVisible({ timeout: 6000 });
|
|
101
|
+
});
|
|
102
|
+
await _8_11_1.test.step('POST /v2/user-tasks/search without auth returns 401', async () => {
|
|
103
|
+
const sanitizedUrl = (0, urlHelpers_1.sanitizeUrl)(zeebeRestUrl);
|
|
104
|
+
const response = await request.post(`${sanitizedUrl}/v2/user-tasks/search`, {
|
|
105
|
+
data: { filter: {}, page: { limit: 10 } },
|
|
106
|
+
});
|
|
107
|
+
(0, test_1.expect)(response.status()).toBe(401);
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
(0, _8_11_1.test)('check that POST /v2/process-definitions/search with wrong-audience token returns 401', async ({ homePage, clusterPage, clusterDetailsPage, request, }) => {
|
|
111
|
+
clientName = `cluster-wrong-aud-${await (0, _setup_1.generateRandomStringAsync)(5)}`;
|
|
112
|
+
let zeebeRestUrl = '';
|
|
113
|
+
await _8_11_1.test.step('Add API Client and capture Zeebe REST URL', async () => {
|
|
114
|
+
await homePage.clickClusters();
|
|
115
|
+
await clusterPage.clickClusterLink(clusterName);
|
|
116
|
+
await clusterDetailsPage.clickAPITab();
|
|
117
|
+
const variables = await clusterDetailsPage.createAPIClientAndReturnVariables(clientName, true);
|
|
118
|
+
zeebeRestUrl = variables.zeebeUrl;
|
|
119
|
+
(0, test_1.expect)(zeebeRestUrl).toMatch(/^https?:\/\//);
|
|
120
|
+
await clusterDetailsPage.clickCloseModalButton();
|
|
121
|
+
await (0, test_1.expect)(clusterDetailsPage.clientsList.filter({ hasText: clientName })).toBeVisible({ timeout: 6000 });
|
|
122
|
+
});
|
|
123
|
+
await _8_11_1.test.step('Token scoped for Optimize audience rejected by Zeebe REST endpoint', async () => {
|
|
124
|
+
const optimizeToken = await (0, apiHelpers_1.authSaasAPI)(process.env.OPTIMIZE_API_TOKEN_AUDIENCE);
|
|
125
|
+
const sanitizedUrl = (0, urlHelpers_1.sanitizeUrl)(zeebeRestUrl);
|
|
126
|
+
const response = await request.post(`${sanitizedUrl}/v2/process-definitions/search`, {
|
|
127
|
+
headers: {
|
|
128
|
+
Authorization: optimizeToken,
|
|
129
|
+
'Content-Type': 'application/json',
|
|
130
|
+
},
|
|
131
|
+
data: { filter: {}, page: { limit: 10 } },
|
|
132
|
+
});
|
|
133
|
+
(0, test_1.expect)([401, 403]).toContain(response.status());
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|