Fix list unit and supplier main board acceptance specs

This commit is contained in:
2014-05-28 15:16:08 +02:00
parent 4855b2e8e0
commit e9554ea3e7
14 changed files with 133 additions and 121 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ 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_order = @new_list.place_order @user, {@product.id => 3}
@new_order = @new_list.place_order(products: {@product.id => 3}, user: @user)
end
step "I am signed in as a user" do
+4
View File
@@ -9,6 +9,10 @@ step "I click on translation :translation" do |translation_key|
click_on text
end
step "I click on selector :selector" do |selector|
find(selector).click
end
step 'I visit :path' do |path|
visit path
end
+1 -1
View File
@@ -9,7 +9,7 @@ step "the order should be marked as delivered" do
end
step "another order is placed" do
@new_order = @list.place_order @user, {@product.id => 5}
@new_order = @list.place_order(products: {@product.id => 5}, user: @user)
end
step "the user order should be created as a new order" do
@@ -33,19 +33,19 @@ step "the order in the supplier dashboard should not be displayed anymore" do
end
step "the list on the supplier dashboard should not be marked as in need of help" do
page.should_not have_selector(".list-row-#{@list.id} .list-needs-help-indicator")
page.should_not have_selector(".list-row-#{@list.id} .icon.needs-help")
end
step "the list on the supplier dashboard should be marked as in need of help" do
page.should have_selector(".list-row-#{@list.id} .list-needs-help-indicator")
page.should have_selector(".list-row-#{@list.id} .icon.needs-help")
end
step "the list on the supplier dashboard should not be marked as in need of payment" do
page.should_not have_selector(".list-row-#{@list.id} .list-needs-payment-indicator")
page.should_not have_selector(".list-row-#{@list.id} .icon.needs-payment")
end
step "the list on the supplier dashboard should be marked as in need of payment" do
page.should have_selector(".list-row-#{@list.id} .list-needs-payment-indicator")
page.should have_selector(".list-row-#{@list.id} .icon.needs-payment")
end
step "the supplier dashboard list should display the updated price" do