Skip to content
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.

Error pause('with message'). Missing method page.evaluate_ruby() #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blahutka
Copy link

I'm not sure how to test this :)

@catmando
Copy link
Contributor

@blahutka thanks for your PR... we are are putting together our next release, and will include your PR in that! Great job

As far as testing goes... its kind of tricky. You have to using on_client do ... in the spec to modify the JS console log method so that it saves the output some place... then you scan to see if that output arrived.

roughly like this:

....
  on_client do
    message = []
    %x{
      console.log = function(msg) { #{buffer << `msg`} }
    }
  end
  ...
  expect_evaluate_ruby('message').to contain('...your string ')

That is really rough and all from memory. not sure if its expect_ruby or expect_evaluate_ruby
also not sure if writing to a "global" buffer like that will work... might have to create a module to hold it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants