The Depot Application

10.1 Iteration E1: Capturing an Order 9.4 Iteration D4: Hide an Empty Cart

9.5 Iteration D5: Degrading If Javascript Is Disabled

Expected at least 1 element matching "#cart[style='display: none']", found 0.

Traceback:
  /home/rubys/git/awdwr/edition3/work-187-23/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb:307:in `assert_select'
  /home/rubys/git/awdwr/edition3/checkdepot.rb:155
edit app/controllers/store_controller.rb
  def add_to_cart
    product = Product.find(params[:id])
    @cart = find_cart
    @current_item = @cart.add_product(product)
    respond_to do |format|
      format.js if request.xhr?
      format.html {redirect_to_index}
    end
  rescue ActiveRecord::RecordNotFound
    logger.error("Attempt to access invalid product #{params[:id]}")
    redirect_to_index("Invalid product")
  end
get /store/empty_cart

ActiveRecord::StatementInvalid in StoreController#empty_cart

Could not find table 'sessions'

RAILS_ROOT: /home/rubys/git/awdwr/edition3/work-187-23/depot

Application Trace | Framework Trace | Full Trace

Request

Parameters:

None

Show session dump

Response

Headers:

{"Content-Type"=>"",
 "Cache-Control"=>"no-cache"}
get /store/add_to_cart/3

ActiveRecord::StatementInvalid in StoreController#add_to_cart

Could not find table 'products'

RAILS_ROOT: /home/rubys/git/awdwr/edition3/work-187-23/depot

Application Trace | Framework Trace | Full Trace

Request

Parameters:

{"id"=>"3"}

Show session dump

Response

Headers:

{"Content-Type"=>"",
 "Cache-Control"=>"no-cache"}

10.1 Iteration E1: Capturing an Order 9.4 Iteration D4: Hide an Empty Cart