PullMonkey Blog


03 Mar

Capybara does not trigger JS change event with celertiy driver


I've never had so much to write about ... these last few days with cucumber and culerity have been great ...
Just a couple days ago, I was using cucumber and culerity to test some select box interaction and none of my tests were passing but everything I did manually worked as expected.
After tons of digging through the various gems, I found out that only a click event is actually being triggered, no change event.
So this is what I came up with for the step definition -

See improvement?, let me know.


1 Response Filed under: Uncategorized
03 Mar

Rack application timed out during boot – capybara


I've been doing lots and lots of cucumber testing these days. I would get this error every so often and there's really search results for it, so here's what you do -

1) Edit your features/support/env.rb file
2) Add "Capybara.server_boot_timeout = 50" #... the default is 10
3) Save and rerun your tests.


1 Response Filed under: Uncategorized
02 Mar

Cucumber and Pickle – find_latest_model!


I've been working with cucumber, capybara and pickle quite a bit recently and came across a problem.

I wanted to be able to tag a record for later reuse.  The way pickle does this is to use find_model, which gets the very first record and associates this to the tag you use to name the record.

I want to get the latest record, the most recent record and tag that for reuse, there does not seem to be a way to do this currently.

So here is what I did.

Added this to my features/support/pickle.rb:

And can now use this as my step definition:

And now I have a reference I can use later for things like show and edit pages:

Then a product: "test" was just created
And I should be on product: "test"'s page

This has really helped my tests, maybe there is an alternative to having to do this?


2 Responses Filed under: Uncategorized