mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
fixup: Updates spec to create a variant within BUU design
This commit is contained in:
@@ -1675,10 +1675,14 @@ RSpec.describe 'As an enterprise user, I can manage my products', feature: :admi
|
||||
|
||||
expect {
|
||||
click_on "Save changes"
|
||||
expect(page).to have_content "Changes saved"
|
||||
}.to change {
|
||||
Spree::Variant.count
|
||||
}.from(1).to(2)
|
||||
|
||||
click_on "Dismiss"
|
||||
expect(page).not_to have_content "Changes saved"
|
||||
|
||||
new_variant = Spree::Variant.where(deleted_at: nil).last
|
||||
expect(new_variant.sku).to eq "345"
|
||||
expect(new_variant.display_name).to eq "Small bag"
|
||||
@@ -1692,12 +1696,6 @@ RSpec.describe 'As an enterprise user, I can manage my products', feature: :admi
|
||||
expect(new_variant.on_demand).to eq true
|
||||
end
|
||||
|
||||
within ".flash-container" do
|
||||
expect(page).to have_content "Changes saved"
|
||||
click_on "Dismiss"
|
||||
expect(page).not_to have_content "Changes saved"
|
||||
end
|
||||
|
||||
within page.all("tr.condensed")[1] do # selects second variant row
|
||||
page.find('input[id$="_sku"]').fill_in with: "789"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user