Sha256: 5abb6ffffb990f9188fae1699f3e6f943a27bbb784deed936e99d48a6c309469

Contents?: true

Size: 528 Bytes

Versions: 1

Compression:

Stored size: 528 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
      wait_a_bit_for_animations
      block.call screen if block
      screen
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
furter-0.0.3 lib/furter/navigation.rb