development icon indicating copy to clipboard operation
development copied to clipboard

Executing feature specs non-headless

Open hupf opened this issue 4 years ago • 2 comments

To debug or write feature specs, it is absolutely necessary to execute them in a non-headless browser. Generally, to do this, the HEADLESS=false environment variable can be set. With the current container setup it is not possible to execute the features specs in this mode – a solution has to be engineered and documented.

Work around:

  • Start database/rails server with Docker Compose.
  • On the local machine (not within a container!), from the core directory app/hitobito, use the following command to execute one or more feature specs in non-headless mode (Ruby/Bundler must be available, Gems installed):
RAILS_HOST_NAME=localhost:3000 RAILS_DB_ADAPTER=mysql2 RAILS_DB_HOST=127.0.0.1 RAILS_DB_PORT=33066 RAILS_DB_USERNAME=root RAILS_DB_PASSWORD=hitobito RAILS_DB_NAME=hitobito_test HEADLESS=false bundle exec rspec --tag type:feature spec/features/

See also #7

hupf avatar Aug 25 '20 13:08 hupf