diff --git a/app/views/spree/admin/variants/_form.html.haml b/app/views/spree/admin/variants/_form.html.haml index 35a41f666d..c9cb54e573 100644 --- a/app/views/spree/admin/variants/_form.html.haml +++ b/app/views/spree/admin/variants/_form.html.haml @@ -23,7 +23,7 @@ = f.text_field :sku, class: 'fullwidth' .field = f.label :price, t('.price') - = f.text_field :price, class: 'fullwidth', "ng-model" => "variant.price", "ng-init" => "variant.price = '#{number_to_currency(@variant.price, unit: '')}'" + = f.text_field :price, class: 'fullwidth', "ng-model" => "variant.price", "ng-init" => "variant.price = '#{number_to_currency(@variant.price, unit: '').strip}'" .field = hidden_field_tag 'product_variant_unit', @product.variant_unit = hidden_field_tag 'product_variant_unit_name', @product.variant_unit_name @@ -64,4 +64,4 @@ - value = number_with_precision(@variant.send(field), precision: 2) = f.number_field field, value: value, class: 'fullwidth', step: 0.01 -.clear \ No newline at end of file +.clear diff --git a/spec/system/admin/variants_spec.rb b/spec/system/admin/variants_spec.rb index 0a2d7fd39b..2f7c165c2e 100644 --- a/spec/system/admin/variants_spec.rb +++ b/spec/system/admin/variants_spec.rb @@ -208,10 +208,10 @@ describe ' page.find('table.index .icon-edit').click # assert on the price field - expect(page).to have_field "variant_price", with: "19,99 " + expect(page).to have_field "variant_price", with: "19,99" # When I update the fields and save the variant - fill_in "variant_price", with: "12,50 " + fill_in "variant_price", with: "12,50" click_button 'Actualizar' expect(page).to have_content \ %(Variant "#{product.name}" ha sido actualizado exitosamente) @@ -231,13 +231,9 @@ describe ' end it_behaves_like "with localization", false, ".", "," - it_behaves_like "with localization", true, ".", "," do - before { pending("#11085") } - end + it_behaves_like "with localization", true, ".", "," it_behaves_like "with localization", false, ",", "." - it_behaves_like "with localization", true, ",", "." do - before { pending("#11085") } - end + it_behaves_like "with localization", true, ",", "." end end