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

Version Path
dugway-1.1.0 spec/features/shopping_spec.rb
dugway-1.0.14 spec/features/shopping_spec.rb
dugway-1.0.13 spec/features/shopping_spec.rb
dugway-1.0.12 spec/features/shopping_spec.rb
dugway-1.0.10 spec/features/shopping_spec.rb
dugway-1.0.9 spec/features/shopping_spec.rb
dugway-1.0.8 spec/features/shopping_spec.rb
dugway-1.0.7 spec/features/shopping_spec.rb
dugway-1.0.6 spec/features/shopping_spec.rb
dugway-1.0.5 spec/features/shopping_spec.rb
dugway-1.0.4 spec/features/shopping_spec.rb
dugway-1.0.3 spec/features/shopping_spec.rb
dugway-1.0.2 spec/features/shopping_spec.rb
dugway-1.0.1 spec/features/shopping_spec.rb
dugway-1.0.0 spec/features/shopping_spec.rb
dugway-0.12.3 spec/features/shopping_spec.rb
dugway-0.12.2 spec/features/shopping_spec.rb
dugway-0.12.1 spec/features/shopping_spec.rb
dugway-0.12.0 spec/features/shopping_spec.rb
dugway-0.11.4 spec/features/shopping_spec.rb