Sha256: b42201d46b2bb27bf0f4fa8ff6b539300ff6ebcef8a4a5f604294f37f9fea3b5

Contents?: true

Size: 1.44 KB

Versions: 49

Compression:

Stored size: 1.44 KB

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 have nothing in it$/ 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

Then /^"([^"]*)" should not be expanded$/ do |selector|
  page.has_css?("#{selector}")
  page.has_no_css?("#{selector}.expanded")
end

Then /^"([^"]*)" should be expanded/ do |selector|
  page.has_css?("#{selector}")
  page.has_css?("#{selector}.expanded")
end

When %r{^I click "([^"]*)"$} do |selector|
  find(selector).click
end

Then /^the page should (not )?include "([^"]*)"$/ do |should_not_contain, selector|
  if should_not_contain.present?
    page.should have_no_css(selector)
  else
    page.should have_css(selector)
  end
end

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
saucy-0.16.1 features/step_definitions/engine/html_steps.rb
saucy-0.16.0 features/step_definitions/engine/html_steps.rb
saucy-0.15.2 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.15.1 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.15.0 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.14.5 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.14.3 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.10.10 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.14.2 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.14.1 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.14.0 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.13.3 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.13.2 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.10.9 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.10.8 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.13.1 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.13.0 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.12.5 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.12.4 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.12.3 lib/generators/saucy/features/templates/step_definitions/html_steps.rb