Skip to content

Instantly share code, notes, and snippets.

@underbluewaters
Created November 5, 2012 21:39
Show Gist options
  • Save underbluewaters/4020506 to your computer and use it in GitHub Desktop.
Save underbluewaters/4020506 to your computer and use it in GitHub Desktop.
webspecter -- Trouble getting wait() to accept timeout option
exports.config =
baseUrl: 'http://localhost:3137'
exports.selectors = {}
exports.helpers =
appReady: (done) ->
browser = @browser
ready = () -> browser.evaluate(() -> window.app.initialized)
ready.message = "Timed out waiting for the app to be ready"
wait.until ready, {for: 20000}, done
Homepage Access
1) "before all" hook
✖ 1 of 1 test failed:
1) Homepage Access "before all" hook:
Error: Timeout waiting until: function () {
return fToBind.apply(this instanceof fNOP
? this
: oThis || window,
aArgs.concat(Array.prototype.slice.call(arguments)));
}
at :19
at ../nodify/nodify.js:243
feature "Homepage Access", (context, browser, $) ->
before (done) ->
browser.visit '/#', () ->
wait.until context.appReady, done
it "finds header", ->
$('h1').text.should.contain "SeaSketch Supports Collaborative"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment