@camunda/e2e-test-suite 0.0.1771 → 0.0.1773
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.
|
@@ -21,7 +21,7 @@ declare class NavigationPage {
|
|
|
21
21
|
username: string;
|
|
22
22
|
password: string;
|
|
23
23
|
}): Promise<void>;
|
|
24
|
-
|
|
24
|
+
suppressOnboardingTour(): Promise<void>;
|
|
25
25
|
goToTasklist(sleepTimeout?: number, credentials?: {
|
|
26
26
|
username: string;
|
|
27
27
|
password: string;
|
|
@@ -520,15 +520,75 @@ async function modelAndRunConnectorsDocHandlingDiagram(modelerCreatePage, modele
|
|
|
520
520
|
// a longer one widens the overflow tooltip until it covers the Rename item.
|
|
521
521
|
await (0, fileUpload_1.uploadFile)(page, 'SM-8.10/SM_Document_Handling_Connectors_User_Flow.bpmn');
|
|
522
522
|
await modelerHomePage.clickProcessDiagram('SM_Document_Handling_Connectors_User_Flow');
|
|
523
|
+
// A content autosave racing the file rename gets a 409, and Web Modeler's
|
|
524
|
+
// re-sync drops unsaved property edits, so wait for a save carrying them.
|
|
525
|
+
const fileSaveBody = (response) => {
|
|
526
|
+
const request = response.request();
|
|
527
|
+
if (request.method() !== 'PATCH' ||
|
|
528
|
+
!response.ok() ||
|
|
529
|
+
!/\/api\/internal\/files\/[^/]+$/.test(new URL(response.url()).pathname)) {
|
|
530
|
+
return null;
|
|
531
|
+
}
|
|
532
|
+
return request.postData();
|
|
533
|
+
};
|
|
534
|
+
let processRenameSaved = false;
|
|
535
|
+
const trackProcessRename = (response) => {
|
|
536
|
+
const body = fileSaveBody(response);
|
|
537
|
+
if (!body) {
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
try {
|
|
541
|
+
const content = JSON.parse(body).content;
|
|
542
|
+
const processTag = typeof content === 'string'
|
|
543
|
+
? content.match(/<bpmn:process\b[^>]*>/)?.[0]
|
|
544
|
+
: undefined;
|
|
545
|
+
if (processTag?.includes(`id="${processName}"`) &&
|
|
546
|
+
processTag.includes(`name="${processName}"`)) {
|
|
547
|
+
processRenameSaved = true;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
catch {
|
|
551
|
+
// Non-JSON body: not a content save.
|
|
552
|
+
}
|
|
553
|
+
};
|
|
523
554
|
await modelerCreatePage.clickDiagramBreadcrumb();
|
|
524
555
|
await modelerCreatePage.clickEditDiagramNameButton();
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
556
|
+
let fileRenameSaved = false;
|
|
557
|
+
const trackFileRename = (response) => {
|
|
558
|
+
const body = fileSaveBody(response);
|
|
559
|
+
try {
|
|
560
|
+
if (body && JSON.parse(body).name === processName) {
|
|
561
|
+
fileRenameSaved = true;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
catch {
|
|
565
|
+
// Non-JSON body: not a rename.
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
page.on('response', trackFileRename);
|
|
569
|
+
try {
|
|
570
|
+
await modelerCreatePage.enterDiagramName(processName);
|
|
571
|
+
await test_1.expect.poll(() => fileRenameSaved, { timeout: 30000 }).toBe(true);
|
|
572
|
+
}
|
|
573
|
+
finally {
|
|
574
|
+
page.off('response', trackFileRename);
|
|
575
|
+
}
|
|
576
|
+
page.on('response', trackProcessRename);
|
|
577
|
+
try {
|
|
578
|
+
await (0, test_1.expect)(async () => {
|
|
579
|
+
if (!processRenameSaved) {
|
|
580
|
+
await modelerCreatePage.clickGeneralPropertiesPanel();
|
|
581
|
+
await modelerCreatePage.clickNameInput();
|
|
582
|
+
await modelerCreatePage.fillNameInput(processName);
|
|
583
|
+
await modelerCreatePage.clickIdInput();
|
|
584
|
+
await modelerCreatePage.fillIdInput(processName);
|
|
585
|
+
}
|
|
586
|
+
await test_1.expect.poll(() => processRenameSaved, { timeout: 20000 }).toBe(true);
|
|
587
|
+
}).toPass({ timeout: 120000 });
|
|
588
|
+
}
|
|
589
|
+
finally {
|
|
590
|
+
page.off('response', trackProcessRename);
|
|
591
|
+
}
|
|
532
592
|
await modelerCreatePage.clickFirstPlaceRESTConnector();
|
|
533
593
|
await modelerCreatePage.clickChangeTypeButton();
|
|
534
594
|
await modelerCreatePage.clickMarketPlaceButton();
|
|
@@ -20,7 +20,7 @@ if ((0, entraLogin_1.isEntraRun)()) {
|
|
|
20
20
|
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
21
21
|
(0, loggingUtils_1.cleanupTestLogging)();
|
|
22
22
|
});
|
|
23
|
-
(0, SM_8_11_1.test)('signs in to Web Modeler through Entra ID', async ({ page, loginPage, }) => {
|
|
23
|
+
(0, SM_8_11_1.test)('signs in to Web Modeler through Entra ID', async ({ page, loginPage, navigationPage, }) => {
|
|
24
24
|
await SM_8_11_1.test.step('Open Web Modeler and follow the IdP redirect', async () => {
|
|
25
25
|
// C8_USERNAME/C8_PASSWORD are the SaaS slots and are never exported by
|
|
26
26
|
// the SM flow: it passes sm_username/sm_password -- the Entra address and
|
|
@@ -32,6 +32,7 @@ if ((0, entraLogin_1.isEntraRun)()) {
|
|
|
32
32
|
const password = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD;
|
|
33
33
|
(0, test_1.expect)(username, 'DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_USERNAME is unset').toBeTruthy();
|
|
34
34
|
(0, test_1.expect)(password, 'DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD is unset').toBeTruthy();
|
|
35
|
+
await navigationPage.suppressOnboardingTour();
|
|
35
36
|
await page.goto('/modeler');
|
|
36
37
|
await page.waitForURL((url) => url.hostname.endsWith('login.microsoftonline.com'), { timeout: 60000 });
|
|
37
38
|
const submitted = await loginPage.login(username, password);
|