From 15abea51abd944966ec8fc8286a5cde9a144156b Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 1 Apr 2026 14:48:18 +1100 Subject: [PATCH] Avoid unnecessary extra page visit The second spec example below has to load the page after creating a record, so it's not helpful to load it here. --- spec/system/admin/products_v3/actions_spec.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spec/system/admin/products_v3/actions_spec.rb b/spec/system/admin/products_v3/actions_spec.rb index eac05fe05c..0c38fd3542 100644 --- a/spec/system/admin/products_v3/actions_spec.rb +++ b/spec/system/admin/products_v3/actions_spec.rb @@ -328,12 +328,10 @@ RSpec.describe 'As an enterprise user, I can perform actions on the products scr } describe "Actions columns (delete)" do - before do - visit admin_products_url - end - it "shows an actions menu with a delete link when clicking on icon for product. " \ "doesn't show delete link for the single variant" do + visit admin_products_url + within product_selector do page.find(".vertical-ellipsis-menu").click expect(page).to have_css(delete_option_selector)