@camunda/e2e-test-suite 0.0.660 → 0.0.662
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.
|
@@ -4,6 +4,7 @@ exports.OperateProcessInstancePage = void 0;
|
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const sleep_1 = require("../../utils/sleep");
|
|
6
6
|
const constants_1 = require("../../utils/constants");
|
|
7
|
+
const expectLocatorWithRetry_1 = require("../../utils/assertionHelpers/expectLocatorWithRetry");
|
|
7
8
|
class OperateProcessInstancePage {
|
|
8
9
|
page;
|
|
9
10
|
diagram;
|
|
@@ -236,10 +237,21 @@ class OperateProcessInstancePage {
|
|
|
236
237
|
}
|
|
237
238
|
async assertBusinessIdVisible(businessId) {
|
|
238
239
|
const instanceHeader = this.page.getByTestId('instance-header');
|
|
239
|
-
|
|
240
|
-
|
|
240
|
+
const reload = async () => {
|
|
241
|
+
await this.page.reload();
|
|
242
|
+
};
|
|
243
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, instanceHeader.getByText('Business ID'), {
|
|
244
|
+
totalTimeout: 60000,
|
|
245
|
+
visibilityTimeout: 10000,
|
|
246
|
+
maxRetries: 5,
|
|
247
|
+
postAction: reload,
|
|
248
|
+
});
|
|
249
|
+
await (0, expectLocatorWithRetry_1.expectLocatorWithRetry)(this.page, instanceHeader.getByText(businessId, { exact: true }), {
|
|
250
|
+
totalTimeout: 60000,
|
|
251
|
+
visibilityTimeout: 10000,
|
|
252
|
+
maxRetries: 5,
|
|
253
|
+
postAction: reload,
|
|
241
254
|
});
|
|
242
|
-
await (0, test_1.expect)(instanceHeader.getByText(businessId, { exact: true })).toBeVisible({ timeout: 60000 });
|
|
243
255
|
}
|
|
244
256
|
async assertVariablesListVisible(timeout = 30000) {
|
|
245
257
|
const startTime = Date.now();
|
|
@@ -12,5 +12,6 @@ declare class ConnectorMarketplacePage {
|
|
|
12
12
|
clickCancelButton(): Promise<void>;
|
|
13
13
|
clickReplaceResourceButton(): Promise<void>;
|
|
14
14
|
downloadConnectorToProject(): Promise<void>;
|
|
15
|
+
searchAndDownloadConnector(connectorName: string, maxRetries?: number): Promise<void>;
|
|
15
16
|
}
|
|
16
17
|
export { ConnectorMarketplacePage };
|
|
@@ -48,5 +48,33 @@ class ConnectorMarketplacePage {
|
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
// The marketplace search backend can transiently return HTTP 504
|
|
52
|
+
// ("upstream request timeout"), which leaves the modal in an error or
|
|
53
|
+
// "We couldn't find a match" state with no "Download to project" button.
|
|
54
|
+
// Re-issue the search (clearing the field first) until the button appears,
|
|
55
|
+
// so a single slow search response doesn't fail the whole flow.
|
|
56
|
+
async searchAndDownloadConnector(connectorName, maxRetries = 4) {
|
|
57
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
58
|
+
await this.clickSearchForConnectorTextbox();
|
|
59
|
+
await this.searchForConnectorTextbox.fill('', { timeout: 60000 });
|
|
60
|
+
await this.fillSearchForConnectorTextbox(connectorName);
|
|
61
|
+
try {
|
|
62
|
+
await this.downloadToProjectButton.waitFor({
|
|
63
|
+
state: 'visible',
|
|
64
|
+
timeout: 30000,
|
|
65
|
+
});
|
|
66
|
+
await this.downloadConnectorToProject();
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
catch (e) {
|
|
70
|
+
if (attempt === maxRetries - 1) {
|
|
71
|
+
throw new Error(`Connector "${connectorName}" did not appear in the marketplace ` +
|
|
72
|
+
`after ${maxRetries} search attempts; the marketplace search ` +
|
|
73
|
+
`API may be returning errors (e.g. HTTP 504).`);
|
|
74
|
+
}
|
|
75
|
+
await (0, sleep_1.sleep)(5000);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
51
79
|
}
|
|
52
80
|
exports.ConnectorMarketplacePage = ConnectorMarketplacePage;
|
|
@@ -179,10 +179,7 @@ async function modelRestConnector(modelerCreatePage, connectorSettingsPage, conn
|
|
|
179
179
|
}
|
|
180
180
|
catch (error) {
|
|
181
181
|
await modelerCreatePage.clickMarketPlaceButton();
|
|
182
|
-
await connectorMarketplacePage.
|
|
183
|
-
await connectorMarketplacePage.fillSearchForConnectorTextbox('REST Connector');
|
|
184
|
-
await (0, sleep_1.sleep)(10000);
|
|
185
|
-
await connectorMarketplacePage.downloadConnectorToProject();
|
|
182
|
+
await connectorMarketplacePage.searchAndDownloadConnector('REST Connector');
|
|
186
183
|
// Marketplace closes the change-type panel; reopen it so the
|
|
187
184
|
// newly installed connector appears in the list.
|
|
188
185
|
await modelerCreatePage.clickChangeTypeButton();
|