Add the following code to your project's shard.yml under:
to use in production
- OR -
development_dependencies to use in development
LuckyFlow is a library for testing user flows in the browser. It is similar to Ruby's Capybara.
LuckyFlow is already installed and configured. Check out the guides to see how to use it: https://luckyframework.org/guides/browser-tests/
Add this to your application's
development_dependencies: lucky_flow: github: luckyframework/lucky_flow
Configure LuckyFlow in
require "lucky_flow" LuckyFlow.configure do |settings| # 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!
Note that you can only pass string paths to
visitsince only Lucky has route helpers described in the guide below. Example:
View guide at: https://luckyframework.org/guides/browser-tests/
script/testto run the specs, build shards, and check formatting