diff options
| author | Saumit <justsaumit@protonmail.com> | 2025-09-27 02:14:26 +0530 |
|---|---|---|
| committer | Saumit <justsaumit@protonmail.com> | 2025-09-27 02:14:26 +0530 |
| commit | 82e03978b89938219958032efb1448cc76baa181 (patch) | |
| tree | 626f3e54d52ecd49be0ed3bee30abacc0453d081 /src/frontend/cypress.config.ts | |
Initial snapshot - OpenTelemetry demo 2.1.3 -f
Diffstat (limited to 'src/frontend/cypress.config.ts')
| -rw-r--r-- | src/frontend/cypress.config.ts | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/frontend/cypress.config.ts b/src/frontend/cypress.config.ts new file mode 100644 index 0000000..ab1e082 --- /dev/null +++ b/src/frontend/cypress.config.ts @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +import { defineConfig } from 'cypress'; +import dotEnv from 'dotenv'; +import dotenvExpand from 'dotenv-expand'; +import { resolve } from 'path'; + +const myEnv = dotEnv.config({ + path: resolve(__dirname, '../../.env'), +}); +dotenvExpand.expand(myEnv); + +const { FRONTEND_ADDR = '', NODE_ENV, FRONTEND_PORT = '8080' } = process.env; + +const baseUrl = NODE_ENV === 'production' ? `http://${FRONTEND_ADDR}` : `http://localhost:${FRONTEND_PORT}`; + +export default defineConfig({ + env: { + baseUrl, + }, + e2e: { + baseUrl, + setupNodeEvents(on, config) { + // implement node event listeners here + }, + supportFile: false, + }, +}); |
