Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode/
.pnpm-store/

.env
2 changes: 1 addition & 1 deletion docs/run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_DIR=$(dirname "$(realpath "$0")")

docker container run --rm \
-p 8080:8080 \
Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/tests_omni_full/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig, devices } from "@playwright/test";

export default defineConfig({
testDir: ".",
testMatch: "*.spec.ts",
testMatch: "src/*.spec.ts",
timeout: 60000,
fullyParallel: false,
forbidOnly: !!process.env.CI,
Expand Down
5 changes: 2 additions & 3 deletions e2e_tests/tests_omni_full/scripts/run-aimock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ FIXTURES_FILE="$SCRIPT_DIR/../src/aimock-fixtures.json"

docker container run --rm --pull always \
-p 4010:4010 \
-v "$FIXTURES_FILE:/fixtures/aimock-fixtures.json:ro" \
ghcr.io/copilotkit/aimock:latest \
--fixtures /fixtures/aimock-fixtures.json --host 0.0.0.0
-v "$FIXTURES_FILE:/app/fixtures/aimock-fixtures.json:ro" \
ghcr.io/copilotkit/aimock:latest
2 changes: 1 addition & 1 deletion e2e_tests/tests_omni_full/scripts/run-backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ export OIDC_POST_LOGOUT_URI="http://localhost:4173/"
export SESSION_SECRET="e2e-test-session-secret-32-chars!!"
export CORS_ORIGINS="http://localhost:4173"

exec uv run uvicorn modai.main:app
uv run uvicorn modai.main:app
2 changes: 1 addition & 1 deletion e2e_tests/tests_omni_full/scripts/run-dice-roller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ DICE_ROLLER_DIR="$ROOT_DIR/backend/tools/dice-roller"

cd "$DICE_ROLLER_DIR"

exec uv run uvicorn main:app --port 8001
uv run uvicorn main:app --port 8001
2 changes: 1 addition & 1 deletion e2e_tests/tests_omni_full/scripts/run-frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ export VITE_API_URL="http://localhost:8000"

ln -sf modules_with_backend.json public/modules.json
pnpm build
exec pnpm preview
pnpm preview
2 changes: 1 addition & 1 deletion e2e_tests/tests_omni_light/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig, devices } from "@playwright/test";

export default defineConfig({
testDir: ".",
testMatch: "*.spec.ts",
testMatch: "src/*.spec.ts",
timeout: 30000,
fullyParallel: false,
forbidOnly: !!process.env.CI,
Expand Down
15 changes: 2 additions & 13 deletions e2e_tests/tests_omni_light/scripts/run-aimock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,13 @@
#
# Lifecycle managed by Playwright's webServer config:
# - url: http://localhost:4010/health
#
# WORKAROUND: AIMock's CORS preflight response only allows "Content-Type, Authorization"
# in Access-Control-Allow-Headers. Firefox (unlike Chrome) includes the "user-agent" header
# in preflight requests when the OpenAI SDK sets it, which causes CORS blocks.
# We patch server.js inside the container to use "*" instead.
# Remove this workaround once https://github.com/CopilotKit/aimock/issues/158 is resolved.

set -euo pipefail

SCRIPT_DIR=$(dirname "$(realpath "$0")")
FIXTURES_FILE="$SCRIPT_DIR/../src/aimock-fixtures.json"

docker container rm -f e2e-light-aimock 2>/dev/null || true
docker container run --rm --pull always \
--name e2e-light-aimock \
-p 4010:4010 \
-v "$FIXTURES_FILE:/fixtures/aimock-fixtures.json:ro" \
--entrypoint /bin/sh \
ghcr.io/copilotkit/aimock:latest \
-c 'sed -i "s/\"Access-Control-Allow-Headers\": \"Content-Type, Authorization\"/\"Access-Control-Allow-Headers\": \"*\"/" dist/server.js && \
node dist/cli.js --fixtures /fixtures/aimock-fixtures.json --host 0.0.0.0'
-v "$FIXTURES_FILE:/app/fixtures/aimock-fixtures.json:ro" \
ghcr.io/copilotkit/aimock:latest
2 changes: 1 addition & 1 deletion e2e_tests/tests_omni_light/scripts/run-frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ cp "$LIGHT_TESTS_DIR/fixtures/modules.json" public/modules.json

pnpm install
pnpm build
exec pnpm preview
pnpm preview