@camunda/e2e-test-suite 0.0.1651 → 0.0.1653
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.
|
@@ -40,7 +40,22 @@ class ConnectorTemplatePage {
|
|
|
40
40
|
});
|
|
41
41
|
await (0, test_1.expect)(dialog.getByRole('spinbutton', { name: 'Version number', exact: true })).toHaveValue(String(version));
|
|
42
42
|
await dialog.getByRole('button', { name: 'Publish', exact: true }).click();
|
|
43
|
-
|
|
43
|
+
// Hub reports a failed POST /milestones only as a sonner error toast
|
|
44
|
+
// ("Could not publish ... Try again later.") and leaves the dialog open, so
|
|
45
|
+
// waiting for the dialog alone burns 60s and reports "still visible". Stop
|
|
46
|
+
// as soon as either outcome shows and surface Hub's own error text.
|
|
47
|
+
const publishError = this.page
|
|
48
|
+
.locator('[data-sonner-toast][data-type="error"]')
|
|
49
|
+
.filter({ hasText: 'Could not publish' });
|
|
50
|
+
await test_1.expect
|
|
51
|
+
.poll(async () => (await publishError.first().isVisible()) ||
|
|
52
|
+
!(await dialog.isVisible()), { timeout: 60000, intervals: [500] })
|
|
53
|
+
.toBe(true);
|
|
54
|
+
if (await publishError.first().isVisible()) {
|
|
55
|
+
throw new Error(`Web Modeler rejected the publish: ${await publishError
|
|
56
|
+
.first()
|
|
57
|
+
.innerText()}`);
|
|
58
|
+
}
|
|
44
59
|
}
|
|
45
60
|
async publishConnector() {
|
|
46
61
|
try {
|
|
@@ -1501,6 +1501,27 @@ class ModelerCreatePage {
|
|
|
1501
1501
|
await (0, test_1.expect)(this.templateNotFoundTag).toBeHidden();
|
|
1502
1502
|
}
|
|
1503
1503
|
async assertExportedTemplateBindings(bindings) {
|
|
1504
|
+
// A transient background fetch (the file's comments load was seen to fail
|
|
1505
|
+
// once with net::ERR_FAILED, then succeed on retry) raises a sonner error
|
|
1506
|
+
// toast in the top-right corner, where the "Browse more actions" kebab also
|
|
1507
|
+
// sits. Its subtree then intercepts every click on the kebab for the full
|
|
1508
|
+
// action timeout even though the button is visible and enabled (trace:
|
|
1509
|
+
// `<li data-sonner-toast data-type="error"> intercepts pointer events`).
|
|
1510
|
+
// Dismiss any lingering error toast via its close button first; the
|
|
1511
|
+
// exported-XML assertion below is unaffected, so this clears the incidental
|
|
1512
|
+
// overlay without masking a real failure.
|
|
1513
|
+
const toast = this.page.locator('[data-sonner-toast][data-type="error"]');
|
|
1514
|
+
const toastClose = toast.locator('[data-close-button="true"]');
|
|
1515
|
+
for (let i = 0; i < 5; i++) {
|
|
1516
|
+
if (!(await toastClose
|
|
1517
|
+
.first()
|
|
1518
|
+
.isVisible()
|
|
1519
|
+
.catch(() => false)))
|
|
1520
|
+
break;
|
|
1521
|
+
const before = await toast.count();
|
|
1522
|
+
await toastClose.first().click();
|
|
1523
|
+
await (0, test_1.expect)(toast).toHaveCount(before - 1, { timeout: 5000 });
|
|
1524
|
+
}
|
|
1504
1525
|
await this.page
|
|
1505
1526
|
.getByRole('button', { name: 'Browse more actions', exact: true })
|
|
1506
1527
|
.click();
|
|
@@ -21,7 +21,14 @@ class ConnectorTemplatePage {
|
|
|
21
21
|
await this.publishButton.click({ timeout: 90000 });
|
|
22
22
|
}
|
|
23
23
|
async publishImportedTemplateToWorkspace(version) {
|
|
24
|
-
|
|
24
|
+
// openImportedTemplate() only awaits the /element-templates/ URL, which flips
|
|
25
|
+
// before the editor's async load (fetch file + project, validate, mount the
|
|
26
|
+
// code editor) finishes. The Publish control is omitted from the DOM while the
|
|
27
|
+
// editor is loading and disabled until the template validates, so clicking it
|
|
28
|
+
// on the default 10s action timeout races that load. Wait for it to become
|
|
29
|
+
// interactive first; a genuinely broken editor still surfaces as a failure.
|
|
30
|
+
await (0, test_1.expect)(this.publishButton).toBeEnabled({ timeout: 90000 });
|
|
31
|
+
await this.publishButton.click();
|
|
25
32
|
await this.page
|
|
26
33
|
.getByRole('menuitem', { name: 'Publish to workspace', exact: true })
|
|
27
34
|
.click();
|
|
@@ -33,7 +40,22 @@ class ConnectorTemplatePage {
|
|
|
33
40
|
});
|
|
34
41
|
await (0, test_1.expect)(dialog.getByRole('spinbutton', { name: 'Version number', exact: true })).toHaveValue(String(version));
|
|
35
42
|
await dialog.getByRole('button', { name: 'Publish', exact: true }).click();
|
|
36
|
-
|
|
43
|
+
// Hub reports a failed POST /milestones only as a sonner error toast
|
|
44
|
+
// ("Could not publish ... Try again later.") and leaves the dialog open, so
|
|
45
|
+
// waiting for the dialog alone burns 60s and reports "still visible". Stop
|
|
46
|
+
// as soon as either outcome shows and surface Hub's own error text.
|
|
47
|
+
const publishError = this.page
|
|
48
|
+
.locator('[data-sonner-toast][data-type="error"]')
|
|
49
|
+
.filter({ hasText: 'Could not publish' });
|
|
50
|
+
await test_1.expect
|
|
51
|
+
.poll(async () => (await publishError.first().isVisible()) ||
|
|
52
|
+
!(await dialog.isVisible()), { timeout: 60000, intervals: [500] })
|
|
53
|
+
.toBe(true);
|
|
54
|
+
if (await publishError.first().isVisible()) {
|
|
55
|
+
throw new Error(`Web Modeler rejected the publish: ${await publishError
|
|
56
|
+
.first()
|
|
57
|
+
.innerText()}`);
|
|
58
|
+
}
|
|
37
59
|
}
|
|
38
60
|
async publishConnector() {
|
|
39
61
|
try {
|