Sha256: 07573fcaab0f5b171bc07d7528f3f3e2aa6599669434a707e4dd38546b9b2682

Contents?: true

Size: 1.07 KB

Versions: 27

Compression:

Stored size: 1.07 KB

Contents

# encoding: utf-8

# Roles:
#   - user (general user)
#   - admin (authenticated user)
#   - customer ()
#   - guest ()

# request
# use it just for /admin, /login and /
# in other cases use "click to"
# THIS CONFLICT WITH SOME STUFF IN EXCEPTIONS FEATURE
#When /^\w+ goes to (.+)$/ do |uri|
#  @response = request(uri)
#end

# Commonly used webrat steps
# http://github.com/brynary/webrat
When /^(\w+) goes to "(.+)"$/ do |user, path|
  @response = visit(path)
end

When /^I press "(.*)"$/ do |button|
  click_button(button)
end

# "user click to" or "admin click to"
When /^\w+ click to "(.*)"$/ do |link|
  @response = click_link(link)
end

When /^I fill in "(.*)" with "(.*)"$/ do |field, value|
  fill_in(field, with: value)
end

When /^I select "(.*)" from "(.*)"$/ do |value, field|
  select(value, from: field)
end

When /^I check "(.*)"$/ do |field|
  check(field)
end

When /^I uncheck "(.*)"$/ do |field|
  uncheck(field)
end

When /^I choose "(.*)"$/ do |field|
  choose(field)
end

When /^I attach the file at "(.*)" to "(.*)" $/ do |path, field|
  attach_file(field, path)
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rango-0.2.6 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.2.5.1 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.2.4.1 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.2.3 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.2.1 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.2.1.pre lib/rango/support/cucumber/steps/when_steps.rb
rango-0.2 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.1.1.3 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.1.1.2.11 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.1.1.2.10 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.1.1.2.9 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.1.1.2.8 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.1.1.2.7 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.1.1.2.6 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.1.1.2.5 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.1.1.2.4 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.1.1.2.3 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.1.1.2.2 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.1.1.2.1 lib/rango/support/cucumber/steps/when_steps.rb
rango-0.2.pre lib/rango/support/cucumber/steps/when_steps.rb