Sha256: b1283c6c4e876c0d27b66fc43ae956a4675ab3cd82913c0b2f82c23dfb6384b7

Contents?: true

Size: 805 Bytes

Versions: 5

Compression:

Stored size: 805 Bytes

Contents

require 'spec_helper'

describe 'menus' do
  Given(:main_form) { start_app }

  context 'by text' do
    When { main_form.menu_item_by_text }
    Then { on(About).active? }
  end

  context 'by path' do
    When { main_form.menu_item_by_path }
    Then { on(About).active? }
  end

  context '#click_menu_item' do
    When { main_form.click_menu_item_by_path }
    Then { on(About).active? }
  end

  context 'waiting for' do
    Given { Mohawk.timeout = 2 }

    When(:non_existent_menu) { main_form.non_existent_menu }
    When(:click_non_existent_menu) { main_form.click_non_existent_menu }

    Then { expect(non_existent_menu).to have_failed(Mohawk::Waiter::WaitTimeout) }
    Then { expect(click_non_existent_menu).to have_failed(Mohawk::Waiter::WaitTimeout) }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mohawk-1.0 spec/lib/mohawk/menu_spec.rb
mohawk-0.4.4 spec/lib/mohawk/menu_spec.rb
mohawk-0.4.3 spec/lib/mohawk/menu_spec.rb
mohawk-0.4.2 spec/lib/mohawk/menu_spec.rb
mohawk-0.4.1 spec/lib/mohawk/menu_spec.rb