Sha256: 5f46331ae72a498c556433f4af3c4b04a1429b2f223ec9fc6eff03bd30cc3129

Contents?: true

Size: 560 Bytes

Versions: 3

Compression:

Stored size: 560 Bytes

Contents

require 'page_navigation'

module Furter
  module Navigation
    include PageNavigation, Frank::Cucumber::FrankHelper

    def wait_a_bit_for_animations
      begin
        wait_for_nothing_to_be_animating 3
      rescue
      end
    end

    def on(cls, &block)
      screen = cls.new
      wait_a_bit_for_animations
      wait_until(:message => "Expected #{cls} to be active", :timeout => 30) do
        screen.active?
      end if screen.respond_to?(:active?)
      wait_a_bit_for_animations
      block.call screen if block
      screen
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
furter-0.0.3.3 lib/furter/navigation.rb
furter-0.0.3.2 lib/furter/navigation.rb
furter-0.0.3.1 lib/furter/navigation.rb