Sha256: afa98cc2e8f2fb26d6fc7ee38b8c5c06e5220dcd76aac428ee8c4de37db55c0e
Contents?: true
Size: 809 Bytes
Versions: 24
Compression:
Stored size: 809 Bytes
Contents
require 'spec_helper' feature 'Shopping' do scenario 'buying a product' do visit '/' expect(page).to have_content('Cart ($0.00)') add_product_to_cart expect(page).to have_content('Cart ($10.00)') click_button 'Checkout' expect(page).to have_content('Cart ($0.00)') end scenario 'updating a cart' do add_product_to_cart fill_in 'item_1_qty', :with => 3 click_button 'Update' expect(page).to have_content('Cart ($30.00)') end scenario 'removing a product' do add_product_to_cart fill_in 'item_1_qty', :with => 0 click_button 'Update' expect(page).to have_content('Cart ($0.00)') expect(page).to have_content('Your cart is empty') end def add_product_to_cart visit '/product/my-product' click_button 'Add to Cart' end end
Version data entries
24 entries across 24 versions & 1 rubygems