Sha256: d917a212bbfa23c58d5ac1e305e4ec687f16daa25a5dae7f750caed511216718

Contents?: true

Size: 920 Bytes

Versions: 14

Compression:

Stored size: 920 Bytes

Contents

#*****************
#   GIVEN steps
#-----------------
Given /^(?:|I )(?:go to|am on) the posts page$/ do
  visit posts_path
end

Given /^(?:|I )am on the Edit Post page$/ do
  @post.should_not be_nil
  visit posts_path + "#edit/#{@post.id}"
end

Given /^(?:|I )am on the New Post page$/ do
  visit posts_path + '#new'
end


#*****************
#   WHEN steps
#-----------------
When /^(?:|I )confirm the popup dialog$/ do
  if Capybara.javascript_driver == :selenium
    page.driver.browser.switch_to.alert.accept
  else
    page.execute_script 'window.confirm = function() { return true }'
  end
end

When /^(?:|I )navigate to Edit Post$/ do
  post = page.find('#posts table tr', text: 'This is a Test Post')

  post.click_link 'Edit'
end

When /^(?:|I )navigate to New Post$/ do
  click_link 'New Post'
end


#*****************
#   THEN steps
#-----------------
#Then /^show me the page$/ do
#  save_and_open_page
#end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
crowdblog-0.0.16 features/step_definitions/navigation_steps.rb
crowdblog-0.0.15 features/step_definitions/navigation_steps.rb
crowdblog-0.0.14 features/step_definitions/navigation_steps.rb
crowdblog-0.0.13 features/step_definitions/navigation_steps.rb
crowdblog-0.0.12 features/step_definitions/navigation_steps.rb
crowdblog-0.0.10 features/step_definitions/navigation_steps.rb
crowdblog-0.0.9 features/step_definitions/navigation_steps.rb
crowdblog-0.0.8 features/step_definitions/navigation_steps.rb
crowdblog-0.0.7 features/step_definitions/navigation_steps.rb
crowdblog-0.0.6 features/step_definitions/navigation_steps.rb
crowdblog-0.0.5 features/step_definitions/navigation_steps.rb
crowdblog-0.0.4 features/step_definitions/navigation_steps.rb
crowdblog-0.0.3 features/step_definitions/navigation_steps.rb
crowdblog-0.0.2 features/step_definitions/navigation_steps.rb