Sha256: 2eafae099c4185709c4ff8c276dac7df9234e2935a1a4ad2a4ca6ce619bad85f

Contents?: true

Size: 526 Bytes

Versions: 169

Compression:

Stored size: 526 Bytes

Contents

RSpec::Matchers.define :be_clickable do
  match do |tab_text|
    clickable_tab = page.all('.tabs li a', :text => tab_text)
    clickable_subtab = page.all('.subtabs li a', :text => tab_text)
    !clickable_tab.empty? || !clickable_subtab.empty?
  end

  failure_message_for_should do |actual|
    "expected that a tab or subtab with the text '#{tab_text}' would be clickable"
  end

  failure_message_for_should_not do |actual|
    "expected that a tab or subtab with the text '#{tab_text}' would not be clickable"
  end
end

Version data entries

169 entries across 6 versions & 1 rubygems

Version Path
tabulous-2.1.2 spec/applications/multiple_tabsets/rails_4-0-5/spec/support/should_be_clickable.rb
tabulous-2.1.2 spec/applications/multiple_tabsets/rails_4-1-1/spec/support/should_be_clickable.rb
tabulous-2.1.2 spec/applications/multiple_tabsets/rails_4-2-0/spec/support/should_be_clickable.rb
tabulous-2.1.2 spec/applications/simple_tabs/rails_3-0-20/spec/support/should_be_clickable.rb
tabulous-2.1.2 spec/applications/simple_tabs/rails_3-1-12/spec/support/should_be_clickable.rb
tabulous-2.1.2 spec/applications/simple_tabs/rails_3-2-13/spec/support/should_be_clickable.rb
tabulous-2.1.2 spec/applications/simple_tabs/rails_4-0-5/spec/support/should_be_clickable.rb
tabulous-2.1.2 spec/applications/simple_tabs/rails_4-1-1/spec/support/should_be_clickable.rb
tabulous-2.1.2 spec/applications/simple_tabs/rails_4-2-0/spec/support/should_be_clickable.rb
tabulous-2.1.2 spec/applications/subtabs/rails_3-0-20/spec/support/should_be_clickable.rb
tabulous-2.1.2 spec/applications/subtabs/rails_3-1-12/spec/support/should_be_clickable.rb
tabulous-2.1.2 spec/applications/subtabs/rails_3-2-13/spec/support/should_be_clickable.rb
tabulous-2.1.2 spec/applications/subtabs/rails_4-1-1/spec/support/should_be_clickable.rb
tabulous-2.1.2 spec/applications/subtabs/rails_4-2-0/spec/support/should_be_clickable.rb
tabulous-2.1.2 spec/applications/universal/spec/support/should_be_clickable.rb
tabulous-2.1.1 spec/applications/bootstrap/rails_3-2-13/spec/support/should_be_clickable.rb
tabulous-2.1.1 spec/applications/universal/spec/support/should_be_clickable.rb
tabulous-2.1.1 spec/applications/subtabs/rails_4-1-1/spec/support/should_be_clickable.rb
tabulous-2.1.1 spec/applications/subtabs/rails_4-0-5/spec/support/should_be_clickable.rb
tabulous-2.1.1 spec/applications/subtabs/rails_3-2-13/spec/support/should_be_clickable.rb