@camunda/e2e-test-suite 0.0.1321 → 0.0.1323
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.
|
@@ -8,6 +8,7 @@ const randomName_1 = require("../../utils/randomName");
|
|
|
8
8
|
const ProcessApplicationPage_1 = require("./ProcessApplicationPage");
|
|
9
9
|
const sessionRecovery_1 = require("../../utils/sessionRecovery");
|
|
10
10
|
const modelerCluster_1 = require("../../utils/modelerCluster");
|
|
11
|
+
const hubTableRow_1 = require("../../utils/hubTableRow");
|
|
11
12
|
class ModelerHomePage {
|
|
12
13
|
defaultFolderName = 'Cross Component Test Project';
|
|
13
14
|
// The default cluster test-setup.spec.ts's "Create Default Cluster" test
|
|
@@ -369,9 +370,9 @@ class ModelerHomePage {
|
|
|
369
370
|
// resource is one level down, so re-enter the container first.
|
|
370
371
|
async clickProcessDiagram(name) {
|
|
371
372
|
await this.ensureInResourceContainer();
|
|
372
|
-
const process =
|
|
373
|
+
const process = (0, hubTableRow_1.hubTableRowName)(this.page, name);
|
|
373
374
|
await (0, test_1.expect)(process).toBeVisible({ timeout: 90000 });
|
|
374
|
-
await
|
|
375
|
+
await (0, hubTableRow_1.openHubTableRow)(this.page, name);
|
|
375
376
|
}
|
|
376
377
|
// Opens the create menu inside this test's process application. The menu at
|
|
377
378
|
// workspace root no longer offers BPMN, Form or Upload -- those resources
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ProcessApplicationPage = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const submitModalWithRetry_1 = require("../../utils/assertionHelpers/submitModalWithRetry");
|
|
6
|
+
const hubTableRow_1 = require("../../utils/hubTableRow");
|
|
6
7
|
// Which process application holds the current test's resources, and which
|
|
7
8
|
// cluster its development stage currently points at. Keyed by the Playwright
|
|
8
9
|
// Page because the object that creates the container (ModelerHomePage) and the
|
|
@@ -449,13 +450,9 @@ class ProcessApplicationPage {
|
|
|
449
450
|
await reopen.click({ timeout: 30000 });
|
|
450
451
|
}
|
|
451
452
|
async openByName(name) {
|
|
452
|
-
const processApplication = this.page
|
|
453
|
-
.getByRole('row')
|
|
454
|
-
.filter({ hasText: name })
|
|
455
|
-
.getByTitle(name)
|
|
456
|
-
.first();
|
|
453
|
+
const processApplication = (0, hubTableRow_1.hubTableRowName)(this.page, name);
|
|
457
454
|
await (0, test_1.expect)(processApplication).toBeVisible({ timeout: 90000 });
|
|
458
|
-
await
|
|
455
|
+
await (0, hubTableRow_1.openHubTableRow)(this.page, name, { timeout: 60000 });
|
|
459
456
|
await this.waitForProcessApplication();
|
|
460
457
|
}
|
|
461
458
|
}
|
|
@@ -9,6 +9,7 @@ const sleep_1 = require("../../utils/sleep");
|
|
|
9
9
|
const randomSleep_1 = require("../../utils/randomSleep");
|
|
10
10
|
const fileUpload_1 = require("../../utils/fileUpload");
|
|
11
11
|
const mailSlurpClient_1 = require("../../utils/mailSlurpClient");
|
|
12
|
+
const hubTableRow_1 = require("../../utils/hubTableRow");
|
|
12
13
|
const consoleApiHelpers_1 = require("../../utils/consoleApiHelpers");
|
|
13
14
|
// Tracks which worker-derived `timeout` values have already paid the
|
|
14
15
|
// stagger sleep below, so a worker only pays it once per process lifetime
|
|
@@ -185,17 +186,13 @@ async function modelDiagramFromFile(page, modelerHomePage, modelerCreatePage, pr
|
|
|
185
186
|
console.warn(`${fileName}.bpmn did not appear after upload ` +
|
|
186
187
|
`(attempt ${attempt}/${maxUploadAttempts}); re-reading the list.`);
|
|
187
188
|
await modelerHomePage.returnToResourceContainer();
|
|
188
|
-
const uploaded = page
|
|
189
|
-
.getByRole('row')
|
|
190
|
-
.filter({ hasText: fileName })
|
|
191
|
-
.getByTitle(fileName)
|
|
192
|
-
.first();
|
|
189
|
+
const uploaded = (0, hubTableRow_1.hubTableRowName)(page, fileName);
|
|
193
190
|
const landed = await uploaded
|
|
194
191
|
.waitFor({ state: 'visible', timeout: 15000 })
|
|
195
192
|
.then(() => true)
|
|
196
193
|
.catch(() => false);
|
|
197
194
|
if (landed) {
|
|
198
|
-
await
|
|
195
|
+
await (0, hubTableRow_1.openHubTableRow)(page, fileName);
|
|
199
196
|
break;
|
|
200
197
|
}
|
|
201
198
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.openHubTableRow = exports.hubTableRowName = void 0;
|
|
4
|
+
// Since camunda/camunda-hub#29692 the design-system entity tables (process
|
|
5
|
+
// application resources, projects, IDP applications, ...) stretch a real link
|
|
6
|
+
// -- `data-slot="data-table-row-primary-action"` -- over the whole row. It
|
|
7
|
+
// sits on top of the name cell and intercepts every click on the `title`
|
|
8
|
+
// element, so a title click times out. Open the row through that link, and
|
|
9
|
+
// click the name itself only when the table renders no row link (e.g. while
|
|
10
|
+
// a row is being renamed inline).
|
|
11
|
+
function hubTableRowName(page, name) {
|
|
12
|
+
return page.getByRole('row').filter({ hasText: name }).getByTitle(name).first();
|
|
13
|
+
}
|
|
14
|
+
exports.hubTableRowName = hubTableRowName;
|
|
15
|
+
async function openHubTableRow(page, name, options = {}) {
|
|
16
|
+
const row = page
|
|
17
|
+
.getByRole('row')
|
|
18
|
+
.filter({ hasText: name })
|
|
19
|
+
.filter({ has: page.getByTitle(name) })
|
|
20
|
+
.first();
|
|
21
|
+
const rowLink = row.locator('[data-slot="data-table-row-primary-action"]');
|
|
22
|
+
if ((await rowLink.count()) > 0) {
|
|
23
|
+
await rowLink.first().click(options);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
await row.getByTitle(name).first().click(options);
|
|
27
|
+
}
|
|
28
|
+
exports.openHubTableRow = openHubTableRow;
|