mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-22 05:18:51 +00:00
Merge pull request #4522 from kristinalim/fix/4239-flaky_spec_in_bulk_product_clone
4239 Do one thing at a time in feature spec for product cloning
This commit is contained in:
@@ -415,14 +415,17 @@ feature '
|
||||
|
||||
expect(page).to have_selector "a.clone-product", count: 1
|
||||
find("a.clone-product").click
|
||||
expect(page).to have_field "product_name", with: "COPY OF #{p.name}"
|
||||
|
||||
fill_in "product_name", with: "new product name"
|
||||
within "#p_#{p.id}" do
|
||||
fill_in "product_name", with: "new product name"
|
||||
end
|
||||
|
||||
within "#save-bar" do
|
||||
click_button 'Save Changes'
|
||||
end
|
||||
|
||||
expect(page.find("#status-message")).to have_content "Changes saved."
|
||||
|
||||
p.reload
|
||||
expect(p.name).to eq "new product name"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user