Hi, everyone!
if someone will have issue with hanging browser on steps like
visit "http://localhost/#/posts/new"
You can replace this steps with the next following code and it works for me in capybara-webkit 0.8.0
def visit_script url
page.execute_script("window.location = '#{url}'")
end
Some days ago I’ve got task to test our offline application with cucumber scenarios.
It was very difficult to do it because in our project we are using capybara-webkit and unfortunately it doesn’t support html5 a lot of features in this webkit server implementation. After digging into forks of capybara-webkit I found one fork with html5 support features via custom ‘set_attribute’ for browser:
page.driver.browser.set_attribute("LocalStorageEnabled", true)
I’ve made merge with master of capybara-webkit in my own fork and then we’ve started to use this fork. But then I found another problem connecting with routing through the application using backbone routers concept with ‘#’ in the routes.
It looks like:
http://localhost/#/posts http://localhost/#/posts/new
When I tried to visit this links webkit_server was always hanging without throwing messages by timeout. It makes me upset and I’ve decided to replace capybara-webkit driver at all.
I am trying to use poltergeist
Continue…
Hi, everyone!
Not far a long time I’ve started to work with Rails 3. In one my user story I should add subdomains to my application something like gmail account domains. And create relations for resources by account. I’ve added simple account model with friendly_id gem for creating slugs and column name. We had a lot of tests are written using cucumber and rspec. Rspec worked great with small changes in app controller and url helper but cucumber blow my head. For anyway if someone will have same issues(request timeout, ‘subdomain.’ invalid url and so on) with cucumber you can see sample subdomain application https://github.com/oivoodoo/rails3-subdomain-example .