broken pipe quest

This commit is contained in:
2014-08-13 15:17:27 +02:00
parent 031e2bedea
commit 3fc7030002
13 changed files with 41 additions and 53 deletions
@@ -1,13 +1,13 @@
step "there is an active list and order" do
@user ||= create :user
step 'there is a confirmed and open supplier'
@user = create :user
@table = create :table, supplier: @supplier, section: @section, position_x: 2, position_y: 2
@section.should be_present
# @section.should be_present
@list = create :list, state: 'active', supplier: @supplier, table: @table, section: @section, user_ids: [@user.id]
@product = create :product, price: 2.22, supplier: @supplier
@order = create :order, user: @user, list: @list, supplier: @supplier, section: @section, state: 'placed'
@product_order = create :product_order, order: @order, product: @product, quantity: 3, price: 2.11
@list.set_price.should == 6.33 # does not belong here, but good test. must take product order price above product price
@product_order = create :product_order, order: @order, product: @product, quantity: 3, price: 2.11, product_name: 'Old Product name'
# @list.set_price.should == 6.33 # does not belong here, but good test. must take product order price above product price
Qwaiter::Counter.set "supplier_counter:#{@supplier.id}:orders_placed", 11
Qwaiter::Counter.set "supplier_counter:#{@supplier.id}:orders_in_process", 7
end
@@ -124,3 +124,11 @@ step "the supplier table should have been linked to the first section" do
@table.reload
@table.section_id.should == @sections.first.id
end
step "the supplier clicks on the table having the new list in the section view" do
page.find(".section-table-#{@table.id}").click
end
step "the supplier table actions of the new list should be visible" do
page.should have_selector ".section-table-#{@table.id} .table-actions .close-list-button"
end