fix: set environment to dev for e2e ui tests#1270
fix: set environment to dev for e2e ui tests#1270mfrancisc merged 1 commit intocodeready-toolchain:masterfrom
Conversation
WalkthroughA single environment configuration key ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@deploy/devsandbox-dashboard/ui-e2e-tests/app-config.yaml`:
- Line 87: Change the environment value from the uppercase string "DEV" to the
lowercase "dev" so it matches the test constant DevEnv used in
testsupport/devsandbox-dashboard/setup.go (DevEnv = "dev") and allows the exact
string comparison (if env == DevEnv) to succeed; update the environment: DEV
entry to environment: dev wherever the config is set.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f1c240c0-6c2c-47e7-8a7d-7b9ddada9e67
📒 Files selected for processing (1)
deploy/devsandbox-dashboard/ui-e2e-tests/app-config.yaml
| signInPage: oidc | ||
|
|
||
| sandbox: | ||
| environment: DEV |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify expected casing for sandbox environment values in this repo.
# Expected: either consistent usage of DEV everywhere, or explicit normalization/allowlist including DEV.
set -euo pipefail
echo "== app-config values =="
fd 'app-config\.ya?ml$' | xargs -r rg -n -C2 '^\s*sandbox:\s*$|^\s*environment:\s*(DEV|dev)\s*$'
echo
echo "== references to sandbox.environment in code/tests =="
rg -n -C3 'sandbox\.environment|environment.*(DEV|dev)|\bDEV\b|\bdev\b' --type-add 'yaml:*.yaml' --type-add 'yml:*.yml'
echo
echo "== linked env literals near config handling =="
rg -n -C3 '(ENV|environment).*(===|==|includes|match|toLowerCase|toUpperCase)'Repository: codeready-toolchain/toolchain-e2e
Length of output: 50390
Change environment: DEV to environment: dev to match test setup expectations.
Test setup code in testsupport/devsandbox-dashboard/setup.go defines DevEnv = "dev" and uses an exact string comparison (if env == DevEnv) to determine test behavior. Using uppercase DEV will fail this check, preventing the cookie consent handling from executing during tests.
Suggested fix
sandbox:
- environment: DEV
+ environment: dev
signupAPI: ${REGISTRATION_SERVICE_API}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@deploy/devsandbox-dashboard/ui-e2e-tests/app-config.yaml` at line 87, Change
the environment value from the uppercase string "DEV" to the lowercase "dev" so
it matches the test constant DevEnv used in
testsupport/devsandbox-dashboard/setup.go (DevEnv = "dev") and allows the exact
string comparison (if env == DevEnv) to succeed; update the environment: DEV
entry to environment: dev wherever the config is set.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mfrancisc, rajivnathan, rsoaresd The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest updated UI code |



e2e tests codeready-toolchain/devsandbox-dashboard#48
Summary by CodeRabbit