@camunda/e2e-test-suite 0.0.1759 → 0.0.1760
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,38 +4,45 @@ const test_1 = require("@playwright/test");
|
|
|
4
4
|
const SM_8_10_1 = require("../../fixtures/SM-8.10");
|
|
5
5
|
const _setup_1 = require("../../test-setup.js");
|
|
6
6
|
const loggingUtils_1 = require("../../utils/loggingUtils");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
(0, SM_8_10_1.test)('signs in to Web Modeler through Entra ID', async ({ page, loginPage, }) => {
|
|
18
|
-
await SM_8_10_1.test.step('Open Web Modeler and follow the IdP redirect', async () => {
|
|
19
|
-
// C8_USERNAME/C8_PASSWORD are the SaaS slots and are never exported by
|
|
20
|
-
// the SM flow: it passes sm_username/sm_password -- the Entra address and
|
|
21
|
-
// password on an oidc run -- which run-tests-reusable maps to these two.
|
|
22
|
-
// Reading the SaaS names filled both Entra fields with the empty string,
|
|
23
|
-
// so the IdP answered "Enter a valid email address" and the test failed
|
|
24
|
-
// 120s later on waitForURL rather than on the missing credential.
|
|
25
|
-
const username = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_USERNAME;
|
|
26
|
-
const password = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD;
|
|
27
|
-
(0, test_1.expect)(username, 'DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_USERNAME is unset').toBeTruthy();
|
|
28
|
-
(0, test_1.expect)(password, 'DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD is unset').toBeTruthy();
|
|
29
|
-
await page.goto('/modeler');
|
|
30
|
-
await page.waitForURL((url) => url.hostname.endsWith('login.microsoftonline.com'), { timeout: 60000 });
|
|
31
|
-
const submitted = await loginPage.login(username, password);
|
|
32
|
-
(0, test_1.expect)(submitted).toBe(true);
|
|
7
|
+
const entraLogin_1 = require("../../utils/entraLogin");
|
|
8
|
+
// Entra sign-in exists only on an OIDC deployment; a Keycloak cluster exports no
|
|
9
|
+
// Entra credentials, so the spec fails its own credential pre-flight there.
|
|
10
|
+
// Register it only on an Entra-backed run, the module guard the sibling SM specs
|
|
11
|
+
// already use, so it never runs on the Keycloak deployments AlwaysGreen drives.
|
|
12
|
+
if ((0, entraLogin_1.isEntraRun)()) {
|
|
13
|
+
SM_8_10_1.test.describe('Entra ID Sign-In', () => {
|
|
14
|
+
SM_8_10_1.test.beforeEach(async ({ page }, testInfo) => {
|
|
15
|
+
(0, loggingUtils_1.setupTestLogging)(testInfo);
|
|
16
|
+
await page.context().clearCookies();
|
|
33
17
|
});
|
|
34
|
-
|
|
35
|
-
await
|
|
36
|
-
|
|
18
|
+
SM_8_10_1.test.afterEach(async ({ page }, testInfo) => {
|
|
19
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
20
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
21
|
+
(0, loggingUtils_1.cleanupTestLogging)();
|
|
22
|
+
});
|
|
23
|
+
(0, SM_8_10_1.test)('signs in to Web Modeler through Entra ID', async ({ page, loginPage, }) => {
|
|
24
|
+
await SM_8_10_1.test.step('Open Web Modeler and follow the IdP redirect', async () => {
|
|
25
|
+
// C8_USERNAME/C8_PASSWORD are the SaaS slots and are never exported by
|
|
26
|
+
// the SM flow: it passes sm_username/sm_password -- the Entra address and
|
|
27
|
+
// password on an oidc run -- which run-tests-reusable maps to these two.
|
|
28
|
+
// Reading the SaaS names filled both Entra fields with the empty string,
|
|
29
|
+
// so the IdP answered "Enter a valid email address" and the test failed
|
|
30
|
+
// 120s later on waitForURL rather than on the missing credential.
|
|
31
|
+
const username = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_USERNAME;
|
|
32
|
+
const password = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD;
|
|
33
|
+
(0, test_1.expect)(username, 'DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_USERNAME is unset').toBeTruthy();
|
|
34
|
+
(0, test_1.expect)(password, 'DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD is unset').toBeTruthy();
|
|
35
|
+
await page.goto('/modeler');
|
|
36
|
+
await page.waitForURL((url) => url.hostname.endsWith('login.microsoftonline.com'), { timeout: 60000 });
|
|
37
|
+
const submitted = await loginPage.login(username, password);
|
|
38
|
+
(0, test_1.expect)(submitted).toBe(true);
|
|
39
|
+
});
|
|
40
|
+
await SM_8_10_1.test.step('Land back on Web Modeler as a signed-in user', async () => {
|
|
41
|
+
await page.waitForURL((url) => url.pathname.startsWith('/modeler'), {
|
|
42
|
+
timeout: 120000,
|
|
43
|
+
});
|
|
44
|
+
await (0, test_1.expect)(page.getByRole('link', { name: /workspaces/i }).first()).toBeVisible({ timeout: 60000 });
|
|
37
45
|
});
|
|
38
|
-
await (0, test_1.expect)(page.getByRole('link', { name: /workspaces/i }).first()).toBeVisible({ timeout: 60000 });
|
|
39
46
|
});
|
|
40
47
|
});
|
|
41
|
-
}
|
|
48
|
+
}
|