Sha256: dcbf45507c87807941fc99c07ba1dc077dc62b7591becc74624ef77e85f6a9c4

Contents?: true

Size: 691 Bytes

Versions: 49

Compression:

Stored size: 691 Bytes

Contents

module NavigationHarness

  def expect_current_page(title)
    patiently do
      expect(page).to have_css('.up-current', text: title, count: 1)
      expect(page).to have_css('.panel__main', text: title)
      expect(page.title).to eq(title)
    end
  end

end

World(NavigationHarness)

Then(/^I should be able to navigate to "(.*?)"$/) do |title|
  click_link title
  expect(page).to have_css('.up-active', text: title, count: 1)
  expect(page).to_not have_css('.up-active', text: title)
  expect_current_page(title)
end

When /^I go forward$/ do
  page.evaluate_script('window.history.forward()')
end

Then(/^I should see the card "(.*?)"$/) do |title|
  expect_current_page(title)
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
upjs-rails-0.8.0 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.7.8 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.7.7 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.7.6 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.7.5 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.7.4 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.7.3 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.7.2 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.7.1 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.7.0 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.6.5 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.6.4 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.6.3 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.6.2 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.6.1 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.6.0 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.5.0 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.4.4 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.4.3 spec_app/features/step_definitions/navigation_steps.rb
upjs-rails-0.4.2 spec_app/features/step_definitions/navigation_steps.rb