Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control capybara headless mode for testing via environment variable #9545

Conversation

Philwi
Copy link

@Philwi Philwi commented Aug 9, 2022

What? Why?

For developer convenience I want to run the headfull capybara mode without changing the configuration file all the time. I just want to control it with an environment variable to turn it on if I need to see what happens inside the browser.

What should we test?

  • It is only for the test environment
  • run HEADLESS=false bundle exec rails rspec spec/system/**
  • browser will open and executing the system tests

Release notes

Changelog Category: Technical changes

The title of the pull request will be included in the release notes.

Dependencies

Documentation updates

@jibees
Copy link
Contributor

jibees commented Aug 10, 2022

I've tested, and it's working!

  • HEADLESS=true bundle exec rspec spec/system/admin/enterprise_groups_spec.rb:27 run the spec in the headless mode (ie. doesn't trigger any browser window)
  • HEADLESS=false bundle exec rspec spec/system/admin/enterprise_groups_spec.rb:27 run the spec with head mode (ie. does trigger the default (?) browser window)

Merging! 🎉

Thanks! 🙏

@jibees jibees merged commit 43b29af into openfoodfoundation:master Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants