Many supplier features and style upgrades and fixes
This commit is contained in:
@@ -52,7 +52,7 @@ end
|
||||
|
||||
step "the supplier dashboard list should display the updated price" do
|
||||
sleep 0.5
|
||||
el = find(".list-row-#{@list.id} .total_list_amount")
|
||||
el = find(".list-row-#{@list.id} .currency")
|
||||
# original order is 3 * 2.11 = 6.33
|
||||
# new order price = 5 * 2.22 = 11.10
|
||||
# therefore the updated price should be 17.43
|
||||
@@ -61,21 +61,21 @@ end
|
||||
|
||||
step "the new order should be present in the supplier dashboard" do
|
||||
el = find(".order-row-#{@new_order.id}")
|
||||
el.find('.table_number').text.should == @table.number.to_s
|
||||
el.find('.section_title').text.should == @section.title
|
||||
el.find('.table-number').text.should == "# #{@table.number}"
|
||||
el.find('.link-to-section').text.should == @section.title
|
||||
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 == @other_table.number.to_s
|
||||
el.find('.section_title').text.should == @other_section.title
|
||||
el.find('.table-number').text.should == "# #{@other_table.number}"
|
||||
el.find('.link-to-section').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 == @other_section.title
|
||||
el.find('.table_number').text.should == @other_table.number.to_s
|
||||
el.find('.currency').text.should =~ /6.66/
|
||||
el.find('.link-to-section').text.should == @other_section.title
|
||||
el.find('.table-number').text.should == "# #{@other_table.number}"
|
||||
end
|
||||
|
||||
step "I click on the close list button in the supplier dashboard" do
|
||||
@@ -133,13 +133,13 @@ step "the active list changes to another table in another section" do
|
||||
end
|
||||
|
||||
step "the supplier main board table number should be updated to the new table number" do
|
||||
expect( find(".list-row-#{@list.id} .table_number").text ).to eq "65"
|
||||
expect( find(".order-row-#{@list.orders.first.id} .table_number").text ).to eq "65"
|
||||
expect( find(".list-row-#{@list.id} .table-number").text ).to eq "# 65"
|
||||
expect( find(".order-row-#{@list.orders.first.id} .table-number").text ).to eq "65"
|
||||
end
|
||||
|
||||
step "the supplier main board section name should be updated to the new section" do
|
||||
expect( find(".list-row-#{@list.id} .section_title").text ).to eq "New Section"
|
||||
expect( find(".order-row-#{@list.orders.first.id} .section_title").text ).to eq "New Section"
|
||||
expect( find(".list-row-#{@list.id} .link-to-section").text ).to eq "New Section"
|
||||
expect( find(".order-row-#{@list.orders.first.id} .link-to-section").text ).to eq "New Section"
|
||||
end
|
||||
|
||||
# Marking order as wrong
|
||||
@@ -152,7 +152,7 @@ step "the supplier main board order should not be visible anymore" do
|
||||
end
|
||||
|
||||
step "the supplier main board list total should be updated" do
|
||||
find(".list-row-#{@list.id} .total_list_amount").text.should == "€ 0.00"
|
||||
find(".list-row-#{@list.id} .currency").text.should == "€ 0.00"
|
||||
end
|
||||
|
||||
step "the supplier placed orders counter should be reduced" do
|
||||
|
||||
Reference in New Issue
Block a user