search fire star recently

lucky_flow

Automated browser tests similar to Capybara

0.6.0 Latest release released
luckyframework/lucky_flow
38 9 17

LuckyFlow

LuckyFlow is a library for testing user flows in the browser. It is similar to Ruby's Capybara.

LuckyFlow example

Installation in Lucky projects

LuckyFlow is already installed and configured. Check out the guides to see how to use it: https://luckyframework.org/guides/browser-tests/

Installation in other Crystal projects

Add this to your application's shard.yml:

development_dependencies:
  lucky_flow:
    github: luckyframework/lucky_flow

Configure LuckyFlow in spec/spec_helper.cr:

require "lucky_flow"

LuckyFlow.configure do
  # This is required
  settings.base_uri = "http://localhost:<port>"

  # Optional settings. Defaults are shown here
  settings.retry_delay = 10.milliseconds
  settings.stop_retrying_after = 1.second
  settings.screenshot_directory = "./tmp/screenshots"
  settings.browser_binary = "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
end

# Put this at the bottom of the file.
# If a required setting is missing, this will catch it.
Habitat.raise_if_missing_settings!

Then view the guides: https://luckyframework.org/guides/browser-tests/

You should be ready to go!

Usage

Note that you can only pass string paths to visit since only Lucky has route helpers described in the guide below. Example: visit "/my-path"

View guide at: https://luckyframework.org/guides/browser-tests/

Contributing

  1. Fork it ( https://github.com/luckyframework/lucky_flow/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Install docker and docker-compose: https://docs.docker.com/compose/install/
  4. Run bin/setup
  5. Make your changes
  6. Run bin/test to run the specs, build shards, and check formatting
  7. Commit your changes (git commit -am 'Add some feature')
  8. Push to the branch (git push origin my-new-feature)
  9. Create a new Pull Request

Contributors

lucky_flow:
  github: luckyframework/lucky_flow
  version: ~> 0.6.0

Authors

  • Paul Smith

License

MIT

Crystal

0.31.1

Dependencies 2

  • selenium bda2fd406c1a118251c5a2883f1e1f3af242116e
    {'commit' => 'bda2fd406c1a118251c5a2883f1e1f3af242116e', 'github' => 'ysbaddaden/selenium-webdriver-crystal'}
  • habitat ~> 0.4.0
    {'github' => 'luckyframework/habitat', 'version' => '~> 0.4.0'}

Development Dependencies 0

Dependents 1

Last synced .