Skip to content

Commit

Permalink
Removes TODO, preparing spec for admin_style_3
Browse files Browse the repository at this point in the history
  • Loading branch information
filipefurtad0 committed Jul 12, 2024
1 parent fb0a6a0 commit 37d3108
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions spec/system/admin/product_import_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -680,14 +680,21 @@
expect(page).to have_selector '.created-count', text: '2'
expect(page).not_to have_selector '.updated-count'

puts "TODO: migrate to v3"
Flipper.disable(:admin_style_v3) # disabling BUU for legacy products page
# puts "TODO: migrate to v3"
# Flipper.disable(:admin_style_v3) # disabling BUU for legacy products page

default_variant_selector = "tr:has(input[aria-label=Name][value='Carrots'])"

visit spree.admin_products_path

within "#p_#{Spree::Product.find_by(name: 'Carrots').id}" do
expect(page).to have_input "product_name", with: "Carrots"
expect(page).to have_select "variant_unit_with_scale", selected: "Weight (lb)"
expect(page).to have_content "5" # on_hand
carrots = Spree::Product.find_by(name: 'Carrots')

within "#product_#{carrots.id}" do
expect(page).to have_input("[products][2][variants_attributes][0][display_name]",
text: "Carrots")
expect(page).to have_input("[products][2][variants_attributes][][0][unit_to_display]",
text: "1 lb")
expect(page).to have_content("5")
end
end

Expand Down

0 comments on commit 37d3108

Please sign in to comment.