add git diffs and permission support

This commit is contained in:
2026-01-19 23:45:03 -05:00
parent 313ac44337
commit 61a2e9b8af
44 changed files with 2051 additions and 267 deletions
+10 -6
View File
@@ -39,31 +39,35 @@ echo -e "${BLUE}=== Starting Spiceflow Test Environment ===${NC}\n"
# Clean up old test database
rm -f "$ROOT_DIR/server/test-e2e.db"
# Use different ports for e2e tests (matching playwright.config.ts)
E2E_BACKEND_PORT=3001
E2E_FRONTEND_PORT=5174
# Start backend with test database
echo -e "${GREEN}Starting backend server with test database...${NC}"
cd "$ROOT_DIR/server"
SPICEFLOW_DB="test-e2e.db" clj -M:run &
SPICEFLOW_DB="test-e2e.db" SPICEFLOW_PORT=$E2E_BACKEND_PORT clj -M:run &
BACKEND_PID=$!
# Wait for backend to be ready
echo -e "${YELLOW}Waiting for backend...${NC}"
until curl -s http://localhost:3000/api/health > /dev/null 2>&1; do
until curl -s http://localhost:$E2E_BACKEND_PORT/api/health > /dev/null 2>&1; do
sleep 1
done
echo -e "${GREEN}Backend ready on http://localhost:3000${NC}"
echo -e "${GREEN}Backend ready on http://localhost:$E2E_BACKEND_PORT${NC}"
# Start frontend
echo -e "${GREEN}Starting frontend server...${NC}"
cd "$ROOT_DIR/client"
npm run dev -- --port 5173 &
VITE_API_URL="http://localhost:$E2E_BACKEND_PORT" npm run dev -- --port $E2E_FRONTEND_PORT &
FRONTEND_PID=$!
# Wait for frontend to be ready
echo -e "${YELLOW}Waiting for frontend...${NC}"
until curl -sk https://localhost:5173 > /dev/null 2>&1; do
until curl -sk https://localhost:$E2E_FRONTEND_PORT > /dev/null 2>&1; do
sleep 1
done
echo -e "${GREEN}Frontend ready on https://localhost:5173${NC}\n"
echo -e "${GREEN}Frontend ready on https://localhost:$E2E_FRONTEND_PORT${NC}\n"
# Run e2e tests
echo -e "${BLUE}=== Running E2E Tests ===${NC}\n"