Skip to content
Merged
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
23 changes: 13 additions & 10 deletions scripts/test-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ while [[ $# -gt 0 ]]; do
esac
done


# Build additional flags
ADDITIONAL_FLAGS=""
if [ -n "$TAGS" ]; then
ADDITIONAL_FLAGS="--grep $TAGS"
fi
if [ "$UI_MODE" = true ]; then
ADDITIONAL_FLAGS="$ADDITIONAL_FLAGS --ui"
fi


cleanup_mongodb() {
echo "Stopping MongoDB..."
docker compose -p e2e -f "$DOCKER_COMPOSE_FILE" down -v
Expand Down Expand Up @@ -98,11 +109,7 @@ wait_for_mongodb() {
run_local_mode() {
echo "Running E2E tests in local mode (frontend only)..."
cd "$REPO_ROOT/packages/app"
if [ -n "$TAGS" ]; then
yarn test:e2e --local --grep "$TAGS" ${UI_MODE:+--ui}
else
yarn test:e2e --local ${UI_MODE:+--ui}
fi
yarn test:e2e --local $ADDITIONAL_FLAGS
}

run_fullstack_mode() {
Expand All @@ -122,11 +129,7 @@ run_fullstack_mode() {

# Run tests in full-stack mode (default for yarn test:e2e)
cd "$REPO_ROOT/packages/app"
if [ -n "$TAGS" ]; then
yarn test:e2e --grep "$TAGS" ${UI_MODE:+--ui}
else
yarn test:e2e ${UI_MODE:+--ui}
fi
yarn test:e2e $ADDITIONAL_FLAGS
}

# Main execution
Expand Down
Loading