mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge pull request #12333 from chahmedejaz/bugfix/12294-wrong-tax-category-display
[BUU] Fix Wrong Tax Category Display
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
%td.align-left
|
||||
.content= variant.primary_taxon&.name
|
||||
%td.align-left
|
||||
.content= variant.tax_category&.name || "None" # TODO: convert to dropdown, else translate hardcoded string.
|
||||
.content= (variant.tax_category_id ? variant.tax_category&.name : t('.none_tax_category')) # TODO: convert to dropdown
|
||||
%td.align-left
|
||||
-# empty
|
||||
%td.align-right
|
||||
|
||||
@@ -907,6 +907,8 @@ en:
|
||||
delete_variant:
|
||||
success: Successfully deleted the variant
|
||||
error: Unable to delete the variant
|
||||
variant_row:
|
||||
none_tax_category: None
|
||||
product_import:
|
||||
title: Product Import
|
||||
file_not_found: File not found or could not be opened
|
||||
|
||||
@@ -507,6 +507,7 @@ describe 'As an admin, I can manage products', feature: :admin_style_v3 do
|
||||
expect(new_variant.price).to eq 10.25
|
||||
expect(new_variant.unit_value).to eq 1000
|
||||
expect(new_variant.on_hand).to eq 3
|
||||
expect(new_variant.tax_category_id).to be_nil
|
||||
|
||||
within row_containing_name("Large box") do
|
||||
expect(page).to have_field "Name", with: "Large box"
|
||||
@@ -514,6 +515,9 @@ describe 'As an admin, I can manage products', feature: :admin_style_v3 do
|
||||
expect(page).to have_field "Price", with: "10.25"
|
||||
expect(page).to have_content "1kg"
|
||||
expect(page).to have_button "On Hand", text: "3"
|
||||
within tax_category_column do
|
||||
expect(page).to have_content "None"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1019,4 +1023,8 @@ describe 'As an admin, I can manage products', feature: :admin_style_v3 do
|
||||
def expect_page_to_have_image(url)
|
||||
expect(page).to have_selector("img[src$='#{url}']")
|
||||
end
|
||||
|
||||
def tax_category_column
|
||||
@tax_category_column ||= 'td:nth-child(10)'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user