[15 minute fix] Added a timeout before continuing if a dev does not respond to rebuild the E2E DB (#13461)
This commit is contained in:
parent
14d98fc590
commit
8016a33dd2
1 changed files with 6 additions and 1 deletions
7
bin/e2e
7
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue