From 70f153b0f7c9bab2751b8308e01969bbe9eebfbc Mon Sep 17 00:00:00 2001 From: David Cook Date: Fri, 1 Dec 2023 12:06:55 +1100 Subject: [PATCH] Refactor spec Only the first example is testing the updated variant here. --- spec/system/admin/products_v3/products_spec.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spec/system/admin/products_v3/products_spec.rb b/spec/system/admin/products_v3/products_spec.rb index b4294bdc4d..5e4537875c 100644 --- a/spec/system/admin/products_v3/products_spec.rb +++ b/spec/system/admin/products_v3/products_spec.rb @@ -298,14 +298,15 @@ describe 'As an admin, I can see the new product page', feature: :admin_style_v3 fill_in "Name", with: "" fill_in "SKU", with: "A" * 256 end + end + + it "shows errors for both product and variant fields" do + # Update variant with invalid data too within row_containing_name("Medium box") do fill_in "Name", with: "L" * 256 fill_in "SKU", with: "1" * 256 fill_in "Price", with: "10.25" end - end - - it "shows errors for both product and variant fields" do # Also update another product with valid data within row_containing_name("Bananas") do fill_in "Name", with: "Bananes"