Skip to content

ReferenceError: Can't find variable: Turbolinks #75

@xionon

Description

@xionon

This crops up pretty frequently. Tests will randomly fail because Capybara / Poltergeist hasn't waited long enough for Turbolinks to become available.

In my work, sleep(1) seems to fix the problem. Capybara used to implement a method called wait_until, which would have worked perfectly for this, but it was removed. There are several ways to re-implement this behavior, but before I do that, I'll investigate Capybara's API to see if there are any suitable built-in alternatives.

wait_until ideas and implementations:
http://robots.thoughtbot.com/automatically-wait-for-ajax-with-capybara
https://coderwall.com/p/aklybw
https://gist.github.com/jnicklas/d8da686061f0a59ffdf7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions