@camunda/e2e-test-suite 0.0.49 → 0.0.50
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ConnectorMarketplacePage = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
4
5
|
class ConnectorMarketplacePage {
|
|
5
6
|
page;
|
|
6
7
|
searchForConnectorTextbox;
|
|
@@ -42,6 +43,9 @@ class ConnectorMarketplacePage {
|
|
|
42
43
|
}
|
|
43
44
|
async downloadConnectorToProject() {
|
|
44
45
|
await this.clickDownloadToProjectButton();
|
|
46
|
+
await (0, test_1.expect)(this.page.getByText('Downloading')).not.toBeVisible({
|
|
47
|
+
timeout: 30000,
|
|
48
|
+
});
|
|
45
49
|
try {
|
|
46
50
|
await Promise.race([
|
|
47
51
|
this.replaceResourceButton.click({ timeout: 20000 }),
|
|
@@ -4,6 +4,7 @@ exports.ModelerCreatePage = void 0;
|
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const sleep_1 = require("../../utils/sleep");
|
|
6
6
|
const randomSleep_1 = require("../../utils/randomSleep");
|
|
7
|
+
const ConnectorMarketplacePage_1 = require("../8.6/ConnectorMarketplacePage");
|
|
7
8
|
class ModelerCreatePage {
|
|
8
9
|
page;
|
|
9
10
|
generalPanel;
|
|
@@ -835,7 +836,33 @@ class ModelerCreatePage {
|
|
|
835
836
|
throw new Error(`Failed to click the button after ${maxRetries} attempts.`);
|
|
836
837
|
}
|
|
837
838
|
async clickPublicHolidayConnectorOption() {
|
|
838
|
-
|
|
839
|
+
const maxRetries = 4;
|
|
840
|
+
for (let retries = 0; retries < maxRetries; retries++) {
|
|
841
|
+
try {
|
|
842
|
+
if (retries <= 2) {
|
|
843
|
+
await this.publicHolidayConnectorOption.click({ timeout: 60000 });
|
|
844
|
+
}
|
|
845
|
+
else {
|
|
846
|
+
await this.clickMarketPlaceButton();
|
|
847
|
+
const connectorMarketplacePage = new ConnectorMarketplacePage_1.ConnectorMarketplacePage(this.page);
|
|
848
|
+
await connectorMarketplacePage.clickSearchForConnectorTextbox();
|
|
849
|
+
await connectorMarketplacePage.fillSearchForConnectorTextbox('Public Holiday Connector');
|
|
850
|
+
await (0, sleep_1.sleep)(10000);
|
|
851
|
+
await connectorMarketplacePage.downloadConnectorToProject();
|
|
852
|
+
await this.publicHolidayConnectorOption.click({ timeout: 120000 });
|
|
853
|
+
}
|
|
854
|
+
return;
|
|
855
|
+
}
|
|
856
|
+
catch (error) {
|
|
857
|
+
console.error(`Click attempt ${retries + 1} failed: ${error}`);
|
|
858
|
+
await this.page.reload();
|
|
859
|
+
await new Promise((resolve) => setTimeout(resolve, 10000));
|
|
860
|
+
await this.clickCanvas();
|
|
861
|
+
await this.secondElement.click({ timeout: 60000 });
|
|
862
|
+
await this.clickChangeTypeButton();
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
throw new Error(`Failed to click the button after ${maxRetries} attempts.`);
|
|
839
866
|
}
|
|
840
867
|
async clickPublicHolidayYearOption() {
|
|
841
868
|
await this.publicHolidayYearOption.click({ timeout: 60000 });
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OptimizeReportPage = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
4
5
|
class OptimizeReportPage {
|
|
5
6
|
page;
|
|
6
7
|
processSelectionButton;
|
|
@@ -103,6 +104,9 @@ class OptimizeReportPage {
|
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
async clickTableOption() {
|
|
107
|
+
await (0, test_1.expect)(this.tableOption).toBeVisible({
|
|
108
|
+
timeout: 30000,
|
|
109
|
+
});
|
|
106
110
|
await this.tableOption.click();
|
|
107
111
|
}
|
|
108
112
|
async clickReportName() {
|
|
@@ -7,9 +7,6 @@ const AppsPage_1 = require("../../pages/8.6/AppsPage");
|
|
|
7
7
|
const OptimizeCollectionsPage_1 = require("../../pages/8.6/OptimizeCollectionsPage");
|
|
8
8
|
const OperateProcessInstancePage_1 = require("../../pages/8.6/OperateProcessInstancePage");
|
|
9
9
|
const OptimizeHomePage_1 = require("../../pages/8.6/OptimizeHomePage");
|
|
10
|
-
const ModelerCreatePage_1 = require("../../pages/8.6/ModelerCreatePage");
|
|
11
|
-
const ModelerHomePage_1 = require("../../pages/8.6/ModelerHomePage");
|
|
12
|
-
const OptimizeReportPage_1 = require("../../pages/8.6/OptimizeReportPage");
|
|
13
10
|
const OptimizeDashboardPage_1 = require("../../pages/8.6/OptimizeDashboardPage");
|
|
14
11
|
const sleep_1 = require("../../utils/sleep");
|
|
15
12
|
const UtilitiesPage_1 = require("../../pages/8.6/UtilitiesPage");
|
|
@@ -23,18 +20,15 @@ _8_6_1.test.describe('Optimize User Flow Tests', () => {
|
|
|
23
20
|
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
24
21
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
25
22
|
});
|
|
26
|
-
(0, _8_6_1.test)('Job Worker User Task User Flow', async ({
|
|
23
|
+
(0, _8_6_1.test)('Job Worker User Task User Flow', async ({ modelerHomePage, appsPage, modelerCreatePage, operateHomePage, operateProcessesPage, operateProcessInstancePage, page, optimizeCollectionsPage, optimizeReportPage, optimizeHomePage, }) => {
|
|
27
24
|
_8_6_1.test.slow();
|
|
28
25
|
const reportName = await (0, _setup_1.generateRandomStringAsync)(5);
|
|
29
26
|
const processName = 'Optimize Job Worker User Task Diagram' + reportName;
|
|
30
27
|
await _8_6_1.test.step('Navigate to Web Modeler', async () => {
|
|
31
|
-
await (0, test_1.expect)(homePage.camundaComponentsButton).toBeVisible({
|
|
32
|
-
timeout: 120000,
|
|
33
|
-
});
|
|
34
28
|
await appsPage.clickCamundaApps();
|
|
35
29
|
await appsPage.clickModeler();
|
|
36
30
|
await (0, test_1.expect)(modelerHomePage.modelerPageBanner).toBeVisible({
|
|
37
|
-
timeout:
|
|
31
|
+
timeout: 30000,
|
|
38
32
|
});
|
|
39
33
|
});
|
|
40
34
|
await _8_6_1.test.step('Open Cross Component Test Project and Create a BPMN Diagram Template', async () => {
|
|
@@ -47,80 +41,66 @@ _8_6_1.test.describe('Optimize User Flow Tests', () => {
|
|
|
47
41
|
await modelerCreatePage.runProcessInstance(clusterName);
|
|
48
42
|
});
|
|
49
43
|
await _8_6_1.test.step('View Process Instance in Operate, Create User Task Report in Optimize, Start Another Process Instance in Modeler & Assert the Report Updates', async () => {
|
|
50
|
-
await
|
|
51
|
-
|
|
44
|
+
await appsPage.clickCamundaApps();
|
|
45
|
+
await appsPage.clickOperate(clusterName);
|
|
46
|
+
await (0, test_1.expect)(operateHomePage.processesTab).toBeVisible();
|
|
47
|
+
await operateHomePage.clickProcessesTab();
|
|
48
|
+
await operateProcessesPage.clickProcessInstanceLink(processName);
|
|
49
|
+
await (0, test_1.expect)(operateProcessInstancePage.activeIcon).toBeVisible({
|
|
50
|
+
timeout: 30000,
|
|
52
51
|
});
|
|
53
|
-
await
|
|
54
|
-
|
|
55
|
-
const operateTab = await operateTabPromise;
|
|
56
|
-
const operateTabAppsPage = new AppsPage_1.AppsPage(operateTab);
|
|
57
|
-
const operateTabOperateProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(operateTab);
|
|
58
|
-
await (0, test_1.expect)(operateTabOperateProcessInstancePage.activeIcon).toBeVisible({ timeout: 120000 });
|
|
59
|
-
await operateTabAppsPage.clickCamundaApps();
|
|
60
|
-
await operateTabAppsPage.clickOptimize(clusterName);
|
|
61
|
-
const optimizeTabOptimizeCollectionsPage = new OptimizeCollectionsPage_1.OptimizeCollectionsPage(operateTab);
|
|
62
|
-
const optimizeTabOptimizeReportPage = new OptimizeReportPage_1.OptimizeReportPage(operateTab);
|
|
63
|
-
const optimizeTabAppsPage = new AppsPage_1.AppsPage(operateTab);
|
|
64
|
-
const modelerTabModelerCreatePage = new ModelerCreatePage_1.ModelerCreatePage(operateTab);
|
|
65
|
-
const modelerTabModelerHomePage = new ModelerHomePage_1.ModelerHomePage(operateTab);
|
|
66
|
-
const optimizeHomePage = new OptimizeHomePage_1.OptimizeHomePage(operateTab);
|
|
52
|
+
await appsPage.clickCamundaApps();
|
|
53
|
+
await appsPage.clickOptimize(clusterName);
|
|
67
54
|
await (0, sleep_1.sleep)(120000);
|
|
68
|
-
await
|
|
69
|
-
await
|
|
70
|
-
await
|
|
71
|
-
await
|
|
72
|
-
await
|
|
73
|
-
await (0, test_1.expect)(
|
|
55
|
+
await page.reload();
|
|
56
|
+
await optimizeCollectionsPage.clickCreateNewButton();
|
|
57
|
+
await optimizeCollectionsPage.clickReportOption();
|
|
58
|
+
await optimizeReportPage.clickProcessSelectionButton();
|
|
59
|
+
await optimizeReportPage.clickUserTaskProcess(processName);
|
|
60
|
+
await (0, test_1.expect)(optimizeReportPage.versionSelection).toBeVisible({
|
|
74
61
|
timeout: 30000,
|
|
75
62
|
});
|
|
76
|
-
await
|
|
77
|
-
await
|
|
78
|
-
await
|
|
79
|
-
await
|
|
80
|
-
await
|
|
81
|
-
await
|
|
82
|
-
await
|
|
83
|
-
await
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
await
|
|
87
|
-
await
|
|
88
|
-
await optimizeTabOptimizeReportPage.clearReportName();
|
|
89
|
-
await optimizeTabOptimizeReportPage.fillReportName(reportName);
|
|
90
|
-
await optimizeTabOptimizeReportPage.clickSaveButton();
|
|
63
|
+
await optimizeReportPage.clickVersionSelection();
|
|
64
|
+
await optimizeReportPage.clickAlwaysDisplayLatestSelection();
|
|
65
|
+
await optimizeReportPage.clickBlankReportButton();
|
|
66
|
+
await optimizeReportPage.clickCreateReportLink();
|
|
67
|
+
await optimizeReportPage.clickSelectDropdown();
|
|
68
|
+
await optimizeReportPage.clickUserTaskOption();
|
|
69
|
+
await optimizeReportPage.clickHeatMapButton();
|
|
70
|
+
await optimizeReportPage.clickTableOption();
|
|
71
|
+
await optimizeReportPage.clickReportName();
|
|
72
|
+
await optimizeReportPage.clearReportName();
|
|
73
|
+
await optimizeReportPage.fillReportName(reportName);
|
|
74
|
+
await optimizeReportPage.clickSaveButton();
|
|
91
75
|
await optimizeHomePage.clickCollectionsLink();
|
|
92
|
-
await (0, test_1.expect)(
|
|
76
|
+
await (0, test_1.expect)(page.getByText(reportName)).toBeVisible({
|
|
93
77
|
timeout: 60000,
|
|
94
78
|
});
|
|
95
|
-
await
|
|
96
|
-
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(
|
|
97
|
-
await
|
|
98
|
-
await
|
|
99
|
-
await
|
|
100
|
-
await
|
|
101
|
-
await
|
|
102
|
-
await
|
|
103
|
-
await
|
|
104
|
-
|
|
79
|
+
await optimizeCollectionsPage.clickMostRecentProcessReport(reportName);
|
|
80
|
+
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(page, optimizeReportPage.oneUserTaskInstance, 'One user task count', 90000);
|
|
81
|
+
await appsPage.clickCamundaApps();
|
|
82
|
+
await appsPage.clickModeler();
|
|
83
|
+
await modelerHomePage.clickCrossComponentProjectFolder();
|
|
84
|
+
await modelerHomePage.clickProcessDiagram(processName);
|
|
85
|
+
await modelerCreatePage.runProcessInstance(clusterName);
|
|
86
|
+
await appsPage.clickCamundaApps();
|
|
87
|
+
await appsPage.clickOperate(clusterName);
|
|
88
|
+
await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible();
|
|
89
|
+
await operateHomePage.clickProcessesTab();
|
|
90
|
+
await operateProcessesPage.clickProcessInstanceLink(processName);
|
|
91
|
+
await (0, test_1.expect)(operateProcessInstancePage.diagramSpinner).not.toBeVisible({
|
|
105
92
|
timeout: 60000,
|
|
106
93
|
});
|
|
107
|
-
|
|
108
|
-
const newOperateTabAppsPage = new AppsPage_1.AppsPage(newOperateTab);
|
|
109
|
-
const newOperateTabOperateProcessInstancePage = new OperateProcessInstancePage_1.OperateProcessInstancePage(newOperateTab);
|
|
110
|
-
await (0, test_1.expect)(newOperateTabOperateProcessInstancePage.diagramSpinner).not.toBeVisible({
|
|
94
|
+
await (0, test_1.expect)(operateProcessInstancePage.activeIcon).toBeVisible({
|
|
111
95
|
timeout: 60000,
|
|
112
96
|
});
|
|
113
|
-
await
|
|
114
|
-
await
|
|
115
|
-
await
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
await
|
|
120
|
-
await (0, test_1.expect)(newOperateTab.getByText(reportName)).toBeVisible();
|
|
121
|
-
await newOptimizeTabOptimizeCollectionsPage.clickMostRecentProcessReport(reportName);
|
|
122
|
-
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(newOperateTab, newOptimizeTabOptimizeReportPage.twoUserTaskInstance, 'Two user tasks count', 90000);
|
|
123
|
-
await (0, test_1.expect)(newOptimizeTabOptimizeReportPage.oneUserTaskInstance).not.toBeVisible();
|
|
97
|
+
await appsPage.clickCamundaApps();
|
|
98
|
+
await appsPage.clickOptimize(clusterName);
|
|
99
|
+
await optimizeHomePage.clickCollectionsLink();
|
|
100
|
+
await (0, test_1.expect)(page.getByText(reportName)).toBeVisible();
|
|
101
|
+
await optimizeCollectionsPage.clickMostRecentProcessReport(reportName);
|
|
102
|
+
await (0, UtilitiesPage_1.assertLocatorVisibleWithRetry)(page, optimizeReportPage.twoUserTaskInstance, 'Two user tasks count', 90000);
|
|
103
|
+
await (0, test_1.expect)(optimizeReportPage.oneUserTaskInstance).not.toBeVisible();
|
|
124
104
|
});
|
|
125
105
|
});
|
|
126
106
|
(0, _8_6_1.test)('New Instances Updated Flow', async ({ page, homePage, modelerHomePage, appsPage, modelerCreatePage, optimizeCollectionsPage, optimizeReportPage, optimizeHomePage, }) => {
|