mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Use have_selector x, count: y; instead of all(x).count.should == y
This commit is contained in:
@@ -135,7 +135,7 @@ feature %q{
|
||||
pm2
|
||||
|
||||
visit spree.admin_payment_methods_path
|
||||
page.all('td', text: 'Two').count.should == 1
|
||||
page.should have_selector 'td', text: 'Two', count: 1
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ feature %q{
|
||||
table.sort.should == [
|
||||
["Hub", "Code", "First Name", "Last Name", "Supplier", "Product", "Variant", "Quantity", "TempControlled?"]
|
||||
].sort
|
||||
all('table#listing_orders tbody tr').count.should == 5 # Totals row per order
|
||||
page.should have_selector 'table#listing_orders tbody tr', count: 5 # Totals row per order
|
||||
end
|
||||
|
||||
scenario "Pack By Supplier" do
|
||||
|
||||
@@ -123,7 +123,7 @@ feature 'shipping methods' do
|
||||
|
||||
visit spree.admin_shipping_methods_path
|
||||
|
||||
page.all('td', text: 'Two').count.should == 1
|
||||
page.should have_selector 'td', text: 'Two', count: 1
|
||||
end
|
||||
|
||||
pending "shows me only shipping methods for the enterprise I select" do
|
||||
|
||||
@@ -300,7 +300,7 @@ feature "As a consumer I want to check out my cart", js: true do
|
||||
|
||||
# Does not show duplicate shipping fee
|
||||
visit checkout_path
|
||||
page.all("th", text: "Shipping").count.should == 1
|
||||
page.should have_selector "th", text: "Shipping", count: 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user