Sha256: e2424da48876b3756feeca6c7905b54fe5656da4fbd362979165d0fe5715c9d4

Contents?: true

Size: 1.12 KB

Versions: 8

Compression:

Stored size: 1.12 KB

Contents

Given /^I am viewing "([^"]*)"$/ do |url|
  visit("#{url}?_event_error=false")
end

When /^I refresh the page$/ do
  visit(current_path)
end

Then /^I should (not )?see "([^"]*)"$/ do |negative, text|
  unless negative
    page.should have_content(text)
  else
    page.should_not have_content(text)
  end
end

When /^I click "([^"]*)"$/ do |text|
  click_on(text)
end

When /^I fill in the "([^"]*)" field with "([^"]*)"( and I change focus)?$/ do |field, value, change_focus|
  fill_in(field, :with => value)
  if change_focus
    find('body').click
  end
end

Then /^the "([^\"]*)" field should contain "([^\"]*)"$/ do |field, value|
  field_labeled(field).value.should =~ /#{value}/
end

When /^I (un)?check the "([^"]*)" field$/ do |uncheck, field|
  unless uncheck
    check(field)
  else
    uncheck(field)
  end
end

Then /^the "([^\"]*)" field should be (un)?checked$/ do |field, unchecked|
  unless unchecked
    page.should have_checked_field(field)
  else
    page.should_not have_checked_field(field)
  end
end

Then /^show me the page$/ do
  save_and_open_page
end

When /^I wait (\d+) seconds$/ do |interval|
  sleep(interval.to_f)
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
RubyApp-0.2.7 features/step_definitions/default_steps.rb
RubyApp-0.2.6 features/step_definitions/default_steps.rb
RubyApp-0.2.5 features/step_definitions/default_steps.rb
RubyApp-0.2.4 features/step_definitions/default_steps.rb
RubyApp-0.2.3 features/step_definitions/default_steps.rb
RubyApp-0.2.2 features/step_definitions/default_steps.rb
RubyApp-0.2.1 features/step_definitions/default_steps.rb
RubyApp-0.2.0 features/step_definitions/default_steps.rb