Sha256: 8a0b75d05e5258f65258198b07c65e01fc631d8fc018c69f75abf3b90e2668a5

Contents?: true

Size: 731 Bytes

Versions: 2

Compression:

Stored size: 731 Bytes

Contents

Given /^(\d+) products? exists$/ do |n|
  n.to_i.times{ @product = FactoryGirl.create(:product) }
end

When /^I check (\d+) products in the list$/ do |n|
  Product.limit(n.to_i).pluck(:id).each do |p_id|
    check("batch_action_item_#{p_id}")
  end
end

Then /^I should see confirmation dialog$/ do
  find('#confirmation_dialog').should be_visible
end

When /^I choose batch action "(.*?)"$/ do |action|
  find('.batch_actions .dropdown-toggle').click
  find('.dropdown-menu a', :text => action).click
end

Then /^I should see (\d+) item in the list$/ do |n|
  all('#list tbody tr').count.should == n.to_i
end

Then /^I should see (\d+) published item in the list$/ do |n|
  all('#list .badge-success').count.should == n.to_i
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ab_admin-0.2.3 features/step_definitions/dsl/batch_actions_steps.rb
ab_admin-0.2.2 features/step_definitions/dsl/batch_actions_steps.rb