@camunda/e2e-test-suite 0.0.242 → 0.0.243
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.7/ModelerCreatePage.js +1 -0
- package/dist/pages/SM-8.7/OperateProcessesPage.js +2 -1
- package/dist/pages/SM-8.7/PlayPage.d.ts +1 -0
- package/dist/pages/SM-8.7/PlayPage.js +12 -1
- package/dist/pages/SM-8.7/TaskDetailsPage.js +22 -2
- package/dist/tests/SM-8.7/connectors-user-flows.spec.js +4 -4
- package/package.json +1 -1
|
@@ -612,6 +612,7 @@ class ModelerCreatePage {
|
|
|
612
612
|
await this.switchToPlay(); // Call switchToPlay on subsequent attempts
|
|
613
613
|
await this.continueToPlayButton.click({ timeout });
|
|
614
614
|
await (0, test_1.expect)(this.page.getByText('Play environment is ready')).toBeVisible({ timeout: 90000 });
|
|
615
|
+
await (0, test_1.expect)(this.dialog).not.toBeVisible();
|
|
615
616
|
return; // Exit if successful
|
|
616
617
|
}
|
|
617
618
|
catch (error) {
|
|
@@ -42,6 +42,7 @@ class OperateProcessesPage {
|
|
|
42
42
|
this.tenantDropdownOption = page.getByRole('option', { name: 'All tenants' });
|
|
43
43
|
}
|
|
44
44
|
async checkCheckbox(checkbox) {
|
|
45
|
+
await checkbox.waitFor({ state: 'visible', timeout: constants_1._1_SECOND_IN_MS * 10 });
|
|
45
46
|
if (!(await checkbox.isChecked())) {
|
|
46
47
|
await checkbox.click();
|
|
47
48
|
await (0, test_1.expect)(checkbox).toBeChecked({
|
|
@@ -151,7 +152,7 @@ class OperateProcessesPage {
|
|
|
151
152
|
throw new Error(`Failed to open instance "${processName}" after ${MAX_ATTEMPTS} attempts. Last error: ${String(err)}`);
|
|
152
153
|
}
|
|
153
154
|
await this.page.reload({ waitUntil: 'domcontentloaded' });
|
|
154
|
-
await (0, sleep_1.sleep)(
|
|
155
|
+
await (0, sleep_1.sleep)(5000);
|
|
155
156
|
}
|
|
156
157
|
}
|
|
157
158
|
}
|
|
@@ -18,6 +18,7 @@ declare class PlayPage {
|
|
|
18
18
|
readonly dialog: Locator;
|
|
19
19
|
readonly loadingInstanceDetailsText: Locator;
|
|
20
20
|
readonly retryButton: Locator;
|
|
21
|
+
readonly restartProcess: Locator;
|
|
21
22
|
constructor(page: Page);
|
|
22
23
|
waitForCompleteJobButtonToBeAvailable(): Promise<void>;
|
|
23
24
|
clickCompleteJobButton(): Promise<void>;
|
|
@@ -25,6 +25,7 @@ class PlayPage {
|
|
|
25
25
|
dialog;
|
|
26
26
|
loadingInstanceDetailsText;
|
|
27
27
|
retryButton;
|
|
28
|
+
restartProcess;
|
|
28
29
|
constructor(page) {
|
|
29
30
|
this.page = page;
|
|
30
31
|
this.completeJobButton = page
|
|
@@ -55,6 +56,9 @@ class PlayPage {
|
|
|
55
56
|
this.saveScenarioModal = page.getByTestId('save-scenario-modal');
|
|
56
57
|
this.loadingInstanceDetailsText = this.page.getByText('Loading instance details...');
|
|
57
58
|
this.retryButton = this.page.getByRole('button', { name: 'Retry' });
|
|
59
|
+
this.restartProcess = this.page.getByRole('button', {
|
|
60
|
+
name: 'Restart process',
|
|
61
|
+
});
|
|
58
62
|
}
|
|
59
63
|
async waitForCompleteJobButtonToBeAvailable() {
|
|
60
64
|
await (0, test_1.expect)(this.completeJobButton).toBeVisible({
|
|
@@ -75,6 +79,7 @@ class PlayPage {
|
|
|
75
79
|
await (0, test_1.expect)(this.loadingInstanceDetailsText).not.toBeVisible({
|
|
76
80
|
timeout: 60000,
|
|
77
81
|
});
|
|
82
|
+
await (0, test_1.expect)(this.dialog).not.toBeVisible({ timeout: 15000 });
|
|
78
83
|
return;
|
|
79
84
|
}
|
|
80
85
|
catch (error) {
|
|
@@ -104,7 +109,7 @@ class PlayPage {
|
|
|
104
109
|
throw new Error('Could not find start instance button with any expected variation');
|
|
105
110
|
}
|
|
106
111
|
async waitForInstanceDetailsToBeLoaded() {
|
|
107
|
-
const maxRetries =
|
|
112
|
+
const maxRetries = 3;
|
|
108
113
|
let attempts = 0;
|
|
109
114
|
while (attempts < maxRetries) {
|
|
110
115
|
try {
|
|
@@ -120,6 +125,9 @@ class PlayPage {
|
|
|
120
125
|
if (attempts >= maxRetries - 1)
|
|
121
126
|
throw error;
|
|
122
127
|
await this.page.reload();
|
|
128
|
+
const startButton = this.restartProcess.or(this.startInstanceButton);
|
|
129
|
+
await startButton.waitFor({ state: 'visible', timeout: 30000 });
|
|
130
|
+
await startButton.click();
|
|
123
131
|
attempts++;
|
|
124
132
|
}
|
|
125
133
|
}
|
|
@@ -150,6 +158,9 @@ class PlayPage {
|
|
|
150
158
|
await (0, test_1.expect)(this.page.getByText(/completed/i)).toBeVisible({
|
|
151
159
|
timeout: maxWaitTimeSeconds,
|
|
152
160
|
});
|
|
161
|
+
await (0, test_1.expect)(this.page.getByText(/completed/i)).not.toBeVisible({
|
|
162
|
+
timeout: 60000,
|
|
163
|
+
});
|
|
153
164
|
}
|
|
154
165
|
async clickSaveScenarioButton() {
|
|
155
166
|
await this.notifications
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TaskDetailsPage = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const sleep_1 = require("../../utils/sleep");
|
|
6
|
+
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
6
7
|
function cardinalToOrdinal(numberValue) {
|
|
7
8
|
const realOrderIndex = numberValue.toString();
|
|
8
9
|
if (['11', '12', '13'].includes(realOrderIndex.slice(-2))) {
|
|
@@ -101,14 +102,33 @@ class TaskDetailsPage {
|
|
|
101
102
|
await (0, test_1.expect)(this.assignToMeButton).toBeVisible({ timeout: 60000 });
|
|
102
103
|
await this.assignToMeButton.click({ timeout: 60000 });
|
|
103
104
|
await (0, sleep_1.sleep)(1000);
|
|
105
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.assignedToMeText, {
|
|
106
|
+
postAction: async () => {
|
|
107
|
+
await this.page.reload();
|
|
108
|
+
await (0, sleep_1.sleep)(5000);
|
|
109
|
+
if (await this.assignToMeButton.isVisible()) {
|
|
110
|
+
await this.assignToMeButton.click({ timeout: 60000 });
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
});
|
|
104
114
|
}
|
|
105
115
|
async clickUnassignButton() {
|
|
106
116
|
await this.unassignButton.click();
|
|
107
117
|
}
|
|
108
118
|
async clickCompleteTaskButton() {
|
|
109
119
|
await this.completeTaskButton.click({ timeout: 60000 });
|
|
110
|
-
await (0, test_1.expect)(this.
|
|
111
|
-
timeout:
|
|
120
|
+
await (0, test_1.expect)(this.page.getByText('Completing task...')).not.toBeVisible({
|
|
121
|
+
timeout: 60000,
|
|
122
|
+
});
|
|
123
|
+
await (0, sleep_1.sleep)(1000);
|
|
124
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, this.taskCompletedBanner, {
|
|
125
|
+
postAction: async () => {
|
|
126
|
+
await this.page.reload();
|
|
127
|
+
await (0, sleep_1.sleep)(5000);
|
|
128
|
+
if (await this.completeTaskButton.isVisible()) {
|
|
129
|
+
await this.completeTaskButton.click({ timeout: 60000 });
|
|
130
|
+
}
|
|
131
|
+
},
|
|
112
132
|
});
|
|
113
133
|
}
|
|
114
134
|
async clickAddVariableButton() {
|
|
@@ -99,8 +99,8 @@ SM_8_7_1.test.describe.parallel('Connectors User Flow Tests', () => {
|
|
|
99
99
|
await SM_8_7_1.test.step('Make Authorization Request', async () => {
|
|
100
100
|
const baseURL = process.env.PLAYWRIGHT_BASE_URL ||
|
|
101
101
|
`http://gke-${process.env.BASE_URL}.ci.distro.ultrawombat.com`;
|
|
102
|
-
const timeout =
|
|
103
|
-
const interval =
|
|
102
|
+
const timeout = 60000;
|
|
103
|
+
const interval = 5000;
|
|
104
104
|
const startTime = Date.now();
|
|
105
105
|
let response;
|
|
106
106
|
while (Date.now() - startTime < timeout) {
|
|
@@ -171,8 +171,8 @@ SM_8_7_1.test.describe.parallel('Connectors User Flow Tests', () => {
|
|
|
171
171
|
`http://gke-${process.env.BASE_URL}.ci.distro.ultrawombat.com`;
|
|
172
172
|
// It takes about 6 seconds for the process to appear in the connectors endpoint
|
|
173
173
|
// So we need to wait for it to appear before making the request
|
|
174
|
-
const timeout =
|
|
175
|
-
const interval =
|
|
174
|
+
const timeout = 60000;
|
|
175
|
+
const interval = 5000;
|
|
176
176
|
const startTime = Date.now();
|
|
177
177
|
let response;
|
|
178
178
|
while (Date.now() - startTime < timeout) {
|