Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/run-ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ jobs:

- name: Run frontend unit tests
run: |
docker run --env-file frontend/.env.example owasp/nest:test-frontend-unit-latest pnpm run test:unit
docker run --env-file frontend/.env.example owasp/nest:test-frontend-unit-latest sh -c "NODE_OPTIONS='--experimental-vm-modules --no-warnings=DEP0040' npx jest --ci --no-cache --verbose --detectOpenHandles --forceExit"

run-frontend-e2e-tests:
name: Run frontend e2e tests
Expand Down
4 changes: 2 additions & 2 deletions frontend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ test-frontend: \
test-frontend-e2e

test-frontend-e2e:
@DOCKER_BUILDKIT=1 NEXT_PUBLIC_ENVIRONMENT=local docker build \
@DOCKER_BUILDKIT=1 docker build \
--cache-from nest-test-frontend-e2e \
-f frontend/docker/Dockerfile.e2e.test frontend \
-t nest-test-frontend-e2e
@docker run --env-file frontend/.env.example --rm nest-test-frontend-e2e pnpm run test:e2e

test-frontend-unit:
@DOCKER_BUILDKIT=1 NEXT_PUBLIC_ENVIRONMENT=local docker build \
@DOCKER_BUILDKIT=1 docker build \
--cache-from nest-test-frontend-unit \
-f frontend/docker/Dockerfile.unit.test frontend \
-t nest-test-frontend-unit
Expand Down
1 change: 1 addition & 0 deletions frontend/docker/Dockerfile.e2e.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM mcr.microsoft.com/playwright:v1.55.1-jammy

ENV FORCE_COLOR=1 \
NEXT_PUBLIC_ENVIRONMENT=local \
NPM_CACHE="/app/.npm" \
PNPM_HOME="/pnpm"

Expand Down
1 change: 1 addition & 0 deletions frontend/docker/Dockerfile.unit.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM node:22-alpine

ENV FORCE_COLOR=1 \
NEXT_PUBLIC_ENVIRONMENT=local \
NPM_CACHE="/app/.npm" \
PNPM_HOME="/pnpm"

Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"lint:check": "eslint . --config eslint.config.mjs --max-warnings=0",
"start": "next start",
"test:e2e": "npx playwright test",
"test:unit": "tsc --noEmit && NODE_OPTIONS='--experimental-vm-modules --no-warnings=DEP0040' jest"
"test:unit": "tsc; NODE_OPTIONS='--experimental-vm-modules --no-warnings=DEP0040' jest"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify: Is this change related to the PR objective?

The PR is about moving NEXT_PUBLIC_ENVIRONMENT to test Docker images, but this change modifies TypeScript compilation and test execution behavior. Please clarify:

  1. Is this change intentional or a workaround for another issue?
  2. Are there type errors that need to be addressed?
  3. Does the environment variable change affect TypeScript compilation?

Run this script to check for TypeScript errors:


🏁 Script executed:

#!/bin/bash
# Check for TypeScript compilation errors in the frontend

cd frontend && npx tsc --noEmit 2>&1 | head -50

Length of output: 626


I need to gather more information to verify this change. Let me check the TypeScript installation and the broader context of the PR changes.


🏁 Script executed:

#!/bin/bash
# Check if TypeScript is installed and what version
cd frontend
if [ -f package.json ]; then
  echo "=== TypeScript in dependencies ==="
  cat package.json | jq '.dependencies.typescript // .devDependencies.typescript // "not found"'
  echo ""
fi

# Try running tsc from node_modules
echo "=== Running TypeScript compiler ==="
if [ -f node_modules/.bin/tsc ]; then
  ./node_modules/.bin/tsc --noEmit 2>&1 | head -100
else
  echo "TypeScript not installed in node_modules"
fi

Length of output: 121


🏁 Script executed:

#!/bin/bash
# Check the git diff for this specific file to see the full change
echo "=== Git diff for frontend/package.json ==="
git diff HEAD~1 HEAD -- frontend/package.json 2>/dev/null || git diff --cached -- frontend/package.json 2>/dev/null || echo "Could not retrieve git diff"

Length of output: 597


🏁 Script executed:

#!/bin/bash
# Look for PR description or commit messages
echo "=== Recent commit messages ==="
git log --oneline -5 2>/dev/null || echo "Git log unavailable"

echo ""
echo "=== Check for environment variable usage ==="
cd frontend
rg -n "NEXT_PUBLIC_ENVIRONMENT" --type=json --type=js --type=ts -g '!node_modules' -C2 | head -50

Length of output: 365


},
"dependencies": {
"@apollo/client": "^3.14.0",
Expand Down
Loading