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.12.2 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.12.1 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.12.0 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.11.5 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.11.3 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.11.2 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.10.7 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.10.6 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saasy-0.0.2.alpha3 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saasy-0.0.2.alpha2 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saasy-0.0.2.alpha1 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.10.5 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.10.4 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.10.3 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.10.2 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.10.1 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.10.0 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.9.1 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.9.0 lib/generators/saucy/features/templates/step_definitions/html_steps.rb
saucy-0.8.5 lib/generators/saucy/features/templates/step_definitions/html_steps.rb