Sha256: bad9ea33f187d86b163ca1b506b49f0dac84712f56b55ac0fcccd33fa9a88ba2

Contents?: true

Size: 728 Bytes

Versions: 7

Compression:

Stored size: 728 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

7 entries across 7 versions & 1 rubygems

Version Path
ab_admin-0.3.6 features/step_definitions/dsl/batch_actions_steps.rb
ab_admin-0.3.5 features/step_definitions/dsl/batch_actions_steps.rb
ab_admin-0.3.4 features/step_definitions/dsl/batch_actions_steps.rb
ab_admin-0.3.3 features/step_definitions/dsl/batch_actions_steps.rb
ab_admin-0.3.2 features/step_definitions/dsl/batch_actions_steps.rb
ab_admin-0.3.1 features/step_definitions/dsl/batch_actions_steps.rb
ab_admin-0.3.0 features/step_definitions/dsl/batch_actions_steps.rb