diff --git a/bin/e2e b/bin/e2e index ba3e31917..4f76578df 100755 --- a/bin/e2e +++ b/bin/e2e @@ -16,12 +16,17 @@ fi printf "\n" -read -p "Do you need to set up your end to end (E2E) testing database? Answer yes if this is your first time running E2E tests on your local machine or you need to recreate your E2E test database. (y/n) " -n 1 -r +# Wait 10 seconds and if the user does not respond, assume they do not want to rebuild the test E2E database +read -t 10 -p "Choose yes to setup a test database or if you're running the script for the first time, choose no or wait 10 seconds otherwise (y/n) " -n 1 -r if [[ $REPLY =~ ^[Yy]$ ]]; then printf "\n\nSetting up the E2E database before running E2E tests...\n\n" RAILS_ENV=test E2E=true bin/e2e-setup +else + printf "\n\nSkipping database setup...\n\n" fi +printf "Starting the test runner...\n\n" + bundle exec rails assets:precompile; CYPRESS_RAILS_CYPRESS_OPTS="--config-file cypress.dev.json" RAILS_ENV=test E2E=true bundle exec rake cypress:open