mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
Adds assertion after page visit to promote page loading
This commit is contained in:
@@ -242,8 +242,9 @@ describe "As a consumer I want to shop with a distributor", js: true do
|
||||
end
|
||||
|
||||
context "filtering search results" do
|
||||
before { visit shop_path }
|
||||
it "returns no results and clears searches by clicking the clear-link" do
|
||||
visit shop_path
|
||||
expect(page).to have_content product2.name
|
||||
fill_in "search", with: "74576345634XXXXXX"
|
||||
expect(page).to have_content "Sorry, no results found"
|
||||
expect(page).not_to have_content product2.name
|
||||
@@ -251,6 +252,8 @@ describe "As a consumer I want to shop with a distributor", js: true do
|
||||
expect(page).to have_content("Add", count: 4)
|
||||
end
|
||||
it "returns results and clears searches by clicking the clear-button" do
|
||||
visit shop_path
|
||||
expect(page).to have_content product2.name
|
||||
fill_in "search", with: "Meer" # For product named "Meercats"
|
||||
expect(page).to have_content product2.name
|
||||
expect(page).not_to have_content product.name
|
||||
|
||||
Reference in New Issue
Block a user