Skip to content

fix: set environment to dev for e2e ui tests#1270

Merged
mfrancisc merged 1 commit intocodeready-toolchain:masterfrom
mfrancisc:newenv
Mar 26, 2026
Merged

fix: set environment to dev for e2e ui tests#1270
mfrancisc merged 1 commit intocodeready-toolchain:masterfrom
mfrancisc:newenv

Conversation

@mfrancisc
Copy link
Contributor

@mfrancisc mfrancisc commented Mar 25, 2026

e2e tests codeready-toolchain/devsandbox-dashboard#48

Summary by CodeRabbit

  • Chores
    • Updated sandbox configuration to specify the development environment setting.

@openshift-ci openshift-ci bot requested review from metlos and rajivnathan March 25, 2026 12:11
@coderabbitai
Copy link

coderabbitai bot commented Mar 25, 2026

Walkthrough

A single environment configuration key (sandbox.environment: DEV) was added to the application configuration file for the UI e2e tests. This is a straightforward configuration update with no logic or structural changes.

Changes

Cohort / File(s) Summary
Configuration Update
deploy/devsandbox-dashboard/ui-e2e-tests/app-config.yaml
Added environment: DEV configuration entry under the sandbox section.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a DEV environment configuration to the app-config.yaml for e2e UI tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 629dc7b and 31ccd49.

📒 Files selected for processing (1)
  • deploy/devsandbox-dashboard/ui-e2e-tests/app-config.yaml

signInPage: oidc

sandbox:
environment: DEV
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 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.

Copy link
Contributor

@rsoaresd rsoaresd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🚀

@openshift-ci
Copy link

openshift-ci bot commented Mar 25, 2026

[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

Details Needs approval from an approver in each of these files:
  • OWNERS [mfrancisc,rajivnathan,rsoaresd]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mfrancisc
Copy link
Contributor Author

/retest

updated UI code

@mfrancisc mfrancisc merged commit 7929eb0 into codeready-toolchain:master Mar 26, 2026
9 of 11 checks passed
@mfrancisc mfrancisc deleted the newenv branch March 26, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants