Supplier dashboard fixes
This commit is contained in:
@@ -7,6 +7,7 @@ step "there is an active list and order" do
|
||||
@product = create :product, price: 2.22, supplier: @supplier
|
||||
@order = create :order, user: @user, list: @list, supplier: @supplier, section: @section
|
||||
@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
|
||||
end
|
||||
|
||||
step "the supplier dashboard should display the active list" do
|
||||
@@ -81,3 +82,38 @@ end
|
||||
step "I click on the mark list as helped button in the supplier dashboard" do
|
||||
find(".list-row-#{@list.id} .mark_list_as_helped").click
|
||||
end
|
||||
|
||||
step "I should see the list and the new list" do
|
||||
page.should have_selector ".list-row-#{@list.id}"
|
||||
page.should have_selector ".list-row-#{@new_list.id}"
|
||||
end
|
||||
|
||||
step "I should see the order and the new order" do
|
||||
page.should have_selector ".order-row-#{@order.id}"
|
||||
page.should have_selector ".order-row-#{@new_order.id}"
|
||||
end
|
||||
|
||||
step "I should see the list and order but not the new list and new order" do
|
||||
page.should have_selector ".list-row-#{@list.id}"
|
||||
page.should_not have_selector ".list-row-#{@new_list.id}"
|
||||
page.should have_selector ".order-row-#{@order.id}"
|
||||
page.should_not have_selector ".order-row-#{@new_order.id}"
|
||||
end
|
||||
|
||||
step "I should see the new list and new order but not the list and order" do
|
||||
page.should_not have_selector ".list-row-#{@list.id}"
|
||||
page.should have_selector ".list-row-#{@new_list.id}"
|
||||
page.should_not have_selector ".order-row-#{@order.id}"
|
||||
page.should have_selector ".order-row-#{@new_order.id}"
|
||||
end
|
||||
|
||||
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
|
||||
end
|
||||
step "I reset the section selector in the supplier dashboard" do
|
||||
find(%|#section_selector option[value=""]|).select_option
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user