Everything is green
This commit is contained in:
@@ -27,9 +27,9 @@ step "the list should be marked as closed" do
|
||||
end
|
||||
|
||||
step 'a new order on a table in another section is created' do
|
||||
@new_section = create :section, title: 'Terrace', supplier: @supplier
|
||||
@new_table = create :table, number: 59, section: @new_section, supplier: @supplier
|
||||
@new_list = create :list, section: @new_section, table: @new_table, supplier: @supplier, user_ids: [@user.id]
|
||||
# @new_section = create :section, title: 'Terrace', supplier: @supplier
|
||||
# @new_table = create :table, number: 59, section: @new_section, supplier: @supplier
|
||||
@new_list = create :list, section: @other_section, table: @other_table, supplier: @supplier, user_ids: [@user.id]
|
||||
@new_order = @new_list.place_order(products: {@product.id => 3}, user: @user)
|
||||
end
|
||||
|
||||
|
||||
@@ -67,15 +67,15 @@ end
|
||||
|
||||
step "the new order on a table in another section should be present in the supplier dashboard" do
|
||||
el = find(".order-row-#{@new_order.id}")
|
||||
el.find('.table_number').text.should == @new_table.number.to_s
|
||||
el.find('.section_title').text.should == @new_section.title
|
||||
el.find('.table_number').text.should == @other_table.number.to_s
|
||||
el.find('.section_title').text.should == @other_section.title
|
||||
end
|
||||
|
||||
step "the new list should appear in the supplier dashboard" do
|
||||
el = find(".list-row-#{@new_list.id}")
|
||||
el.find('.total_list_amount').text.should =~ /6.66/
|
||||
el.find('.section_title').text.should == 'Terrace'
|
||||
el.find('.table_number').text.should == @new_table.number.to_s
|
||||
el.find('.section_title').text.should == @other_section.title
|
||||
el.find('.table_number').text.should == @other_table.number.to_s
|
||||
end
|
||||
|
||||
step "I click on the close list button in the supplier dashboard" do
|
||||
@@ -114,8 +114,8 @@ step "I select the section in the supplier dashboard" do
|
||||
find(%|.section_selector option[value="#{@section.id}"]|).select_option
|
||||
end
|
||||
|
||||
step "I select the new section in the supplier dashboard" do
|
||||
find(%|.section_selector option[value="#{@new_section.id}"]|).select_option
|
||||
step "I select the other section in the supplier dashboard" do
|
||||
find(%|.section_selector option[value="#{@other_section.id}"]|).select_option
|
||||
end
|
||||
|
||||
step "I reset the section selector in the supplier dashboard" do
|
||||
|
||||
Reference in New Issue
Block a user