From 8a3eea7a27c73bf0fbc2e19cab33c4e012bdc11f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Wed, 14 Apr 2021 16:16:52 +0200 Subject: [PATCH 1/2] Enable tests Thanks to @filipefurtad0 you now have tests ready before fixing anything : :+1: :pray: --- spec/features/admin/products_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/features/admin/products_spec.rb b/spec/features/admin/products_spec.rb index 13c87f3944..9e4544f657 100644 --- a/spec/features/admin/products_spec.rb +++ b/spec/features/admin/products_spec.rb @@ -488,7 +488,7 @@ feature ' expect(flash_message).to eq('Product "a product" has been successfully updated!') product.reload expect(product.variant_unit).to eq(var_unit) - # TODO -> expect(page).to have_select('product_variant_unit_with_scale', :selected => dropdown_option) + expect(page).to have_select('product_variant_unit_with_scale', selected: dropdown_option) expect(product.variant_unit_scale).to eq(var_unit_scale) end end From 86cba6e9044040baf7b2b411e7faeffe5afb9a85 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Tue, 13 Apr 2021 11:59:49 +0200 Subject: [PATCH 2/2] Remove trailing `.0` from variant unit scale - As VariantUnitManager.variantUnitOptions() returns array formatted like this: `"Weight (g)", "weight_1"` and `product.variant_unit_scale` is formatted like this `weight_1.0` there is no possible match for the