Skip to content
Merged
Changes from 1 commit
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
21 changes: 11 additions & 10 deletions scripts/test-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,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,13 +118,18 @@ 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
}

# 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

# Main execution
if [ "$LOCAL_MODE" = true ]; then
run_local_mode
Copy link
Member

Choose a reason for hiding this comment

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

style: what do you think about moving all these flags before the function defs? imo its easier to follow

Copy link
Member Author

Choose a reason for hiding this comment

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

@wrn14897 good idea, updated!

Expand Down
Loading