mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Add spec for "continue shopping" from cart
https://github.com/openfoodfoundation/openfoodnetwork/issues/4771
This commit is contained in:
@@ -20,6 +20,26 @@ feature "full-page cart", js: true do
|
||||
set_order order
|
||||
end
|
||||
|
||||
describe "continue shopping" do
|
||||
it "shows a button leading back to the shop" do
|
||||
# Set up a shopfront message to test that we are not going to the
|
||||
# home tab.
|
||||
# PENDING: this passes only without home tab!
|
||||
#distributor.preferred_shopfront_message = "Test driven farming"
|
||||
|
||||
add_product_to_cart order, product_with_fee, quantity: 2
|
||||
visit main_app.cart_path
|
||||
|
||||
expect(page).to have_link "Continue shopping"
|
||||
|
||||
click_link "Continue shopping"
|
||||
|
||||
expect(page).to have_no_link "Continue shopping"
|
||||
expect(page).to have_button "Edit your cart"
|
||||
#expect(page).to have_no_content distributor.preferred_shopfront_message
|
||||
end
|
||||
end
|
||||
|
||||
describe "product description" do
|
||||
it "does not link to the product page" do
|
||||
add_product_to_cart order, product_with_fee, quantity: 2
|
||||
|
||||
Reference in New Issue
Block a user