Sha256: ebcf8336ecf3138050b5e9f69131f90ea547fb11b2325ffb12240e94b62cd3a7

Contents?: true

Size: 462 Bytes

Versions: 2

Compression:

Stored size: 462 Bytes

Contents

require 'ruby-debug'

Then /^the HTML tab (should say|says) "([^"]*)"$/ do |_, needle|
  limit = 5
  contents = nil
  started = false
  
  thread = Thread.new do
    started = true
    start = Time.now
    contents = get_browser_contents
    while !contents.match(needle) && Time.now - start < limit
      contents = get_browser_contents
      sleep 0.1
    end    
  end

  Redcar.gui.yield_until { started && !thread.alive? }
  contents.should match needle
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
redcar-0.4.1 plugins/html_view/features/step_definitions/html_view_steps.rb
redcar-0.4 plugins/html_view/features/step_definitions/html_view_steps.rb