Add spec for "continue shopping" from cart

https://github.com/openfoodfoundation/openfoodnetwork/issues/4771
This commit is contained in:
Maikel Linke
2020-02-07 15:49:26 +11:00
parent ffbb5934d7
commit 5b942e6933

View File

@@ -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