mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-25 01:51:37 -04:00
* Fixed Type errors * Organizing testing utilities * Added Database checks to the onboarding flow * Updated Onboarding flow Changed type ChildrenExpectation so that it can be used for database verification * Added compatibility page setup Added more compatibility questions * Fix * . * Fix: Typo * Fix: Faker usernames can no longer generate symbols * Fix: Changed how work area is verified * . * . * Fix: Trying to work in headed mode * Fix: Change back to headless * Fix: Added timeout after workArea selection * . * Clean e2e * Improve E2E setup * Prettier * Log * Fix: should pull test account from unique identifier like email, username or id; not the display name * Source env vars in playwright directly * Clean e2e data * Clean test account id to be the same for email and username * Fix import warning * Add error handling * Add log * Temp remove env load * Update * Add logs and safeguards against using remote supabase during e2e tests * Fix playwright report path in C@ * Remove locale log * Check if userInformationFromDb loading with name instead of username was the issue * Remove login log * Check if initial work area names were the issue * Ignore if no files found * Cache Firebase emulators in CI * Reload env vars in playwright * It did not break tests... * Clean verifyWorkArea * Add caching for node modules in CI * Add caching for node modules in CI (2) * Do not raise if emulator not running during db seed * Do not raise if using firebase emulator * Fix supabase cache in CI * Add Cache Playwright browsers in CI * Fix * Test cache * Turn off unused supabase services to speed things up * Back to good one * Set CI=true * api is required for client connection * Add safeguards for missing supabase env vars * Remove echo * Remove supabase cache --------- Co-authored-by: Martin Braquet <martin.braquet@gmail.com>
40 lines
1.3 KiB
Bash
Executable File
40 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# TODO: is the same as run_local_isolated.sh apart from the process cleanup. See if they can be merged.
|
|
# Test services and isolated dev services are the same for now, but they may diverge in the future.
|
|
|
|
set -euo pipefail
|
|
|
|
# Change to project root
|
|
cd "$(dirname "$0")"/..
|
|
|
|
export NEXT_PUBLIC_ISOLATED_ENV=true
|
|
|
|
export $(cat .env.test | grep -v '^#' | xargs)
|
|
|
|
# Ensure Supabase local stack is running; if not, reset/start it
|
|
STATUS_JSON=$(supabase status --output json 2>/dev/null || echo '')
|
|
API_URL=$(echo "$STATUS_JSON" | jq -r '.API_URL // empty')
|
|
|
|
if [ -z "$API_URL" ]; then
|
|
echo "Supabase is not running. Bootstrapping local stack with: yarn test:db:reset"
|
|
yarn test:db:reset
|
|
STATUS_JSON=$(supabase status --output json)
|
|
fi
|
|
|
|
export NEXT_PUBLIC_SUPABASE_URL=$(echo "$STATUS_JSON" | jq -r '.API_URL')
|
|
export NEXT_PUBLIC_SUPABASE_ANON_KEY=$(echo "$STATUS_JSON" | jq -r '.ANON_KEY')
|
|
export DATABASE_URL=$(echo "$STATUS_JSON" | jq -r '.DB_URL')
|
|
|
|
for var in NEXT_PUBLIC_SUPABASE_URL NEXT_PUBLIC_SUPABASE_ANON_KEY DATABASE_URL; do
|
|
if [ -z "${!var}" ] || [ "${!var}" = "null" ]; then
|
|
echo "Error: $var is not set or null" >&2
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
# Build backend (required?)
|
|
./scripts/build_api.sh
|
|
|
|
concurrently --names 'firebase,api,web' 'yarn emulate' 'yarn --cwd=backend/api dev' 'yarn --cwd=web dev'
|