LD: Adding additional functionality for order cycle management reports - adding hub code model, adding temp_controlled bool, adding delivery report

This commit is contained in:
Lynne Davis
2015-02-24 13:43:00 +10:00
parent f83ceae5d1
commit a3df4bf026
7 changed files with 114 additions and 24 deletions

View File

@@ -65,12 +65,21 @@ feature %q{
click_link "Reports"
end
scenario "order payment method report" do
click_link "Order Cycle Management"
scenario "payment method report" do
click_link "Payment Methods Report"
rows = find("table#listing_order_payment_methods").all("thead tr")
table = rows.map { |r| r.all("th").map { |c| c.text.strip } }
table.sort.should == [
["First Name", "Last Name", "Email", "Phone", "Hub", "Shipping Method", "Payment Method", "Amount"]
["First Name", "Last Name", "Hub", "Hub Code", "Email", "Phone", "Shipping Method", "Payment Method", "Amount", "Balance"]
].sort
end
scenario "delivery report" do
click_link "Delivery Report"
rows = find("table#listing_order_payment_methods").all("thead tr")
table = rows.map { |r| r.all("th").map { |c| c.text.strip } }
table.sort.should == [
["First Name", "Last Name", "Hub", "Hub Code", "Delivery Address", "Delivery Postcode", "Phone", "Shipping Method", "Payment Method", "Amount", "Balance", "Temp Controlled Items?", "Special Instructions"]
].sort
end
end