Module: Furter::Navigation

Includes:
Frank::Cucumber::FrankHelper, PageNavigation
Defined in:
lib/furter/navigation.rb

Instance Method Summary collapse

Instance Method Details

#on(cls, &block) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/furter/navigation.rb', line 14

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

#wait_a_bit_for_animationsObject



7
8
9
10
11
12
# File 'lib/furter/navigation.rb', line 7

def wait_a_bit_for_animations
  begin
    wait_for_nothing_to_be_animating 3
  rescue
  end
end