mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Test to control order of shipping methods by name
This commit is contained in:
@@ -222,11 +222,12 @@ feature "As a consumer I want to check out my cart", js: true, retry: 3 do
|
||||
page.should_not have_content product.tax_category.name
|
||||
end
|
||||
|
||||
it "shows all shipping methods" do
|
||||
it "shows all shipping methods in order by name" do
|
||||
toggle_shipping
|
||||
page.should have_content "Frogs"
|
||||
page.should have_content "Donkeys"
|
||||
page.should have_content "Local"
|
||||
shipping_methods = page.all(:xpath, '//*[@id="shipping"]/ng-form/dd/div/div[1]').map {|row| row.all('label').map(&:text)}.flatten
|
||||
expect(shipping_methods[0]).to include(sm2.name) # Donkeys
|
||||
expect(shipping_methods[1]).to include(sm1.name) # Frogs
|
||||
expect(shipping_methods[2]).to include(sm3.name) # Local
|
||||
end
|
||||
|
||||
context "when shipping method requires an address" do
|
||||
|
||||
Reference in New Issue
Block a user