@camunda/e2e-test-suite 0.0.1244 → 0.0.1245

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.
@@ -13,19 +13,25 @@ exports.getMcpSmVariables = void 0;
13
13
  * (which use FEEL expressions) can resolve them at runtime.
14
14
  */
15
15
  function getMcpSmVariables() {
16
- const baseUrl = process.env.PLAYWRIGHT_BASE_URL ||
17
- `https://gke-${process.env.BASE_URL}.ci.distro.ultrawombat.com`;
18
- const clientId = process.env.MCP_SM_CLIENT_ID ?? 'test';
16
+ const origin = (process.env.PLAYWRIGHT_BASE_URL ||
17
+ `https://gke-${process.env.BASE_URL}.ci.distro.ultrawombat.com`).replace(/\/+$/, '');
18
+ const rawContextPath = process.env.ORCHESTRATION_CONTEXT_PATH || '/orchestration';
19
+ const contextPath = rawContextPath.startsWith('/')
20
+ ? rawContextPath
21
+ : `/${rawContextPath}`;
22
+ const clientId = process.env.MCP_SM_CLIENT_ID ??
23
+ process.env.DISTRO_QA_E2E_TESTS_KEYCLOAK_CLIENT_ID ??
24
+ 'venom';
19
25
  const clientSecret = process.env.MCP_SM_CLIENT_SECRET ??
20
- process.env.DISTRO_QA_E2E_TESTS_KEYCLOAK_CLIENTS_SECRET ??
26
+ process.env.DISTRO_QA_E2E_TESTS_KEYCLOAK_ADMIN_SECRET ??
21
27
  '';
22
28
  const tokenAudience = process.env.MCP_SM_TOKEN_AUDIENCE ?? 'orchestration-api';
23
29
  if (!clientSecret) {
24
- throw new Error('MCP SM client secret is required. Set MCP_SM_CLIENT_SECRET or DISTRO_QA_E2E_TESTS_KEYCLOAK_CLIENTS_SECRET.');
30
+ throw new Error('MCP SM client secret is required. Set MCP_SM_CLIENT_SECRET or DISTRO_QA_E2E_TESTS_KEYCLOAK_ADMIN_SECRET.');
25
31
  }
26
32
  return {
27
- mcpBaseUrl: baseUrl,
28
- mcpOauthUrl: `${baseUrl}/auth/realms/camunda-platform/protocol/openid-connect/token`,
33
+ mcpBaseUrl: `${origin}${contextPath.replace(/\/+$/, '')}`,
34
+ mcpOauthUrl: `${origin}/auth/realms/camunda-platform/protocol/openid-connect/token`,
29
35
  mcpClientId: clientId,
30
36
  mcpClientSecret: clientSecret,
31
37
  mcpTokenAudience: tokenAudience,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1244",
3
+ "version": "0.0.1245",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",