About Capybara.default_wait_time

According to api document

find will wait for a set amount of time and continuously retry finding the element until either the element is found or the time expires. The length of time find will wait is controlled through Capybara.default_wait_time and defaults to 2 seconds.

ATTENTION

You had better not set much time to Capybara_default_wait_time.

For example, if you set 10 seconds to Capybara.default_wait_time when you want to check the element dose not exist. Test time can be long. Because Capybara wait to check the element dose not exist in each test.

# in rspec.rb
Capybara.default_wait_time = 10

# in feature test
expect(page).to have_no_selector(:css, "p a#doesnotexist") # wait 10 seconds

Solution

If you need more than 2 seconds(default value in Capybara.default_wait_time) to wait to check you can set wait option to find instead.

expect(page).to have_selector(:css, "p a#doesnotexist", wait: 3)

add ticket number to git commit automatically

Most of ticket tracker like Github, pivotal tracker have function to connect your commit to ticket(story).But every time when you commit ...… Continue reading

I will build frontend and backend separately

Published on September 28, 2016

order of angular controller's initialisation

Published on October 05, 2015