diff --git a/app/views/spree/admin/products/new.html.haml b/app/views/spree/admin/products/new.html.haml index 5166f12590..4d770bb4af 100644 --- a/app/views/spree/admin/products/new.html.haml +++ b/app/views/spree/admin/products/new.html.haml @@ -32,9 +32,9 @@ = f.error_message_on :variant_unit .two.columns = f.field_container :unit_value do - = f.label :unit_value_with_description, t(".value"), 'ng-disabled' => "!hasUnit(product)" + = f.label :unit_value, t(".value"), 'ng-disabled' => "!hasUnit(product)" %span.required * - %input.fullwidth{ id: 'product_unit_value_with_description', 'ng-model' => 'product.master.unit_value_with_description', :type => 'text', placeholder: "eg. 2", 'ng-disabled' => "!hasUnit(product)" } + %input.fullwidth{ id: 'product_unit_value', 'ng-model' => 'product.master.unit_value_with_description', :type => 'text', placeholder: "eg. 2", 'ng-disabled' => "!hasUnit(product)" } %input{ type: 'hidden', 'ng-value': 'product.master.unit_value', "ng-init": "product.master.unit_value='#{@product.master.unit_value}'", name: 'product[unit_value]' } %input{ type: 'hidden', 'ng-value': 'product.master.unit_description', "ng-init": "product.master.unit_description='#{@product.master.unit_description}'", name: 'product[unit_description]' } = f.error_message_on :unit_value diff --git a/spec/system/admin/bulk_product_update_spec.rb b/spec/system/admin/bulk_product_update_spec.rb index 1275a15203..20b401b34c 100644 --- a/spec/system/admin/bulk_product_update_spec.rb +++ b/spec/system/admin/bulk_product_update_spec.rb @@ -216,7 +216,7 @@ describe ' fill_in 'product_name', with: 'Big Bag Of Apples' select supplier.name, from: 'product_supplier_id' select 'Weight (g)', from: 'product_variant_unit_with_scale' - fill_in 'product_unit_value_with_description', with: '100' + fill_in 'product_unit_value', with: '100' fill_in 'product_price', with: '10.00' select taxon.name, from: 'product_primary_taxon_id' select shipping_category.name, from: 'product_shipping_category_id' @@ -828,7 +828,7 @@ describe ' fill_in 'product_name', with: 'Big Bag Of Apples' select supplier_permitted.name, from: 'product_supplier_id' select 'Weight (g)', from: 'product_variant_unit_with_scale' - fill_in 'product_unit_value_with_description', with: '100' + fill_in 'product_unit_value', with: '100' fill_in 'product_price', with: '10.00' select taxon.name, from: 'product_primary_taxon_id' select shipping_category.name, from: 'product_shipping_category_id' diff --git a/spec/system/admin/products_spec.rb b/spec/system/admin/products_spec.rb index 0afec0e66d..e420880547 100644 --- a/spec/system/admin/products_spec.rb +++ b/spec/system/admin/products_spec.rb @@ -37,7 +37,7 @@ describe ' select @supplier.name, from: 'product_supplier_id' select "Weight (kg)", from: 'product_variant_unit_with_scale' - fill_in 'product_unit_value_with_description', with: "5.00 g" + fill_in 'product_unit_value', with: "5.00 g" assert_selector(:field, placeholder: "5kg g") fill_in 'product_display_as', with: "Big Box of Chocolates" select taxon.name, from: "product_primary_taxon_id" @@ -51,7 +51,7 @@ describe ' expect(page).to have_content "Name can't be blank" expect(page).to have_field 'product_supplier_id', with: @supplier.id - expect(page).to have_field 'product_unit_value_with_description', with: "5.00 g" + expect(page).to have_field 'product_unit_value', with: "5.00 g" expect(page).to have_field 'product_display_as', with: "Big Box of Chocolates" expect(page).to have_field 'product_primary_taxon_id', with: taxon.id expect(page).to have_field 'product_price', with: '19.99' @@ -75,7 +75,7 @@ describe ' select 'New supplier', from: 'product_supplier_id' fill_in 'product_name', with: 'A new product !!!' select "Weight (kg)", from: 'product_variant_unit_with_scale' - fill_in 'product_unit_value_with_description', with: 5 + fill_in 'product_unit_value', with: 5 select taxon.name, from: "product_primary_taxon_id" fill_in 'product_price', with: '19.99' fill_in 'product_on_hand', with: 5 @@ -112,7 +112,7 @@ describe ' fill_in 'product_name', with: 'Hot Cakes' select 'New supplier', from: 'product_supplier_id' select "Weight (kg)", from: 'product_variant_unit_with_scale' - fill_in 'product_unit_value_with_description', with: 1 + fill_in 'product_unit_value', with: 1 select taxon.name, from: "product_primary_taxon_id" fill_in 'product_price', with: '1.99' fill_in 'product_on_hand', with: 0 @@ -137,7 +137,7 @@ describe ' fill_in 'product_name', with: 'Hot Cakes' select 'New supplier', from: 'product_supplier_id' select "Weight (kg)", from: 'product_variant_unit_with_scale' - fill_in "product_unit_value_with_description", with: "" + fill_in "product_unit_value", with: "" select taxon.name, from: "product_primary_taxon_id" fill_in 'product_price', with: '1.99' fill_in 'product_on_hand', with: 0 @@ -251,7 +251,7 @@ describe ' expect(page).to have_selector('#product_supplier_id') select 'Another Supplier', from: 'product_supplier_id' select 'Weight (g)', from: 'product_variant_unit_with_scale' - fill_in 'product_unit_value_with_description', with: '500' + fill_in 'product_unit_value', with: '500' select taxon.name, from: "product_primary_taxon_id" select 'None', from: "product_tax_category_id"