Capybara will match elements outside of a page's tag. For example, the step definitions below match nodes in a...

Our collection of the most useful Cucumber steps, Spreewald, now supports exact matching of form fields and lets you use...

Code splitting is a feature of esbuild that can keep huge libraries out of the main bundle. How code splitting...

progfu.com

I am talking about development speed. When your application starts growing and you start adding gems, it starts to take...

The step definition below lets you say: Then I should see a field "Password" But I should not see a...

This is surprisingly difficult when there is a with the same text on the page, but you really want to...

The step definition below allows you to write: Then I should see a link labeled "Foo" But I should not...

Use bundler > 1.15 to fix Gem::LOADED_SPECS_MUTEX (NameError). Given the following project: ruby -v ruby 1.8.7

opensoul.org

Great presentation about writing Javascript like you write everything else: Well-structured and tested. JavaScript is no longer a toy language. Many of our applications can’t function without it...

...and love work just as well in JavaScript as they do any other language. Test driven development forces us to write modular, decoupled code...

makandra Operations

Sending a testmail from a server with a configured exim is easy as pie. From your usershell: tell exim that we want to send a mail to an recipient and...

The step definitions below allow you to write this in both Webrat and Capybara: When I follow "Download as PDF...

github.com

capybara-lockstep can help you with flaky end-to-end tests: This Ruby gem synchronizes Capybara commands with client-side JavaScript and AJAX requests. This greatly improves the stability of...

...a full-stack integration test suite, even if that suite has timing issues...

Don't simply test for the presence of the magic Paperclip attribute, it will return a paperclip Attachment object and thus always be true: - if user.photo.present? # always true

Reading user input in console applications is usually done using Kernel#gets. Stubbing that can be a bit hairy.

...seems to forget cookies / sessions when you run it with Selenium check if the test travels in time like here: Given the date is 2017-10-20

Spreewald has steps that let you test that e-mails have been sent, using arbitrary conditions in any combination. The attached file is for legacy purposes only...

Here's a pretty useful steps that hasn't made it into Spreewald yet. It is best used with the...

Copy the attached file to features/support. This gets you a convenience method: Capybara.javascript_test? Is true for Selenium, capybara-webkit, Poltergeist and a custom driver called :chrome (which we sometimes...

makandracards.com

Our rcov:all task for aggregated RSpec/Cucumber coverage was overhauled extensively. Among other things it now works for Rails 2...

makandra dev

Have you ever mistaken one Rails environment for another? The attached helper will help you to never do it again...

Insomnia is a GUI tool to help you communicating with an API. There are also other tools to do this...

justinfrench.com

If you’re testing the behavior of deprecated code in your Ruby project, the warning messages littered throughout your spec output is incredibly noisy. You could silence all warnings with...

...an important warning in one of your dependencies. It’s tempting to remove the tests altogether (the code will be burned soon too, right?), but I figured out something a...

...a MIT-based polyfill called Hyphenopoly. It applies JS-based hyphenation if a feature test shows that CSS based hyphenation is not supported for the given locale. Note that Hyphenopoly...

...can no longer search for the full word in the pasted text. Note that test browsers will also see the soft hyphens, which makes testing uncomfortable. Automatic insertion of soft...

Here is an example with the --tags option. You need to wrap them inside --cucumber-options option of parallel_cucumber...