Sha256: fb8785edd9b9c48747413e44c1f0fadc9cdc5efe274b871343fb5886276176f2

Contents?: true

Size: 761 Bytes

Versions: 6

Compression:

Stored size: 761 Bytes

Contents

When /^I select "([^"]+)" as the datepicker's (\w+)$/ do |selection, type|
  page.find(".ui-datepicker-#{type}").select(selection)
end

When /^I click the first date field$/ do
  first(:css, "input.date[type='text']").click
end

Then /^the first date field should contain "(.*?)"$/ do |value|
  field_value = first(:css, "input.date[type='text']").value
  if field_value.respond_to? :should
    field_value.should =~ /#{value}/
  else
    assert_match(/#{value}/, field_value)
  end
end

Then /^the first date field should not contain "(.*?)"$/ do |value|
  field_value = first(:css, "input.date[type='text']").value
  if field_value.respond_to? :should_not
    field_value.should_not =~ /#{value}/
  else
    assert_no_match(/#{value}/, field_value)
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
affectiva-surveyor-1.5.0.pre.disco.2 features/step_definitions/ui_steps.rb
hssc_surveyor-1.4.3.pre features/step_definitions/ui_steps.rb
hssc_surveyor-1.4.2.pre features/step_definitions/ui_steps.rb
hssc_surveyor-1.4.1.pre features/step_definitions/ui_steps.rb
surveyor-1.4.0 features/step_definitions/ui_steps.rb
surveyor-1.3.0 features/step_definitions/ui_steps.rb