Sha256: 772b4b4751d0c91a2c0bbafb8171e74e917de5fa81733d5e85b34525fa29bef0

Contents?: true

Size: 925 Bytes

Versions: 5

Compression:

Stored size: 925 Bytes

Contents

Then /^the form should have inline error messages$/ do
  page.should have_css(".error")
end

When /^the "([^"]*)" field should have autocomplete off$/ do |field|
  field = page.find_field(field)
  field["autocomplete"].should == "off"
end

Then /^"([^"]*)" should have the error "([^"]*)"$/ do |field, error|
  field = page.find_field(field)
  field.find(:xpath, "following-sibling::p[@class='inline-errors'][contains(text(), '#{error}')]").should_not be_nil
end

Then /^the "([^"]*)" field(?: within "([^"]*)")? should be empty$/ do |field, selector|
  with_scope(selector) do
    field = find_field(field)
    field_value = (field.tag_name == 'textarea') ? field.text : field.value
    if field_value.respond_to? :should
      field_value.should be_nil
    else
      assert_nil(field_value)
    end
  end
end

Then /^I there should be a link to the help site$/ do
  page.should have_css("a[href*='help.example.com']")
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
saucy-0.2.5 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.2.4.1 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.2.4 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.2.3 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.2.2 lib/generators/saucy/features/templates/step_definitions/html_steps.rb