Asserts on the correct display of orders

(for a given distributor)
This commit is contained in:
filipefurtad0
2023-01-16 14:13:53 +00:00
parent 9757ab2a6c
commit 6f35b38fa8

View File

@@ -167,6 +167,14 @@ describe '
visit spree.admin_orders_path
end
it "displays the orders for the respective distributor" do
expect(page).not_to have_content order.number # does not display incomplete orders by default
expect(page).to have_content order2.number
expect(page).to have_content order3.number
expect(page).to have_content order4.number
expect(page).not_to have_content order5.number # does not display orders from other distributors
end
it "cannot send emails to orders if permission have been revoked in the meantime" do
page.find("#listing_orders tbody tr:nth-child(1) input[name='order_ids[]']").click