@camunda/e2e-test-suite 0.0.400 → 0.0.402
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.8/ModelerCreatePage.js +21 -18
- package/dist/pages/SM-8.8/UtilitiesPage.d.ts +1 -1
- package/dist/pages/SM-8.8/UtilitiesPage.js +30 -1
- package/dist/tests/SM-8.8/connectors-user-flows.spec.js +9 -6
- package/dist/tests/SM-8.8/mt-enabled-user-flows.spec.js +4 -4
- package/dist/tests/SM-8.8/smoke-tests.spec.js +3 -2
- package/package.json +1 -1
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ModelerCreatePage = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
|
-
const ConnectorMarketplacePage_1 = require("./ConnectorMarketplacePage");
|
|
6
5
|
const sleep_1 = require("../../utils/sleep");
|
|
7
6
|
const clickLocatorWithRetry_1 = require("../../utils/assertionHelpers/clickLocatorWithRetry");
|
|
8
7
|
class ModelerCreatePage {
|
|
@@ -606,27 +605,31 @@ class ModelerCreatePage {
|
|
|
606
605
|
for (let retries = 0; retries < maxRetries; retries++) {
|
|
607
606
|
try {
|
|
608
607
|
if (retries === 0) {
|
|
609
|
-
//
|
|
610
|
-
|
|
611
|
-
await this.restConnectorOption.
|
|
608
|
+
// If the change type panel is not showing the connector (e.g. after
|
|
609
|
+
// visiting the marketplace), reopen it before waiting for the option.
|
|
610
|
+
const isAlreadyVisible = await this.restConnectorOption.isVisible();
|
|
611
|
+
if (!isAlreadyVisible) {
|
|
612
|
+
await this.changeTypeButton.click({ force: true, timeout: 30000 });
|
|
613
|
+
}
|
|
612
614
|
}
|
|
613
|
-
else
|
|
614
|
-
//
|
|
615
|
+
else {
|
|
616
|
+
// Reload to pick up newly-downloaded connector templates, then
|
|
617
|
+
// re-select the task element and open the type picker.
|
|
615
618
|
await this.page.reload();
|
|
616
|
-
await this.secondElement.click({ timeout: 60000 });
|
|
619
|
+
await this.secondElement.click({ force: true, timeout: 60000 });
|
|
617
620
|
await this.changeTypeButton.click({ force: true, timeout: 60000 });
|
|
618
|
-
await this.restConnectorOption.click({ timeout: 90000 });
|
|
619
|
-
}
|
|
620
|
-
else {
|
|
621
|
-
// Forth and subsequent attempts
|
|
622
|
-
await this.clickMarketPlaceButton();
|
|
623
|
-
const connectorMarketplacePage = new ConnectorMarketplacePage_1.ConnectorMarketplacePage(this.page);
|
|
624
|
-
await connectorMarketplacePage.clickSearchForConnectorTextbox();
|
|
625
|
-
await (0, sleep_1.sleep)(5000);
|
|
626
|
-
await connectorMarketplacePage.fillSearchForConnectorTextbox('REST Connector');
|
|
627
|
-
await connectorMarketplacePage.downloadConnectorToProject();
|
|
628
|
-
await this.restConnectorOption.click({ timeout: 120000 });
|
|
629
621
|
}
|
|
622
|
+
// Use a longer timeout to allow the connector to finish registering
|
|
623
|
+
// after a marketplace download before giving up.
|
|
624
|
+
await (0, test_1.expect)(this.restConnectorOption).toBeVisible({
|
|
625
|
+
timeout: 60000,
|
|
626
|
+
});
|
|
627
|
+
await this.restConnectorOption.scrollIntoViewIfNeeded();
|
|
628
|
+
// force: true bypasses context-pad overlays that can intercept clicks
|
|
629
|
+
await this.restConnectorOption.click({
|
|
630
|
+
timeout: 60000,
|
|
631
|
+
force: true,
|
|
632
|
+
});
|
|
630
633
|
return;
|
|
631
634
|
}
|
|
632
635
|
catch (error) {
|
|
@@ -23,7 +23,7 @@ export declare function completeTaskWithRetry(page: Page, taskPanelPage: TaskPan
|
|
|
23
23
|
export declare function modelRestConnector(modelerCreatePage: ModelerCreatePage, connectorSettingsPage: ConnectorSettingsPage, connectorMarketplacePage: ConnectorMarketplacePage, processName: string, url: string, auth: string, resultExpression: string, resultVariable?: string, basicAuthCredentials?: {
|
|
24
24
|
username: string;
|
|
25
25
|
password: string;
|
|
26
|
-
}): Promise<void>;
|
|
26
|
+
}, page?: Page, modelerHomePage?: ModelerHomePage): Promise<void>;
|
|
27
27
|
export declare function assertLocatorVisibleWithPaginated(page: Page, locator: Locator, text: string): Promise<void>;
|
|
28
28
|
export declare function assertLocatorVisibleWithRetry(page: Page, locator: Locator, text: string, timeout?: number, notVisible?: boolean, maxRetries?: number, clickLocator?: Locator): Promise<void>;
|
|
29
29
|
export declare function assertPageTextWithRetry(page: Page, text: string, notVisible?: boolean, timeout?: number, maxRetries?: number): Promise<void>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.modelAndRunConnectorsDocHandlingDiagram = exports.expectTextWithPagination = exports.modelDiagramFromFile = exports.findTextWithPagination = exports.modelAndRunConnectorsTimerEventDiagram = exports.assertPageTextWithRetry = exports.assertLocatorVisibleWithRetry = exports.assertLocatorVisibleWithPaginated = exports.modelRestConnector = exports.completeTaskWithRetry = exports.createAndRunProcess = exports.assignMappingToRole = exports.createUserAndAssignToRole = exports.runMultipleProcesses = exports.deleteAllUserGroups = void 0;
|
|
4
4
|
const sleep_1 = require("../../utils/sleep");
|
|
5
5
|
const test_1 = require("@playwright/test");
|
|
6
|
+
const ConnectorTemplatePage_1 = require("./ConnectorTemplatePage");
|
|
6
7
|
const fileUpload_1 = require("../../utils/fileUpload");
|
|
7
8
|
const findLocatorInPaginatedList_1 = require("../../utils/findLocatorInPaginatedList");
|
|
8
9
|
const KeycloakUtils_1 = require("../SM-8.8/KeycloakUtils");
|
|
@@ -107,7 +108,7 @@ exports.completeTaskWithRetry = completeTaskWithRetry;
|
|
|
107
108
|
async function modelRestConnector(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, url, auth, resultExpression, resultVariable = '', basicAuthCredentials = {
|
|
108
109
|
username: '',
|
|
109
110
|
password: '',
|
|
110
|
-
}) {
|
|
111
|
+
}, page, modelerHomePage) {
|
|
111
112
|
await (0, test_1.expect)(modelerCreatePage.generalPanel).toBeVisible({
|
|
112
113
|
timeout: 120000,
|
|
113
114
|
});
|
|
@@ -142,6 +143,34 @@ async function modelRestConnector(modelerCreatePage, connectorSettingsPage, conn
|
|
|
142
143
|
await connectorMarketplacePage.fillSearchForConnectorTextbox('REST Connector');
|
|
143
144
|
await (0, sleep_1.sleep)(10000);
|
|
144
145
|
await connectorMarketplacePage.downloadConnectorToProject();
|
|
146
|
+
// After download the connector template must be published before it
|
|
147
|
+
// appears in the change-type panel. Navigate to the downloaded template,
|
|
148
|
+
// publish it, then return to the original diagram and reload so the
|
|
149
|
+
// freshly-published connector is available.
|
|
150
|
+
if (page && modelerHomePage) {
|
|
151
|
+
try {
|
|
152
|
+
const connectorTemplatePage = new ConnectorTemplatePage_1.ConnectorTemplatePage(page);
|
|
153
|
+
await modelerHomePage.clickProjectBreadcrumb();
|
|
154
|
+
await modelerHomePage.clickProcessDiagram('REST Outbound Connector');
|
|
155
|
+
await connectorTemplatePage.publishConnector();
|
|
156
|
+
await modelerHomePage.clickProjectBreadcrumb();
|
|
157
|
+
await modelerHomePage.clickProcessDiagram(processName);
|
|
158
|
+
await (0, sleep_1.sleep)(3000);
|
|
159
|
+
await page.reload();
|
|
160
|
+
await (0, sleep_1.sleep)(3000);
|
|
161
|
+
// Re-select the task element and reopen the change-type panel so
|
|
162
|
+
// clickRestConnectorOption() finds the connector immediately.
|
|
163
|
+
await modelerCreatePage.secondElement.click({
|
|
164
|
+
force: true,
|
|
165
|
+
timeout: 60000,
|
|
166
|
+
});
|
|
167
|
+
await modelerCreatePage.clickChangeTypeButton();
|
|
168
|
+
}
|
|
169
|
+
catch (publishError) {
|
|
170
|
+
console.error(`Connector publish flow failed: ${publishError}`);
|
|
171
|
+
// clickRestConnectorOption() retries will recover via page.reload()
|
|
172
|
+
}
|
|
173
|
+
}
|
|
145
174
|
}
|
|
146
175
|
await modelerCreatePage.clickRestConnectorOption();
|
|
147
176
|
await connectorSettingsPage.clickAuthenticationTab();
|
|
@@ -14,7 +14,8 @@ SM_8_8_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
14
14
|
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
15
15
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
16
16
|
});
|
|
17
|
-
|
|
17
|
+
// Skipped due to 320: https://github.com/camunda/marketplace-api/issues/320
|
|
18
|
+
SM_8_8_1.test.skip('REST Connector No Auth User Flow', async ({ page, operateHomePage, modelerHomePage, operateProcessInstancePage, modelerCreatePage, connectorSettingsPage, operateProcessesPage, connectorMarketplacePage, navigationPage, }) => {
|
|
18
19
|
SM_8_8_1.test.slow();
|
|
19
20
|
const processName = 'REST_Connector_No_Auth_Process' + (await (0, _setup_1.generateRandomStringAsync)(3));
|
|
20
21
|
await SM_8_8_1.test.step('Open Cross Component Test Project and Create a BPMN Diagram Template', async () => {
|
|
@@ -23,7 +24,7 @@ SM_8_8_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
23
24
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
24
25
|
});
|
|
25
26
|
await SM_8_8_1.test.step('Create BPMN Diagram with REST Connector and Start Process Instance', async () => {
|
|
26
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, 'https://camunda.proxy.beeceptor.com/pre-prod/no-auth-test', 'noAuth', 'body');
|
|
27
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, 'https://camunda.proxy.beeceptor.com/pre-prod/no-auth-test', 'noAuth', 'body', '', { username: '', password: '' }, page, modelerHomePage);
|
|
27
28
|
await modelerCreatePage.runProcessInstance();
|
|
28
29
|
await (0, sleep_1.sleep)(20000);
|
|
29
30
|
});
|
|
@@ -42,7 +43,8 @@ SM_8_8_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
42
43
|
});
|
|
43
44
|
});
|
|
44
45
|
});
|
|
45
|
-
|
|
46
|
+
// Skipped due to 320: https://github.com/camunda/marketplace-api/issues/320
|
|
47
|
+
SM_8_8_1.test.skip('REST Connector Bearer Token Auth User Flow', async ({ page, operateHomePage, modelerHomePage, modelerCreatePage, connectorSettingsPage, navigationPage, operateProcessInstancePage, operateProcessesPage, connectorMarketplacePage, }) => {
|
|
46
48
|
SM_8_8_1.test.slow();
|
|
47
49
|
const processName = 'REST_Connector_Bearer_Auth_Process' +
|
|
48
50
|
(await (0, _setup_1.generateRandomStringAsync)(3));
|
|
@@ -52,7 +54,7 @@ SM_8_8_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
52
54
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
53
55
|
});
|
|
54
56
|
await SM_8_8_1.test.step('Create BPMN Diagram with REST Connector with Basic Auth and Start Process Instance', async () => {
|
|
55
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, 'https://camunda.proxy.beeceptor.com/pre-prod/bearer-auth-test', 'bearer', '{message:response.body.status}');
|
|
57
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, 'https://camunda.proxy.beeceptor.com/pre-prod/bearer-auth-test', 'bearer', '{message:response.body.status}', '', { username: '', password: '' }, page, modelerHomePage);
|
|
56
58
|
await modelerCreatePage.runProcessInstance();
|
|
57
59
|
await (0, _setup_1.performBearerTokenAuthPostRequest)('https://camunda.proxy.beeceptor.com/pre-prod/bearer-auth-test', 'thisisabearertoken');
|
|
58
60
|
await (0, sleep_1.sleep)(20000);
|
|
@@ -133,7 +135,8 @@ SM_8_8_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
133
135
|
(0, test_1.expect)(result).toBe('completed');
|
|
134
136
|
});
|
|
135
137
|
});
|
|
136
|
-
|
|
138
|
+
// Skipped due to 320: https://github.com/camunda/marketplace-api/issues/320
|
|
139
|
+
SM_8_8_1.test.skip('Connector Secrets User Flow', async ({ page, operateHomePage, modelerHomePage, navigationPage, modelerCreatePage, connectorSettingsPage, operateProcessInstancePage, operateProcessesPage, connectorMarketplacePage, }) => {
|
|
137
140
|
SM_8_8_1.test.slow();
|
|
138
141
|
const processName = 'REST_Connector_Process' + (await (0, _setup_1.generateRandomStringAsync)(3));
|
|
139
142
|
await SM_8_8_1.test.step('Open Cross Component Test Project and Create a BPMN Diagram Template', async () => {
|
|
@@ -142,7 +145,7 @@ SM_8_8_1.test.describe('Connectors User Flow Tests @tasklistV2', () => {
|
|
|
142
145
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
143
146
|
});
|
|
144
147
|
await SM_8_8_1.test.step('Create BPMN Diagram with REST Connector using secrets and Start Process Instance', async () => {
|
|
145
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, 'https://camunda.proxy.beeceptor.com/pre-prod/basic-auth-test', 'basic', '{message:response.body.message}', 'result', { username: '{{secrets.username}}', password: '{{secrets.password}}' });
|
|
148
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, 'https://camunda.proxy.beeceptor.com/pre-prod/basic-auth-test', 'basic', '{message:response.body.message}', 'result', { username: '{{secrets.username}}', password: '{{secrets.password}}' }, page, modelerHomePage);
|
|
146
149
|
await modelerCreatePage.runProcessInstance();
|
|
147
150
|
await (0, sleep_1.sleep)(20000);
|
|
148
151
|
});
|
|
@@ -156,7 +156,7 @@ if (process.env.IS_MT === 'true') {
|
|
|
156
156
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
157
157
|
});
|
|
158
158
|
await SM_8_8_1.test.step('Create A Diagram with a REST Connector and Start Process Instance', async () => {
|
|
159
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, 'https://camunda.proxy.beeceptor.com/pre-prod/no-auth-test', 'noAuth', 'body');
|
|
159
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, 'https://camunda.proxy.beeceptor.com/pre-prod/no-auth-test', 'noAuth', 'body', '', { username: '', password: '' }, page, modelerHomePage);
|
|
160
160
|
await modelerCreatePage.runProcessInstance('', tenantName); //Identity bug https://github.com/camunda/camunda/issues/35834
|
|
161
161
|
});
|
|
162
162
|
await SM_8_8_1.test.step('View Process Instance in Operate & assert process is complete', async () => {
|
|
@@ -300,7 +300,7 @@ if (process.env.IS_MT === 'true') {
|
|
|
300
300
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
301
301
|
});
|
|
302
302
|
await SM_8_8_1.test.step('Create A Diagram with a REST Connector and Start Process Instance', async () => {
|
|
303
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, 'https://camunda.proxy.beeceptor.com/pre-prod/no-auth-test', 'noAuth', 'body');
|
|
303
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, 'https://camunda.proxy.beeceptor.com/pre-prod/no-auth-test', 'noAuth', 'body', '', { username: '', password: '' }, page, modelerHomePage);
|
|
304
304
|
await modelerCreatePage.runProcessInstance('', tenantName); //Identity bug https://github.com/camunda/camunda/issues/35834
|
|
305
305
|
});
|
|
306
306
|
await SM_8_8_1.test.step('View Process Instance in Operate & assert process is complete', async () => {
|
|
@@ -431,14 +431,14 @@ if (process.env.IS_MT === 'true') {
|
|
|
431
431
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
432
432
|
});
|
|
433
433
|
await SM_8_8_1.test.step('Create A Diagram with a REST Connector and Start Process Instance With Tenant 1', async () => {
|
|
434
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName1, 'https://camunda.proxy.beeceptor.com/pre-prod/no-auth-test', 'noAuth', 'body');
|
|
434
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName1, 'https://camunda.proxy.beeceptor.com/pre-prod/no-auth-test', 'noAuth', 'body', '', { username: '', password: '' }, page, modelerHomePage);
|
|
435
435
|
await modelerCreatePage.runProcessInstance('', tenantName1); //Identity bug https://github.com/camunda/camunda/issues/35834
|
|
436
436
|
});
|
|
437
437
|
await SM_8_8_1.test.step('Create A Diagram with a REST Connector and Start Process Instance With Tenant 2', async () => {
|
|
438
438
|
await modelerHomePage.clickProjectBreadcrumb();
|
|
439
439
|
await modelerHomePage.clickDiagramTypeDropdown();
|
|
440
440
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
441
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName2, 'https://camunda.proxy.beeceptor.com/pre-prod/no-auth-test', 'noAuth', 'body');
|
|
441
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName2, 'https://camunda.proxy.beeceptor.com/pre-prod/no-auth-test', 'noAuth', 'body', '', { username: '', password: '' }, page, modelerHomePage);
|
|
442
442
|
await modelerCreatePage.runProcessInstance('', tenantName2);
|
|
443
443
|
});
|
|
444
444
|
await SM_8_8_1.test.step('View Process Instances in Operate, and Assert Process Complete in Operate with Correct Tenant', async () => {
|
|
@@ -129,7 +129,8 @@ SM_8_8_1.test.describe.parallel('Smoke Tests', () => {
|
|
|
129
129
|
});
|
|
130
130
|
console.log(`[${testInfo.title}] Test end: timeout = ${testInfo.timeout}`);
|
|
131
131
|
});
|
|
132
|
-
|
|
132
|
+
// Skipped due to 320: https://github.com/camunda/marketplace-api/issues/320
|
|
133
|
+
SM_8_8_1.test.skip('Most Common REST Connector User Flow @tasklistV2', async ({ page, context, operateHomePage, modelerHomePage, modelerCreatePage, connectorSettingsPage, navigationPage, operateProcessesPage, operateProcessInstancePage, connectorMarketplacePage, }, testInfo) => {
|
|
133
134
|
console.log(`[${testInfo.title}] Test start: timeout = ${testInfo.timeout}`);
|
|
134
135
|
const processName = 'REST_Connector_Basic_Auth_Process' +
|
|
135
136
|
(await (0, _setup_1.generateRandomStringAsync)(3));
|
|
@@ -141,7 +142,7 @@ SM_8_8_1.test.describe.parallel('Smoke Tests', () => {
|
|
|
141
142
|
await modelerHomePage.clickBpmnTemplateOption();
|
|
142
143
|
});
|
|
143
144
|
await SM_8_8_1.test.step('Create BPMN Diagram with REST Connector with Basic Auth and Start Process Instance', async () => {
|
|
144
|
-
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, 'https://camunda.proxy.beeceptor.com/pre-prod/basic-auth-test', 'basic', '{message:response.body.message}', 'result', { username: 'username', password: 'password' });
|
|
145
|
+
await (0, UtilitiesPage_1.modelRestConnector)(modelerCreatePage, connectorSettingsPage, connectorMarketplacePage, processName, 'https://camunda.proxy.beeceptor.com/pre-prod/basic-auth-test', 'basic', '{message:response.body.message}', 'result', { username: 'username', password: 'password' }, page, modelerHomePage);
|
|
145
146
|
await modelerCreatePage.runProcessInstance();
|
|
146
147
|
});
|
|
147
148
|
await SM_8_8_1.test.step('View Process Instance in Operate, assert it completes and assert result expression', async () => {
|