In order to save the original value of a constant, set the new value and restore the old value after...

In cucumber you are able to run features in whatever directory you like. This also includes executing features in subdirectories...

Both knapsack and parallel_tests have the option to split groups by historic execution time. The required logs for this...

TLDR: This card explains which threads and processes interact with each other when you run a Selenium test with Capybara...

makandracards.com

In Spreewald 1.10.4+, nested patiently blocks are now patient. Here is an example: patiently do outer_code patiently do

...step is from Uli's excellent card on how to overwrite and reset constants within Cucumber features. By using it, the constant will automatically be reset so your scenario doesn...

These steps are now part of Spreewald. Since Capybara 0.4.1 a within scope will only look at the first element...

The recommended additional setup of the spreewald gem, a useful set of cucumber steps, includes adding a file for defining...

If you want to test that a certain text is contained within the document title of your page, you can...

makandra dev

The Capybara API is somewhat hard for parse for a list of methods you can call on a Capybara node...

For Capybara, use this step: Then /^"([^"]*)" should be a disabled option for "([^"]*)"(?: within "([^\"]*)")?$/ do |value, field, selector| with_scope(selector...

This is now part of geordi. Please don't follow the instructions below, if you use geordi. Inspired by the...

makandra dev

Basic configuration Please keep this config simple. It should be a starting point for new developers learning Git. [user]

Note: The behaviour of Spreewald's within step is as described below for version < 1.9.0; For Spreewald >= 1.9.0 it is...

Download buttons can be difficult to test, especially with Selenium. Depending on browser, user settings and response headers, one of...

Specify these gem versions in your Gemfile: gem 'cucumber', '~> 1.3.0' gem 'cucumber-rails', '= 0.3.2' # max version for Rails 2

web.archive.org

This step tests whether a given select option comes preselected in the HTML. There is another step to test that...

When you are using the #selector_for helper in Cucumber steps, as e.g. Spreewald does, the following snippet will save...

Spreewald comes with a selector_for helper that matches an English term like the user's profile into a CSS...

TLDR: In tests you need to clean out the database before each example. Use :transaction where possible. Use :deletion for...

This note describes a Cucumber step definition that lets you say: Then "Mow lawn" should be an option for "Activity...

makandra dev

The handy method has_select?(field, :selected => text) does not behave as expected with Cucumber 0.10.2, Capybara 0.4.1.2 and Selenium...

Webpack is the future. We're using it in our latest Rails applications. For tests, we want to compile assets...

Add gem 'database_cleaner' to your Gemfile. Then: Cucumber & Rails 3+ # features/support/database_cleaner.rb DatabaseCleaner.clean_with(:deletion) # clean once, now DatabaseCleaner.strategy = :transaction...