Make supplier product category spec work
This commit is contained in:
@@ -32,3 +32,20 @@ step "the supplier clicks on the edit product category button" do
|
||||
find('.edit-resource-button').click
|
||||
end
|
||||
end
|
||||
|
||||
step "the supplier unchecks the first product and checks the last product" do
|
||||
find("#product-checker-#{@products.first.id}").set false
|
||||
find("#product-checker-#{@products.last.id}").set true
|
||||
end
|
||||
|
||||
step "the supplier clicks on the tuesday and wednesday buttons selecting wednesday as active day" do
|
||||
find('[data-day="tuesday"]').click
|
||||
find('[data-day="wednesday"]').click
|
||||
end
|
||||
|
||||
step "the the product category is active on wednesday and only linked to the last product" do
|
||||
sleep 1
|
||||
@product_category.reload
|
||||
@product_category.week_days.should == [0, 0, 0, 1, 0, 0, 0]
|
||||
@product_category.product_ids.should == [@products.last.id]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user