Sha256: 14e76d84e887ed6444e1f9652d45615d6bac102beda1066cf0767cc058abdc32

Contents?: true

Size: 1.05 KB

Versions: 3

Compression:

Stored size: 1.05 KB

Contents

When /^(?:|I )click a "([^"]*)" component slot$/ do |slot_name|
  @_slot_type = slot_name.downcase
  within('ol#slot-list') do
    click_link "#{slot_name} Slot"
  end
end

When /^(?:|I )select the "([^\"]+)" component$/ do |component_name|
  within "#fancybox-inner" do
    select component_name, :from => 'Select the type of component'
  end
end

When /^(?:|I )fill in the following within the component:$/ do |fields|
  within "#fancybox-inner" do
    fields.rows_hash.each do |name, value|
      When %{I fill in "#{name}" with "#{value}"}
    end
  end
end

When /^(?:|I )press "([^\"]*)" within the component$/ do |button|
  within "#fancybox-inner" do
    click_button(button)
  end
end

When /^(?:|I )select an image from the asset library$/ do
  asset = Factory(:asset, :title => "My Image")
  within "#fancybox-inner" do
    page.find(:css, 'span.select-file').click
    # wait until there is an image to click on so that faster machines don't throw errors
    wait_until { page.has_css?("#browser-list li:first", :visible => true) }
    click_link "Add"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
noodall-components-general-content-0.0.5 features/step_definitions/component_steps.rb
noodall-components-general-content-0.0.4 features/step_definitions/component_steps.rb
noodall-components-general-content-0.0.3 features/step_definitions/component_steps.rb