@camunda/e2e-test-suite 0.0.1761 → 0.0.1763
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_11_1 = require("../../fixtures/SM-8.11");
|
|
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_11_1.test)('signs in to Web Modeler through Entra ID', async ({ page, loginPage, }) => {
|
|
18
|
-
await SM_8_11_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_11_1.test.describe('Entra ID Sign-In', () => {
|
|
14
|
+
SM_8_11_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_11_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_11_1.test)('signs in to Web Modeler through Entra ID', async ({ page, loginPage, }) => {
|
|
24
|
+
await SM_8_11_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_11_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
|
+
}
|
|
@@ -7,6 +7,14 @@ export declare const entraLocators: (page: Page) => {
|
|
|
7
7
|
staySignedInDecline: import("playwright-core").Locator;
|
|
8
8
|
consentAccept: import("playwright-core").Locator;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Whether the deployment under test is backed by Entra ID rather than Keycloak.
|
|
12
|
+
*
|
|
13
|
+
* Keyed on its own scenario flag, the IS_RBA / IS_MT / IS_DS convention, which
|
|
14
|
+
* only the Entra workflows set. Neither a credential being present nor the
|
|
15
|
+
* deployment speaking OIDC identifies the IdP -- Keycloak serves OIDC too, and a
|
|
16
|
+
* secret can reach a run that is not Entra-backed.
|
|
17
|
+
*/
|
|
10
18
|
export declare function isEntraRun(): boolean;
|
|
11
19
|
/**
|
|
12
20
|
* The authenticator seed registered for one Entra account.
|
package/dist/utils/entraLogin.js
CHANGED
|
@@ -12,8 +12,16 @@ const entraLocators = (page) => ({
|
|
|
12
12
|
consentAccept: page.getByRole('button', { name: 'Accept' }),
|
|
13
13
|
});
|
|
14
14
|
exports.entraLocators = entraLocators;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the deployment under test is backed by Entra ID rather than Keycloak.
|
|
17
|
+
*
|
|
18
|
+
* Keyed on its own scenario flag, the IS_RBA / IS_MT / IS_DS convention, which
|
|
19
|
+
* only the Entra workflows set. Neither a credential being present nor the
|
|
20
|
+
* deployment speaking OIDC identifies the IdP -- Keycloak serves OIDC too, and a
|
|
21
|
+
* secret can reach a run that is not Entra-backed.
|
|
22
|
+
*/
|
|
15
23
|
function isEntraRun() {
|
|
16
|
-
return
|
|
24
|
+
return process.env.IS_ENTRA === 'true';
|
|
17
25
|
}
|
|
18
26
|
exports.isEntraRun = isEntraRun;
|
|
19
27
|
/**
|
package/package.json
CHANGED
package/playwright.config.ts
CHANGED
|
@@ -125,9 +125,8 @@ const useReportersWithSlack: any[] = [
|
|
|
125
125
|
: '';
|
|
126
126
|
suffix += tasklistSuffix;
|
|
127
127
|
|
|
128
|
-
const entraSuffix =
|
|
129
|
-
? ', Entra ID'
|
|
130
|
-
: '';
|
|
128
|
+
const entraSuffix =
|
|
129
|
+
process.env.IS_ENTRA === 'true' ? ', Entra ID' : '';
|
|
131
130
|
return `Test Results for Self-Managed with Helm with Latest 8.11-SNAPSHOT Versions (${searchEngine}${entraSuffix})${suffix} - ${projectName}`;
|
|
132
131
|
}
|
|
133
132
|
case 'SM-8.10': {
|
|
@@ -151,9 +150,8 @@ const useReportersWithSlack: any[] = [
|
|
|
151
150
|
: '';
|
|
152
151
|
suffix += tasklistSuffix;
|
|
153
152
|
|
|
154
|
-
const entraSuffix =
|
|
155
|
-
? ', Entra ID'
|
|
156
|
-
: '';
|
|
153
|
+
const entraSuffix =
|
|
154
|
+
process.env.IS_ENTRA === 'true' ? ', Entra ID' : '';
|
|
157
155
|
return `Test Results for Self-Managed with Helm with Latest 8.10-SNAPSHOT Versions (${searchEngine}${entraSuffix})${suffix} - ${projectName}`;
|
|
158
156
|
}
|
|
159
157
|
case 'SM-8.9': {
|
|
@@ -396,7 +394,7 @@ const regularTestIgnore = new RegExp(
|
|
|
396
394
|
...(process.env.C8RUN_PHYSICAL_TENANTS === 'unsupported'
|
|
397
395
|
? ['physical-tenants']
|
|
398
396
|
: []),
|
|
399
|
-
...(process.env.
|
|
397
|
+
...(process.env.IS_ENTRA === 'true' ? [] : ['entra-login']),
|
|
400
398
|
].join('|')})\\.spec\\.[jt]s$`,
|
|
401
399
|
);
|
|
402
400
|
|