From c00ebb64feb6dbf648bcb775967499ddf1bd82ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Gigandet?= Date: Thu, 15 Feb 2024 18:35:00 +0100 Subject: [PATCH] fix: Nutri-Score v2 fixes and improvements to knowledge panels (#9795) --- docs/api/ref/schemas/product_ingredients.yaml | 8 ++ ...triscore-not-applicable-new-formula-en.svg | 7 -- ...triscore-not-applicable-new-formula-fr.svg | 7 -- .../src/nutriscore-unknown-new-formula-en.svg | 7 -- .../src/nutriscore-unknown-new-formula-fr.svg | 7 -- lib/ProductOpener/Display.pm | 2 - lib/ProductOpener/Food.pm | 15 ++- lib/ProductOpener/Ingredients.pm | 61 ++++++++---- lib/ProductOpener/KnowledgePanels.pm | 99 +++++++++++++------ lib/ProductOpener/Numbers.pm | 13 ++- lib/ProductOpener/Nutriscore.pm | 27 ++--- po/common/common.pot | 12 ++- po/common/en.po | 67 +++++++------ po/common/fr.po | 9 ++ ...n_svg_images_for_nutriscore_new_formula.pl | 4 +- .../health/nutriscore/nutriscore_2023.tt.json | 13 ++- .../nutriscore/nutriscore_component.tt.json | 2 +- .../get-existing-product.json | 2 + .../get-fields-all-knowledge-panels.json | 2 + .../api_v2_product_read/get-fields-all.json | 2 + ...attribute-groups-all-knowledge-panels.json | 2 + .../api_v2_product_read/get-fields-raw.json | 2 + .../get-product-auth-good-password.json | 4 +- ...uct-ingredients-text-without-language.json | 2 + .../api_v2_product_write/get-product.json | 4 +- .../get-existing-product-gs1-ai-data-str.json | 2 + .../get-existing-product-gs1-caret.json | 2 + .../get-existing-product-gs1-data-uri.json | 2 + .../get-existing-product-gs1-fnc1.json | 2 + .../get-existing-product-gs1-gs.json | 2 + .../get-existing-product.json | 2 + .../get-fields-all-knowledge-panels.json | 2 + .../api_v3_product_read/get-fields-all.json | 2 + ...attribute-groups-all-knowledge-panels.json | 2 + .../api_v3_product_read/get-fields-raw.json | 2 + .../patch-request-fields-all.json | 4 +- .../products/3560070167470.json | 4 +- .../products/3560070815746.json | 4 +- .../products/3250390017165.json | 4 +- .../products/3250390020745.json | 4 +- .../products/3250390020806.json | 4 +- .../products/3250390020998.json | 4 +- .../products/3250390021001.json | 4 +- .../products/3250390021469.json | 4 +- .../products/3250390021544.json | 4 +- .../products/3250390021568.json | 4 +- .../products/3250390021926.json | 4 +- .../products/3250390024781.json | 4 +- .../products/3250390024804.json | 4 +- .../products/3250390024842.json | 4 +- .../products/3250390024866.json | 4 +- .../products/3250390025399.json | 4 +- .../products/3250390025863.json | 4 +- .../products/3250390026044.json | 4 +- .../products/3250390026648.json | 4 +- .../products/3250390026754.json | 4 +- .../test/products/3270190128403.json | 4 +- .../test/products/4270190128403.json | 4 +- .../test/products/5270190128403.json | 2 + .../test/products/7270190128403.json | 4 +- .../3003004006001.json | 4 +- .../3003004006002.json | 4 +- .../3003004006003.json | 4 +- .../3003004006004.json | 4 +- .../3003004006005.json | 4 +- .../3003004006006.json | 4 +- .../3003004006007.json | 4 +- .../import_csv_file/test/2003004006001.json | 4 +- .../import_csv_file/test/2003004006002.json | 4 +- .../import_csv_file/test/2003004006003.json | 4 +- .../import_csv_file/test/2003004006004.json | 4 +- .../import_csv_file/test/2003004006005.json | 4 +- .../import_csv_file/test/2003004006006.json | 4 +- .../import_csv_file/test/2003004006007.json | 4 +- ...ed-protected-product-api-v2-moderator.json | 4 +- .../get-edited-protected-product-api-v2.json | 4 +- ...-protected-product-web-form-moderator.json | 4 +- ...get-edited-protected-product-web-form.json | 4 +- ...get-edited-unprotected-product-api-v2.json | 4 +- ...t-edited-unprotected-product-web-form.json | 4 +- .../search_v1/search-no-filter.json | 14 ++- ...ies-without-ingredients-from-palm-oil.json | 4 + ...rch-without-ingredients-from-palm-oil.json | 14 ++- .../attributes/en-attributes.json | 2 + .../en-ecoscore-score-at-20-threshold.json | 4 +- .../attributes/en-maybe-vegan.json | 4 +- .../attributes/en-no-ingredients.json | 4 +- .../attributes/en-nova-groups-markers.json | 4 +- .../attributes/en-nutriscore.json | 2 + .../attributes/en-unknown-ingredients.json | 4 +- .../attributes/fr-palm-kernel-fat.json | 4 +- .../attributes/fr-palm-oil-free.json | 4 +- .../attributes/fr-palm-oil.json | 4 +- .../attributes/fr-vegetable-oils.json | 4 +- ...-percent-sugar-and-unknown-ingredient.json | 4 +- .../beverage-with-80-percent-milk.json | 9 +- .../nutriscore/breakfast-cereals.json | 2 +- .../cocoa-and-chocolate-powders.json | 2 +- .../nutriscore/colza-oil.json | 2 +- .../nutriscore/cookies.json | 2 +- .../dairy-drink-with-80-percent-milk.json | 9 +- ...-drink-with-less-than-80-percent-milk.json | 9 +- .../nutriscore/dairy-drinks-without-milk.json | 9 +- .../en-apple-estimated-nutrients.json | 2 + .../nutriscore/en-avocado-oil.json | 2 + .../nutriscore/en-beers-category.json | 3 +- .../nutriscore/en-cherry-tomatoes.json | 2 + .../nutriscore/en-milk.json | 13 ++- ...en-olive-oil-unrecognized-ingredients.json | 2 + .../nutriscore/en-olive-oil.json | 2 + ...orange-juice-category-and-ingredients.json | 9 +- .../nutriscore/en-orange-juice-category.json | 9 +- ...ategory-ingredients-with-lots-of-meat.json | 4 +- ...ous-category-ingredients-with-no-meat.json | 4 +- ...ory-ingredients-with-very-little-meat.json | 4 +- ...eat-ambiguous-category-no-ingredients.json | 4 +- .../en-red-meat-category-no-ingredients.json | 4 +- ...n-soy-beans-processed-and-unprocessed.json | 4 +- .../en-sugar-estimated-nutrients.json | 2 + .../nutriscore/en-sweeteners-erythritol.json | 22 ++--- .../nutriscore/en-sweeteners.json | 28 +++--- .../nutriscore/en-tofu.json | 4 +- .../nutriscore/en-vegetable-crisps.json | 4 +- .../flavored-spring-water-no-nutrition.json | 5 +- .../flavored-spring-with-nutrition.json | 11 +-- .../nutriscore/fr-canned-green-beans.json | 2 + .../nutriscore/fr-canned-pineapple.json | 2 + .../nutriscore/fr-coconut-milk.json | 2 + .../nutriscore/fr-gaspacho.json | 2 + .../nutriscore/fr-green-beans-beverage.json | 2 + .../nutriscore/fr-ice-tea-with-sweetener.json | 24 +++-- .../fr-mixed-oils-with-olive-oil.json | 2 + .../nutriscore/fr-orange-nectar-0-fat.json | 9 +- .../fr-plant-beverages-soy-milk.json | 9 +- .../nutriscore/fr-rapeseed-oil.json | 2 + .../nutriscore/milk.json | 9 +- .../nutriscore/mushrooms.json | 2 + .../nutriscore/spring-water-no-nutrition.json | 35 ++++--- .../sunflower-oil-no-sugar-no-sat-fat.json | 2 +- .../nutriscore/sunflower-oil-no-sugar.json | 2 +- .../nutriscore/sunflower-oil.json | 2 +- .../nutriscore/walnut-oil.json | 2 +- 142 files changed, 590 insertions(+), 362 deletions(-) diff --git a/docs/api/ref/schemas/product_ingredients.yaml b/docs/api/ref/schemas/product_ingredients.yaml index b3705886a54e6..a3a797e2e5b87 100644 --- a/docs/api/ref/schemas/product_ingredients.yaml +++ b/docs/api/ref/schemas/product_ingredients.yaml @@ -66,6 +66,14 @@ properties: type: string ingredients_percent_analysis: type: integer + ingredients_sweeteners_n: + type: integer + description: | + Number of sweeteners additives in the ingredients. Undefined if ingredients are not specified. + ingredients_non_nutritive_sweeteners_n: + type: integer + description: | + Number of non-nutritive sweeteners additives (as specified in the Nutri-Score formula) in the ingredients. Undefined if ingredients are not specified. ingredients_tags: type: array items: diff --git a/html/images/attributes/src/nutriscore-not-applicable-new-formula-en.svg b/html/images/attributes/src/nutriscore-not-applicable-new-formula-en.svg index 871c7e26a87c0..bcb9957425313 100644 --- a/html/images/attributes/src/nutriscore-not-applicable-new-formula-en.svg +++ b/html/images/attributes/src/nutriscore-not-applicable-new-formula-en.svg @@ -1,11 +1,4 @@ - diff --git a/html/images/attributes/src/nutriscore-not-applicable-new-formula-fr.svg b/html/images/attributes/src/nutriscore-not-applicable-new-formula-fr.svg index 871c7e26a87c0..bcb9957425313 100644 --- a/html/images/attributes/src/nutriscore-not-applicable-new-formula-fr.svg +++ b/html/images/attributes/src/nutriscore-not-applicable-new-formula-fr.svg @@ -1,11 +1,4 @@ - diff --git a/html/images/attributes/src/nutriscore-unknown-new-formula-en.svg b/html/images/attributes/src/nutriscore-unknown-new-formula-en.svg index 4b8e472d650d3..407614599c9e3 100644 --- a/html/images/attributes/src/nutriscore-unknown-new-formula-en.svg +++ b/html/images/attributes/src/nutriscore-unknown-new-formula-en.svg @@ -1,11 +1,4 @@ - diff --git a/html/images/attributes/src/nutriscore-unknown-new-formula-fr.svg b/html/images/attributes/src/nutriscore-unknown-new-formula-fr.svg index 4b8e472d650d3..407614599c9e3 100644 --- a/html/images/attributes/src/nutriscore-unknown-new-formula-fr.svg +++ b/html/images/attributes/src/nutriscore-unknown-new-formula-fr.svg @@ -1,11 +1,4 @@ - diff --git a/lib/ProductOpener/Display.pm b/lib/ProductOpener/Display.pm index 8df88a9702da5..46d0e53a32095 100644 --- a/lib/ProductOpener/Display.pm +++ b/lib/ProductOpener/Display.pm @@ -7394,8 +7394,6 @@ sub display_page ($request_ref) { sub display_image_box ($product_ref, $id, $minheight_ref) { - # print STDERR "display_image_box : $id\n"; - my $img = display_image($product_ref, $id, $small_size); if ($img ne '') { my $code = $product_ref->{code}; diff --git a/lib/ProductOpener/Food.pm b/lib/ProductOpener/Food.pm index 55ff691984b3b..d55f092514039 100644 --- a/lib/ProductOpener/Food.pm +++ b/lib/ProductOpener/Food.pm @@ -1390,6 +1390,10 @@ Differences with the 2021 version: =head4 $prepared - string contains either "" or "-prepared" +=head3 Return values + +Return undef if no value could be computed or estimated. + =cut sub compute_nutriscore_2023_fruits_vegetables_legumes ($product_ref, $prepared) { @@ -1601,11 +1605,7 @@ sub compute_nutriscore_data ($product_ref, $prepared, $nutriments_field, $versio salt => $nutriments_ref->{"salt" . $prepared . "_100g"}, fruits_vegetables_legumes => $fruits_vegetables_legumes, - fiber => ( - (defined $nutriments_ref->{"fiber" . $prepared . "_100g"}) - ? $nutriments_ref->{"fiber" . $prepared . "_100g"} - : 0 - ), + fiber => $nutriments_ref->{"fiber" . $prepared . "_100g"}, proteins => $nutriments_ref->{"proteins" . $prepared . "_100g"}, }; @@ -1621,9 +1621,7 @@ sub compute_nutriscore_data ($product_ref, $prepared, $nutriments_field, $versio } if ($is_beverage) { - if (defined $product_ref->{with_non_nutritive_sweeteners}) { - $nutriscore_data_ref->{with_non_nutritive_sweeteners} = $product_ref->{with_non_nutritive_sweeteners}; - } + $nutriscore_data_ref->{non_nutritive_sweeteners} = $product_ref->{ingredients_non_nutritive_sweeteners_n}; } } @@ -2227,7 +2225,6 @@ sub compute_serving_size_data ($product_ref) { my $unit = get_property("nutrients", "zz:$nid", "unit:en") ; # $unit will be undef if the nutrient is not in the taxonomy - print STDERR "nid: $nid - unit: $unit\n"; # If the nutrient has no unit (e.g. pH), or is a % (e.g. "% vol" for alcohol), it is the same regardless of quantity # otherwise we adjust the value for 100g diff --git a/lib/ProductOpener/Ingredients.pm b/lib/ProductOpener/Ingredients.pm index 926f373e4cb15..319a55638bfa0 100644 --- a/lib/ProductOpener/Ingredients.pm +++ b/lib/ProductOpener/Ingredients.pm @@ -6425,7 +6425,9 @@ sub preparse_ingredients_text ($ingredients_lc, $text) { sub extract_ingredients_classes_from_text ($product_ref) { - not defined $product_ref->{ingredients_text} and return; + if (not defined $product_ref->{ingredients_text}) { + return; + } my $ingredients_lc = $product_ref->{ingredients_lc} || $product_ref->{lc}; my $text = preparse_ingredients_text($ingredients_lc, $product_ref->{ingredients_text}); # do not match anything if we don't have a translation for "and" @@ -7060,43 +7062,60 @@ sub extract_ingredients_classes_from_text ($product_ref) { } # Determine if the product has sweeteners, and non nutritive sweeteners - determine_if_the_product_contains_sweeteners($product_ref); + count_sweeteners_and_non_nutritive_sweeteners($product_ref); return; } -=head2 determine_if_the_product_contains_sweeteners +=head2 count_sweeteners_and_non_nutritive_sweeteners Check if the product contains sweeteners and non nutritive sweeteners (used for the Nutri-Score for beverages) The NNS / Non nutritive sweeteners listed in the Nutri-Score Update report beverages_31 01 2023-voted have been added as a non_nutritive_sweetener:en:yes property in the additives taxonomy. +=head3 Return values + +The function sets the following fields in the product_ref hash. + +If there are no ingredients specified for the product, the fields are not set. + +=head4 ingredients_sweeteners_n + +=head4 ingredients_non_nutritive_sweeteners_n + =cut -sub determine_if_the_product_contains_sweeteners ($product_ref) { +sub count_sweeteners_and_non_nutritive_sweeteners ($product_ref) { + # Delete old fields, can be removed once all products have been reprocessed delete $product_ref->{with_sweeteners}; - delete $product_ref->{with_non_nutritive_sweeteners}; + delete $product_ref->{without_non_nutritive_sweeteners}; - if ( - get_matching_regexp_property_from_tags( - 'additives', $product_ref->{'additives_tags'}, - 'additives_classes:en', 'sweetener' - ) - ) - { - $product_ref->{with_sweeteners} = 1; + # Set the number of sweeteners only if the product has specified ingredients + if (not $product_ref->{ingredients_n}) { + delete $product_ref->{ingredients_sweeteners_n}; + delete $product_ref->{ingredients_non_nutritive_sweeteners_n}; } + else { - if ( - get_matching_regexp_property_from_tags( - 'additives', $product_ref->{'additives_tags'}, - 'non_nutritive_sweetener:en', 'yes' - ) - ) - { - $product_ref->{with_non_nutritive_sweeteners} = 1; + $product_ref->{ingredients_sweeteners_n} = 0; + $product_ref->{ingredients_non_nutritive_sweeteners_n} = 0; + + # Go through additives and check if the product contains sweeteners and non-nutritive sweeteners + if (defined $product_ref->{additives_tags}) { + foreach my $additive (@{$product_ref->{additives_tags}}) { + my $sweetener_property = get_inherited_property("additives", $additive, "sweetener:en") // ""; + if ($sweetener_property eq "yes") { + $product_ref->{ingredients_sweeteners_n}++; + } + my $non_nutritive_sweetener_property + = get_inherited_property("additives", $additive, "non_nutritive_sweetener:en") // ""; + if ($non_nutritive_sweetener_property eq "yes") { + $product_ref->{ingredients_non_nutritive_sweeteners_n}++; + } + } + } } return; diff --git a/lib/ProductOpener/KnowledgePanels.pm b/lib/ProductOpener/KnowledgePanels.pm index 66285776c00b9..ba5c572b179f9 100644 --- a/lib/ProductOpener/KnowledgePanels.pm +++ b/lib/ProductOpener/KnowledgePanels.pm @@ -900,51 +900,92 @@ sub create_nutriscore_2023_panel ($product_ref, $target_lc, $target_cc, $options # Nutri-Score panel my $grade = deep_get($product_ref, "nutriscore", $version, "grade"); + # Title if ($grade eq "not-applicable") { $panel_data_ref->{title} = lang_in_other_lc($target_lc, "attribute_nutriscore_not_applicable_title"); } else { $panel_data_ref->{title} = sprintf(lang_in_other_lc($target_lc, "attribute_nutriscore_grade_title"), uc($grade)); - if ($panel_data_ref->{nutriscore_unknown_reason_short}) { - $panel_data_ref->{subtitle} = $panel_data_ref->{nutriscore_unknown_reason_short}; - } - else { - $panel_data_ref->{subtitle} = lang_in_other_lc($target_lc, - "attribute_nutriscore_" . $panel_data_ref->{nutriscore_grade} . "_description_short"); - } } - # Nutri-Score sub-panels for each positive or negative component - foreach my $type (qw/positive negative/) { - my $components_ref = deep_get($product_ref, "nutriscore", $version, "data", "components", $type) // []; - foreach my $component_ref (@$components_ref) { - - my $component_panel_data_ref = { - "type" => $type, - "id" => $component_ref->{id}, - "value" => $component_ref->{value}, - "unit" => $component_ref->{unit}, - "points" => $component_ref->{points}, - "points_max" => $component_ref->{points_max}, - }; - create_panel_from_json_template( - "nutriscore_component_" . $component_ref->{id}, - "api/knowledge-panels/health/nutriscore/nutriscore_component.tt.json", - $component_panel_data_ref, $product_ref, $target_lc, $target_cc, $options_ref - ); + # Subtitle + if ($panel_data_ref->{nutriscore_unknown_reason_short}) { + $panel_data_ref->{subtitle} = $panel_data_ref->{nutriscore_unknown_reason_short}; + } + else { + $panel_data_ref->{subtitle} = lang_in_other_lc($target_lc, + "attribute_nutriscore_" . $panel_data_ref->{nutriscore_grade} . "_description_short"); + } + + # Nutri-Score computed + if (($grade ne "not-applicable") and ($grade ne "unknown")) { + + # Nutri-Score sub-panels for each positive or negative component + foreach my $type (qw/positive negative/) { + my $components_ref = deep_get($product_ref, "nutriscore", $version, "data", "components", $type) // []; + foreach my $component_ref (@$components_ref) { + + my $value = $component_ref->{value}; + + # Specify if there is a space between the value and the unit + my $space_before_unit = ''; + + my $unit = $component_ref->{unit}; + + # If the value is not defined (e.g. fiber or fruits_vegetables_legumes), display "unknown" with no unit + if (not defined $value) { + $value = lc(lang_in_other_lc($target_lc, "unknown")); + $unit = ''; + } + else { + # Localize the unit for the number of non-nutritive sweeteners + if ($component_ref->{id} eq "non_nutritive_sweeteners") { + $space_before_unit = ' '; + if ($value > 1) { + $unit = lang_in_other_lc($target_lc, "sweeteners"); + } + else { + $unit = lang_in_other_lc($target_lc, "sweetener"); + } + } + } + + my $component_panel_data_ref = { + "type" => $type, + "id" => $component_ref->{id}, + "value" => $value, + "unit" => $unit, + "space_before_unit" => $space_before_unit, + "points" => $component_ref->{points}, + "points_max" => $component_ref->{points_max}, + }; + create_panel_from_json_template( + "nutriscore_component_" . $component_ref->{id}, + "api/knowledge-panels/health/nutriscore/nutriscore_component.tt.json", + $component_panel_data_ref, + $product_ref, + $target_lc, + $target_cc, + $options_ref + ); + } + + create_panel_from_json_template("nutriscore_details", + "api/knowledge-panels/health/nutriscore/nutriscore_details.tt.json", + $panel_data_ref, $product_ref, $target_lc, $target_cc, $options_ref); } } - # Nutri-Score panel: score + # Nutri-Score panel: parent panel create_panel_from_json_template("nutriscore_2023", "api/knowledge-panels/health/nutriscore/nutriscore_2023.tt.json", $panel_data_ref, $product_ref, $target_lc, $target_cc, $options_ref); + + # Nutri-Score description create_panel_from_json_template("nutriscore_description", "api/knowledge-panels/health/nutriscore/nutriscore_description.tt.json", $panel_data_ref, $product_ref, $target_lc, $target_cc, $options_ref); - create_panel_from_json_template("nutriscore_details", - "api/knowledge-panels/health/nutriscore/nutriscore_details.tt.json", - $panel_data_ref, $product_ref, $target_lc, $target_cc, $options_ref); + return; } diff --git a/lib/ProductOpener/Numbers.pm b/lib/ProductOpener/Numbers.pm index 6ff18945256b9..7cb4e382e893a 100644 --- a/lib/ProductOpener/Numbers.pm +++ b/lib/ProductOpener/Numbers.pm @@ -158,14 +158,21 @@ sub convert_string_to_number ($value) { Round a number to a maximum number of decimal places. +Return undef if passed an undefined value. + =cut sub round_to_max_decimal_places ($value, $max_decimal_places) { - # Round to the maximum number of decimal places - my $rounded_value = sprintf("%.${max_decimal_places}f", $value); + my $return_value = undef; + + if (defined $value) { + + # Round to the maximum number of decimal places + $return_value = sprintf("%.${max_decimal_places}f", $value) + 0; + } - return $rounded_value + 0; + return $return_value; } 1; diff --git a/lib/ProductOpener/Nutriscore.pm b/lib/ProductOpener/Nutriscore.pm index 095fa2e77e289..b2405d16321dc 100644 --- a/lib/ProductOpener/Nutriscore.pm +++ b/lib/ProductOpener/Nutriscore.pm @@ -669,7 +669,7 @@ sub add_units_to_positive_and_negative_nutriscore_components ($nutriscore_data_r # Compute the unit. my $unit; if ($component_ref->{id} eq 'non_nutritive_sweeteners') { - $unit = undef; + $unit = 'number'; } elsif (($component_ref->{id} eq 'fruits_vegetables_legumes') or ($component_ref->{id} eq 'saturated_fat_ratio')) @@ -719,7 +719,6 @@ sub compute_nutriscore_score_2023 ($nutriscore_data_ref) { } foreach my $nutrient ($energy, "sugars", $saturated_fat, "salt", "fruits_vegetables_legumes", "fiber", "proteins") { - next if not defined $nutriscore_data_ref->{$nutrient}; my $nutrient_threshold_id = $nutrient; if ( (defined $nutriscore_data_ref->{is_beverage}) @@ -731,12 +730,15 @@ sub compute_nutriscore_score_2023 ($nutriscore_data_ref) { $nutriscore_data_ref->{$nutrient . "_points"} = 0; - foreach my $threshold (@{$points_thresholds_2023{$nutrient_threshold_id}}) { - # The saturated fat ratio table uses the greater or equal sign instead of greater - if ( (($nutrient eq "saturated_fat_ratio") and ($nutriscore_data_ref->{$nutrient} >= $threshold)) - or (($nutrient ne "saturated_fat_ratio") and ($nutriscore_data_ref->{$nutrient} > $threshold))) - { - $nutriscore_data_ref->{$nutrient . "_points"}++; + # If the nutrient value is defined, assign points according to the thresholds + if (defined $nutriscore_data_ref->{$nutrient}) { + foreach my $threshold (@{$points_thresholds_2023{$nutrient_threshold_id}}) { + # The saturated fat ratio table uses the greater or equal sign instead of greater + if ( (($nutrient eq "saturated_fat_ratio") and ($nutriscore_data_ref->{$nutrient} >= $threshold)) + or (($nutrient ne "saturated_fat_ratio") and ($nutriscore_data_ref->{$nutrient} > $threshold))) + { + $nutriscore_data_ref->{$nutrient . "_points"}++; + } } } @@ -769,14 +771,15 @@ sub compute_nutriscore_score_2023 ($nutriscore_data_ref) { # Beverages with non-nutritive sweeteners have 4 extra negative points if ($nutriscore_data_ref->{is_beverage}) { push @$negative_components, "non_nutritive_sweeteners"; - $nutriscore_data_ref->{non_nutritive_sweeteners_max} = 4; - if ($nutriscore_data_ref->{with_non_nutritive_sweeteners}) { + $nutriscore_data_ref->{non_nutritive_sweeteners_points_max} = 4; + # If we don't have ingredients, assume the product does not contain non-nutritive sweeteners + if ( (defined $nutriscore_data_ref->{non_nutritive_sweeteners}) + and ($nutriscore_data_ref->{non_nutritive_sweeteners} > 0)) + { $nutriscore_data_ref->{non_nutritive_sweeteners_points} = 4; - $nutriscore_data_ref->{non_nutritive_sweeteners} = "presence"; } else { $nutriscore_data_ref->{non_nutritive_sweeteners_points} = 0; - $nutriscore_data_ref->{non_nutritive_sweeteners} = "absence"; } } diff --git a/po/common/common.pot b/po/common/common.pot index f8f452382fade..11f7482922f07 100644 --- a/po/common/common.pot +++ b/po/common/common.pot @@ -6797,4 +6797,14 @@ msgstr "Consuming foods rich in fruits, vegetables and legumes reduces the risks msgctxt "nutrient_info_proteins_benefit" msgid "Foods that are rich in proteins are usually rich in calcium or iron which are essential minerals with numerous health benefits." -msgstr "Foods that are rich in proteins are usually rich in calcium or iron which are essential minerals with numerous health benefits." \ No newline at end of file +msgstr "Foods that are rich in proteins are usually rich in calcium or iron which are essential minerals with numerous health benefits." + +# sweeteners (additives), plural +msgctxt "sweeteners" +msgid "sweeteners" +msgstr "" + +# sweetener (additive), singular +msgctxt "sweetener" +msgid "sweetener" +msgstr "" \ No newline at end of file diff --git a/po/common/en.po b/po/common/en.po index cd61bb7923552..3d5e9790877c3 100644 --- a/po/common/en.po +++ b/po/common/en.po @@ -174,7 +174,7 @@ msgstr "Excess drinking is harmful for health." msgctxt "email_warning" msgid "Please note that your Pro account will only be valid if you use your professional e-mail address. Our moderation team checks that the domain name is consistent with the organisation you wish to join." -msgstr "" +msgstr "Please note that your Pro account will only be valid if you use your professional e-mail address. Our moderation team checks that the domain name is consistent with the organisation you wish to join." msgctxt "all_missions" msgid "All missions" @@ -879,7 +879,7 @@ msgstr "https://world.openbeautyfacts.org" msgctxt "footer_pro" msgid "Open Food Facts for Producers" -msgstr "" +msgstr "Open Food Facts for Producers" msgctxt "for" msgid "for" @@ -6683,7 +6683,7 @@ msgstr "Calories" msgctxt "nutriscore_component_energy_from_saturated_fat" msgid "Energy from saturated fat" -msgstr "" +msgstr "Energy from saturated fat" msgctxt "nutriscore_component_sugars" msgid "Sugars" @@ -6691,11 +6691,11 @@ msgstr "Sugar" msgctxt "nutriscore_component_saturated_fat" msgid "Saturated fat" -msgstr "" +msgstr "Saturated fat" msgctxt "nutriscore_component_saturated_fat_ratio" msgid "Saturated fat / fat" -msgstr "" +msgstr "Saturated fat / fat" msgctxt "nutriscore_component_salt" msgid "Salt" @@ -6703,11 +6703,11 @@ msgstr "Salt" msgctxt "nutriscore_component_non_nutritive_sweeteners" msgid "Non-nutritive sweeteners" -msgstr "" +msgstr "Non-nutritive sweeteners" msgctxt "nutriscore_component_fruits_vegetables_legumes" msgid "Fruits, vegetables and legumes" -msgstr "" +msgstr "Fruits, vegetables and legumes" msgctxt "nutriscore_component_fiber" msgid "Fiber" @@ -6719,75 +6719,75 @@ msgstr "Proteins" msgctxt "presence" msgid "Presence" -msgstr "" +msgstr "Presence" msgctxt "absence" msgid "Absence" -msgstr "" +msgstr "Absence" msgctxt "nutriscore_is_water" msgid "This product is considered to be water for the calculation of the Nutri-Score." -msgstr "" +msgstr "This product is considered to be water for the calculation of the Nutri-Score." msgctxt "nutriscore_is_fat_oil_nuts_seeds" msgid "This product is considered to be fat, oil, nuts or seeds for the calculation of the Nutri-Score." -msgstr "" +msgstr "This product is considered to be fat, oil, nuts or seeds for the calculation of the Nutri-Score." msgctxt "nutriscore_is_cheese" msgid "This product is considered to be cheese for the calculation of the Nutri-Score." -msgstr "" +msgstr "This product is considered to be cheese for the calculation of the Nutri-Score." msgctxt "nutriscore_is_red_meat_product" msgid "This product is considered to be a red meat product for the calculation of the Nutri-Score." -msgstr "" +msgstr "This product is considered to be a red meat product for the calculation of the Nutri-Score." msgctxt "nutriscore_count_proteins_reason_beverage" msgid "Points for proteins are counted because the product is considered to be a beverage." -msgstr "" +msgstr "Points for proteins are counted because the product is considered to be a beverage." msgctxt "nutriscore_count_proteins_reason_cheese" msgid "Points for proteins are counted because the product is considered to be cheese." -msgstr "" +msgstr "Points for proteins are counted because the product is considered to be cheese." msgctxt "nutriscore_count_proteins_reason_negative_points_less_than_7" msgid "Points for proteins are counted because the negative points are less than 7." -msgstr "" +msgstr "Points for proteins are counted because the negative points are less than 7." msgctxt "nutriscore_count_proteins_reason_negative_points_less_than_11" msgid "Points for proteins are counted because the negative points are less than 11." -msgstr "" +msgstr "Points for proteins are counted because the negative points are less than 11." msgctxt "nutriscore_count_proteins_reason_negative_points_greater_than_or_equal_to_7" msgid "Points for proteins are not counted because the negative points greater than or equal to 7." -msgstr "" +msgstr "Points for proteins are not counted because the negative points greater than or equal to 7." msgctxt "nutriscore_count_proteins_reason_negative_points_greater_than_or_equal_to_11" msgid "Points for proteins are not counted because the negative points greater than or equal to 11." -msgstr "" +msgstr "Points for proteins are not counted because the negative points greater than or equal to 11." msgctxt "nutriscore_explanation_what_it_is" msgid "The Nutri-Score is a logo on the overall nutritional quality of products." -msgstr "" +msgstr "The Nutri-Score is a logo on the overall nutritional quality of products." msgctxt "nutriscore_explanation_what_it_takes_into_account" msgid "The score from A to E is calculated based on nutrients and foods to favor (proteins, fiber, fruits, vegetables and legumes ...) and nutrients to limit (calories, saturated fat, sugars, salt)." -msgstr "" +msgstr "The score from A to E is calculated based on nutrients and foods to favor (proteins, fiber, fruits, vegetables and legumes ...) and nutrients to limit (calories, saturated fat, sugars, salt)." msgctxt "nutriscore_explanation_where_the_data_comes_from" msgid "The score is calculated from the data of the nutrition facts table and the composition data (fruits, vegetables and legumes)." -msgstr "" +msgstr "The score is calculated from the data of the nutrition facts table and the composition data (fruits, vegetables and legumes)." msgctxt "nutriscore_explanation_recommended_by_public_health_authorities" msgid "The display of this logo is recommended by public health authorities without obligation for companies." -msgstr "" +msgstr "The display of this logo is recommended by public health authorities without obligation for companies." msgctxt "nutriscore_explanation_title" msgid "What is the Nutri-Score?" -msgstr "" +msgstr "What is the Nutri-Score?" msgctxt "nutrient_info_energy_risk" msgid "Energy intakes above energy requirements are associated with increased risks of weight gain, overweight, obesity, and consequently risk of diet-related chronic diseases." -msgstr "" +msgstr "Energy intakes above energy requirements are associated with increased risks of weight gain, overweight, obesity, and consequently risk of diet-related chronic diseases." msgctxt "nutrient_info_saturated_fat_risk" msgid "A high consumption of fat, especially saturated fats, can raise cholesterol, which increases the risk of heart diseases." @@ -6803,17 +6803,26 @@ msgstr "A high consumption of fat, especially saturated fats, can raise choleste msgctxt "nutrient_info_non_nutritive_sweeteners_risk" msgid "Non-nutritive sweeteners may not confer any long-term benefit in reducing body fat in adults or children. There may be potential undesirable effects from long-term use of non-nutritive sweeteners, such as an increased risk of type 2 diabetes and cardiovascular diseases in adults." -msgstr "" +msgstr "Non-nutritive sweeteners may not confer any long-term benefit in reducing body fat in adults or children. There may be potential undesirable effects from long-term use of non-nutritive sweeteners, such as an increased risk of type 2 diabetes and cardiovascular diseases in adults." msgctxt "nutrient_info_fiber_benefit" msgid "Consuming foods rich in fiber (especially whole grain foods) reduces the risks of aerodigestive cancers, cardiovascular diseases, obesity and diabetes." -msgstr "" +msgstr "Consuming foods rich in fiber (especially whole grain foods) reduces the risks of aerodigestive cancers, cardiovascular diseases, obesity and diabetes." msgctxt "nutrient_info_fruits_vegetables_legumes_benefit" msgid "Consuming foods rich in fruits, vegetables and legumes reduces the risks of aerodigestive cancers, cardiovascular diseases, obesity and diabetes." -msgstr "" +msgstr "Consuming foods rich in fruits, vegetables and legumes reduces the risks of aerodigestive cancers, cardiovascular diseases, obesity and diabetes." msgctxt "nutrient_info_proteins_benefit" msgid "Foods that are rich in proteins are usually rich in calcium or iron which are essential minerals with numerous health benefits." -msgstr "" +msgstr "Foods that are rich in proteins are usually rich in calcium or iron which are essential minerals with numerous health benefits." + +# sweeteners (additives), plural +msgctxt "sweeteners" +msgid "sweeteners" +msgstr "sweeteners" +# sweetener (additive), singular +msgctxt "sweetener" +msgid "sweetener" +msgstr "sweetener" \ No newline at end of file diff --git a/po/common/fr.po b/po/common/fr.po index e0254d36e3448..301af3ee8e560 100644 --- a/po/common/fr.po +++ b/po/common/fr.po @@ -6819,3 +6819,12 @@ msgctxt "nutrient_info_proteins_benefit" msgid "Foods that are rich in proteins are usually rich in calcium or iron which are essential minerals with numerous health benefits." msgstr "Les aliments riches en protéines sont généralement riches en calcium ou en fer, des minéraux essentiels aux nombreux bienfaits pour la santé." +# sweeteners (additives), plural +msgctxt "sweeteners" +msgid "sweeteners" +msgstr "édulcorants" + +# sweetener (additive), singular +msgctxt "sweetener" +msgid "sweetener" +msgstr "édulcorant" \ No newline at end of file diff --git a/scripts/images/gen_svg_images_for_nutriscore_new_formula.pl b/scripts/images/gen_svg_images_for_nutriscore_new_formula.pl index 9f88a0e6968ee..25f5b6d002767 100755 --- a/scripts/images/gen_svg_images_for_nutriscore_new_formula.pl +++ b/scripts/images/gen_svg_images_for_nutriscore_new_formula.pl @@ -172,7 +172,9 @@ =head1 DESCRIPTION $line =~ s/height="130"/height="162"/; $line =~ s/viewBox="0 0 240 130"/viewBox="0 0 240 162"/; print $fh2 $line; - print $fh2 $new_formula_below; + if ($file !~ /unknown|not-applicable/) { + print $fh2 $new_formula_below; + } } elsif ($line =~ /<\/svg>/) { # No banner for not-applicable / unknown diff --git a/templates/api/knowledge-panels/health/nutriscore/nutriscore_2023.tt.json b/templates/api/knowledge-panels/health/nutriscore/nutriscore_2023.tt.json index 3f5d06bfaf086..139a31440808b 100644 --- a/templates/api/knowledge-panels/health/nutriscore/nutriscore_2023.tt.json +++ b/templates/api/knowledge-panels/health/nutriscore/nutriscore_2023.tt.json @@ -6,7 +6,9 @@ "title_element": { "icon_url": "[% static_subdomain %]/images/attributes/dist/nutriscore-[% panel.nutriscore_grade %]-new-formula-[% IF lc == "fr" %][% lc %][% ELSE %]en[% END %].svg", "title": "[% panel.title %]", + [% IF panel.subtitle %] "subtitle": "[% panel.subtitle %]", + [% END %] "type": "grade", "grade": "[% panel.nutriscore_grade %]", }, @@ -19,7 +21,7 @@ }, }, // Display actions if we are missing data to compute the Nutri-Score - [% IF panel.nutriscore_unknown_reason %] + [% IF panel.nutriscore_unknown_reason == "missing_category" OR panel.nutriscore_unknown_reason == "missing_nutrition_data" OR panel.nutriscore_unknown_reason == "missing_category_and_nutrition_data" %] { "element_type": "action", "action_element": { @@ -38,6 +40,7 @@ }, [% END %] // Start with negative points first, as the positive points depend on negative points + [% IF product.nutriscore.2023.data.components.negative.size > 0 %] { "element_type": "panel_group", "panel_group_element": { @@ -52,7 +55,10 @@ [% END %] ], }, - }, + }, + [% END %] + // Positive points + [% IF product.nutriscore.2023.data.components.positive.size > 0 %] { "element_type": "panel_group", "panel_group_element": { @@ -68,12 +74,15 @@ ], }, }, + [% END %] // Details of the computation of the Nutri-Score + [% IF panels.nutriscore_details.defined %] { "element_type": "panel", "panel_element": { "panel_id": "nutriscore_details", }, }, + [% END %] ] } diff --git a/templates/api/knowledge-panels/health/nutriscore/nutriscore_component.tt.json b/templates/api/knowledge-panels/health/nutriscore/nutriscore_component.tt.json index 4b33521da5f22..f7b34298da99f 100644 --- a/templates/api/knowledge-panels/health/nutriscore/nutriscore_component.tt.json +++ b/templates/api/knowledge-panels/health/nutriscore/nutriscore_component.tt.json @@ -7,7 +7,7 @@ "title_element": { "icon_url": "[% static_subdomain %]/images/attributes/dist/points-[% panel.type %]-[% panel.points %]-[% panel.points_max %].svg", "title": "[% lang("nutriscore_component_" _ panel.id) %]", - "subtitle": "[% panel.points %]/[% panel.points_max %] points ([% panel.value %][% panel.unit %])", + "subtitle": "[% panel.points %]/[% panel.points_max %] points ([% panel.value %][% panel.space_before_unit %][% panel.unit %])", }, "elements": [ diff --git a/tests/integration/expected_test_results/api_v2_product_read/get-existing-product.json b/tests/integration/expected_test_results/api_v2_product_read/get-existing-product.json index 02eeb5d7cfba3..6e8060045faaa 100644 --- a/tests/integration/expected_test_results/api_v2_product_read/get-existing-product.json +++ b/tests/integration/expected_test_results/api_v2_product_read/get-existing-product.json @@ -659,6 +659,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -666,6 +667,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v2_product_read/get-fields-all-knowledge-panels.json b/tests/integration/expected_test_results/api_v2_product_read/get-fields-all-knowledge-panels.json index 8141594e139d5..5e14b5b4bf435 100644 --- a/tests/integration/expected_test_results/api_v2_product_read/get-fields-all-knowledge-panels.json +++ b/tests/integration/expected_test_results/api_v2_product_read/get-fields-all-knowledge-panels.json @@ -659,6 +659,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -666,6 +667,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v2_product_read/get-fields-all.json b/tests/integration/expected_test_results/api_v2_product_read/get-fields-all.json index 02eeb5d7cfba3..6e8060045faaa 100644 --- a/tests/integration/expected_test_results/api_v2_product_read/get-fields-all.json +++ b/tests/integration/expected_test_results/api_v2_product_read/get-fields-all.json @@ -659,6 +659,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -666,6 +667,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v2_product_read/get-fields-attribute-groups-all-knowledge-panels.json b/tests/integration/expected_test_results/api_v2_product_read/get-fields-attribute-groups-all-knowledge-panels.json index cb3c2eaa6b8a6..f12e073fd7d34 100644 --- a/tests/integration/expected_test_results/api_v2_product_read/get-fields-attribute-groups-all-knowledge-panels.json +++ b/tests/integration/expected_test_results/api_v2_product_read/get-fields-attribute-groups-all-knowledge-panels.json @@ -1307,6 +1307,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -1314,6 +1315,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v2_product_read/get-fields-raw.json b/tests/integration/expected_test_results/api_v2_product_read/get-fields-raw.json index d567612ea3675..c89ef04781dac 100644 --- a/tests/integration/expected_test_results/api_v2_product_read/get-fields-raw.json +++ b/tests/integration/expected_test_results/api_v2_product_read/get-fields-raw.json @@ -654,6 +654,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -661,6 +662,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v2_product_write/get-product-auth-good-password.json b/tests/integration/expected_test_results/api_v2_product_write/get-product-auth-good-password.json index 832365b9766ce..2dbfb317de4af 100644 --- a/tests/integration/expected_test_results/api_v2_product_write/get-product-auth-good-password.json +++ b/tests/integration/expected_test_results/api_v2_product_write/get-product-auth-good-password.json @@ -589,6 +589,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:wheat-flour", "en:water", @@ -596,6 +597,7 @@ "en:sugar" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:wheat-flour", "en:cereal", @@ -811,7 +813,7 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 0, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/integration/expected_test_results/api_v2_product_write/get-product-ingredients-text-without-language.json b/tests/integration/expected_test_results/api_v2_product_write/get-product-ingredients-text-without-language.json index 511a27cd8f75f..9d2105f4cde2e 100644 --- a/tests/integration/expected_test_results/api_v2_product_write/get-product-ingredients-text-without-language.json +++ b/tests/integration/expected_test_results/api_v2_product_write/get-product-ingredients-text-without-language.json @@ -407,11 +407,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:pork-meat", "en:salt" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:pork-meat", "en:animal", diff --git a/tests/integration/expected_test_results/api_v2_product_write/get-product.json b/tests/integration/expected_test_results/api_v2_product_write/get-product.json index f424588d7b4c7..717b94e477ce5 100644 --- a/tests/integration/expected_test_results/api_v2_product_write/get-product.json +++ b/tests/integration/expected_test_results/api_v2_product_write/get-product.json @@ -589,6 +589,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:wheat-flour", "en:water", @@ -596,6 +597,7 @@ "en:sugar" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:wheat-flour", "en:cereal", @@ -809,7 +811,7 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 0, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-ai-data-str.json b/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-ai-data-str.json index 49709d6880e4e..dec42767cc998 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-ai-data-str.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-ai-data-str.json @@ -661,6 +661,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -668,6 +669,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-caret.json b/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-caret.json index 07ce2a735c2e8..d46d85c7e3bc3 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-caret.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-caret.json @@ -661,6 +661,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -668,6 +669,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-data-uri.json b/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-data-uri.json index 07ce2a735c2e8..d46d85c7e3bc3 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-data-uri.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-data-uri.json @@ -661,6 +661,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -668,6 +669,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-fnc1.json b/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-fnc1.json index 49709d6880e4e..dec42767cc998 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-fnc1.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-fnc1.json @@ -661,6 +661,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -668,6 +669,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-gs.json b/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-gs.json index 07ce2a735c2e8..d46d85c7e3bc3 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-gs.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-existing-product-gs1-gs.json @@ -661,6 +661,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -668,6 +669,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-existing-product.json b/tests/integration/expected_test_results/api_v3_product_read/get-existing-product.json index 2a663a72ce8b0..e4f5cfb620040 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-existing-product.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-existing-product.json @@ -661,6 +661,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -668,6 +669,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-fields-all-knowledge-panels.json b/tests/integration/expected_test_results/api_v3_product_read/get-fields-all-knowledge-panels.json index 2cbc9d50705a6..a5bcf5aa3c81e 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-fields-all-knowledge-panels.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-fields-all-knowledge-panels.json @@ -661,6 +661,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -668,6 +669,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-fields-all.json b/tests/integration/expected_test_results/api_v3_product_read/get-fields-all.json index c94d1244c7bd0..c2ecc59306364 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-fields-all.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-fields-all.json @@ -661,6 +661,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -668,6 +669,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-fields-attribute-groups-all-knowledge-panels.json b/tests/integration/expected_test_results/api_v3_product_read/get-fields-attribute-groups-all-knowledge-panels.json index 662da2a1efdc5..a243b5ecb0a63 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-fields-attribute-groups-all-knowledge-panels.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-fields-attribute-groups-all-knowledge-panels.json @@ -1309,6 +1309,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -1316,6 +1317,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v3_product_read/get-fields-raw.json b/tests/integration/expected_test_results/api_v3_product_read/get-fields-raw.json index 3fbd9b7cebb46..e1422e7151b6e 100644 --- a/tests/integration/expected_test_results/api_v3_product_read/get-fields-raw.json +++ b/tests/integration/expected_test_results/api_v3_product_read/get-fields-raw.json @@ -656,6 +656,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -663,6 +664,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/api_v3_product_write/patch-request-fields-all.json b/tests/integration/expected_test_results/api_v3_product_write/patch-request-fields-all.json index fde972ff2f308..d273cee42e656 100644 --- a/tests/integration/expected_test_results/api_v3_product_write/patch-request-fields-all.json +++ b/tests/integration/expected_test_results/api_v3_product_write/patch-request-fields-all.json @@ -402,8 +402,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/carrefour-images/products/3560070167470.json b/tests/integration/expected_test_results/convert_and_import_excel_file/carrefour-images/products/3560070167470.json index a56003ba3e1dd..097dd2544d036 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/carrefour-images/products/3560070167470.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/carrefour-images/products/3560070167470.json @@ -501,8 +501,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/carrefour-images/products/3560070815746.json b/tests/integration/expected_test_results/convert_and_import_excel_file/carrefour-images/products/3560070815746.json index f91991d750e85..decf6467e1335 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/carrefour-images/products/3560070815746.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/carrefour-images/products/3560070815746.json @@ -539,8 +539,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390017165.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390017165.json index 4cda461127d51..e314641f299a2 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390017165.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390017165.json @@ -448,8 +448,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390020745.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390020745.json index 4c0557be0a5d5..fe7f3a936e644 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390020745.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390020745.json @@ -445,8 +445,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390020806.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390020806.json index 34971bc5db255..e0a313882599e 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390020806.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390020806.json @@ -434,8 +434,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390020998.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390020998.json index 9445eca0e4117..dfdebeac5cd19 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390020998.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390020998.json @@ -448,8 +448,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021001.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021001.json index bfd281c40441a..cc951b10092ab 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021001.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021001.json @@ -442,8 +442,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021469.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021469.json index 197bef122887d..8f99b6890d59f 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021469.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021469.json @@ -439,8 +439,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021544.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021544.json index 52d5915354cd7..cbfb15edddd8b 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021544.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021544.json @@ -442,8 +442,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021568.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021568.json index f277f1f6975fc..0a38698878c00 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021568.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021568.json @@ -440,8 +440,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021926.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021926.json index 8bd5f3fad7cf5..2666f4a7156f9 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021926.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390021926.json @@ -432,8 +432,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024781.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024781.json index 3561231c8b7ce..9ddc2689f8b60 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024781.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024781.json @@ -467,8 +467,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024804.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024804.json index 69481be3ac0a2..bdcdbd59856d0 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024804.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024804.json @@ -456,8 +456,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024842.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024842.json index 6e85a32cee409..9234a47ae21e9 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024842.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024842.json @@ -457,8 +457,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024866.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024866.json index 6fd75d781b75f..7fdc9e8428e15 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024866.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390024866.json @@ -457,8 +457,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390025399.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390025399.json index c7dccaf0a5992..e4f9a216f2c57 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390025399.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390025399.json @@ -449,8 +449,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390025863.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390025863.json index ee1ce8f38111c..f1c5743a1880d 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390025863.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390025863.json @@ -431,8 +431,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390026044.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390026044.json index 2a9179785524c..a2f4f31578e76 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390026044.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390026044.json @@ -453,8 +453,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390026648.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390026648.json index 85ce702fda54d..46c324f6fb267 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390026648.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390026648.json @@ -468,8 +468,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390026754.json b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390026754.json index ff13b8f588600..f5ce700a7dc80 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390026754.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/packagings-mousquetaires/products/3250390026754.json @@ -450,8 +450,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/3270190128403.json b/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/3270190128403.json index cfddf0d5c0d00..e14a888079537 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/3270190128403.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/3270190128403.json @@ -664,10 +664,12 @@ "1", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:green-lentils" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:green-lentils", "en:vegetable", @@ -874,7 +876,7 @@ "data" : { "energy" : 1409, "fat" : null, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 100, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/4270190128403.json b/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/4270190128403.json index 0c72c32221db0..3fffac7cc0fe4 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/4270190128403.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/4270190128403.json @@ -406,11 +406,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "fr:white-peaches", "fr:high-fructose-corn-syrup" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "fr:white-peaches", "fr:high-fructose-corn-syrup" @@ -524,7 +526,7 @@ "category_available" : 1, "data" : { "energy" : 500, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 0, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/5270190128403.json b/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/5270190128403.json index d6e05aa0ed3ab..b2f5feb115ef5 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/5270190128403.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/5270190128403.json @@ -378,10 +378,12 @@ "1", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:banana" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:banana", "en:fruit" diff --git a/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/7270190128403.json b/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/7270190128403.json index a468445b004a0..64c964a82e19c 100644 --- a/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/7270190128403.json +++ b/tests/integration/expected_test_results/convert_and_import_excel_file/test/products/7270190128403.json @@ -419,8 +419,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006001.json b/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006001.json index 30f7f39e2ca9c..a8c6cbf32595c 100644 --- a/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006001.json +++ b/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006001.json @@ -619,8 +619,8 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006002.json b/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006002.json index 4edb90988f515..229725d6c3869 100644 --- a/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006002.json +++ b/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006002.json @@ -432,8 +432,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006003.json b/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006003.json index aea8b174a5d58..acb17a08da118 100644 --- a/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006003.json +++ b/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006003.json @@ -427,8 +427,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006004.json b/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006004.json index add16cc7c982b..9509862975815 100644 --- a/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006004.json +++ b/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006004.json @@ -643,8 +643,8 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006005.json b/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006005.json index d5a76b9c8039a..b2b23b1558c66 100644 --- a/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006005.json +++ b/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006005.json @@ -442,8 +442,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006006.json b/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006006.json index 68e4a6aba10d6..546cd187d7844 100644 --- a/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006006.json +++ b/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006006.json @@ -435,8 +435,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006007.json b/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006007.json index 4e3e34b1e9150..19e18235d46ad 100644 --- a/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006007.json +++ b/tests/integration/expected_test_results/import_csv_file/replace_existing_values/3003004006007.json @@ -429,8 +429,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/import_csv_file/test/2003004006001.json b/tests/integration/expected_test_results/import_csv_file/test/2003004006001.json index e6ca660abf32e..89eb39e14e24a 100644 --- a/tests/integration/expected_test_results/import_csv_file/test/2003004006001.json +++ b/tests/integration/expected_test_results/import_csv_file/test/2003004006001.json @@ -613,8 +613,8 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/import_csv_file/test/2003004006002.json b/tests/integration/expected_test_results/import_csv_file/test/2003004006002.json index 5d7c2e3b93b36..01c49b2ddd748 100644 --- a/tests/integration/expected_test_results/import_csv_file/test/2003004006002.json +++ b/tests/integration/expected_test_results/import_csv_file/test/2003004006002.json @@ -424,8 +424,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/import_csv_file/test/2003004006003.json b/tests/integration/expected_test_results/import_csv_file/test/2003004006003.json index df348c8204fb6..0e2792c749cf3 100644 --- a/tests/integration/expected_test_results/import_csv_file/test/2003004006003.json +++ b/tests/integration/expected_test_results/import_csv_file/test/2003004006003.json @@ -427,8 +427,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/import_csv_file/test/2003004006004.json b/tests/integration/expected_test_results/import_csv_file/test/2003004006004.json index 276d18d8ed395..4f6500149dd48 100644 --- a/tests/integration/expected_test_results/import_csv_file/test/2003004006004.json +++ b/tests/integration/expected_test_results/import_csv_file/test/2003004006004.json @@ -606,8 +606,8 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/import_csv_file/test/2003004006005.json b/tests/integration/expected_test_results/import_csv_file/test/2003004006005.json index c3fb6e30e6e8b..c800e616a75bb 100644 --- a/tests/integration/expected_test_results/import_csv_file/test/2003004006005.json +++ b/tests/integration/expected_test_results/import_csv_file/test/2003004006005.json @@ -434,8 +434,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/import_csv_file/test/2003004006006.json b/tests/integration/expected_test_results/import_csv_file/test/2003004006006.json index eb8344ac5f760..455e314b74d0b 100644 --- a/tests/integration/expected_test_results/import_csv_file/test/2003004006006.json +++ b/tests/integration/expected_test_results/import_csv_file/test/2003004006006.json @@ -433,8 +433,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/import_csv_file/test/2003004006007.json b/tests/integration/expected_test_results/import_csv_file/test/2003004006007.json index 0ad9c8449f4de..d3a9c33284ba1 100644 --- a/tests/integration/expected_test_results/import_csv_file/test/2003004006007.json +++ b/tests/integration/expected_test_results/import_csv_file/test/2003004006007.json @@ -429,8 +429,8 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/integration/expected_test_results/protected_product/get-edited-protected-product-api-v2-moderator.json b/tests/integration/expected_test_results/protected_product/get-edited-protected-product-api-v2-moderator.json index 549c55c68c655..7ee8f2af85fba 100644 --- a/tests/integration/expected_test_results/protected_product/get-edited-protected-product-api-v2-moderator.json +++ b/tests/integration/expected_test_results/protected_product/get-edited-protected-product-api-v2-moderator.json @@ -507,6 +507,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -514,6 +515,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -738,7 +740,7 @@ "category_available" : 1, "data" : { "energy" : 10, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 62.5, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/integration/expected_test_results/protected_product/get-edited-protected-product-api-v2.json b/tests/integration/expected_test_results/protected_product/get-edited-protected-product-api-v2.json index 0d7fa01524d06..aaebca263bc82 100644 --- a/tests/integration/expected_test_results/protected_product/get-edited-protected-product-api-v2.json +++ b/tests/integration/expected_test_results/protected_product/get-edited-protected-product-api-v2.json @@ -508,6 +508,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -515,6 +516,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -733,7 +735,7 @@ "category_available" : 1, "data" : { "energy" : 10, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 62.5, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/integration/expected_test_results/protected_product/get-edited-protected-product-web-form-moderator.json b/tests/integration/expected_test_results/protected_product/get-edited-protected-product-web-form-moderator.json index 0fca9b3a1bb2e..02c5681116499 100644 --- a/tests/integration/expected_test_results/protected_product/get-edited-protected-product-web-form-moderator.json +++ b/tests/integration/expected_test_results/protected_product/get-edited-protected-product-web-form-moderator.json @@ -511,6 +511,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -518,6 +519,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -742,7 +744,7 @@ "category_available" : 1, "data" : { "energy" : 10, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 62.5, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/integration/expected_test_results/protected_product/get-edited-protected-product-web-form.json b/tests/integration/expected_test_results/protected_product/get-edited-protected-product-web-form.json index 16749e4ff2f0d..43039aa153d6b 100644 --- a/tests/integration/expected_test_results/protected_product/get-edited-protected-product-web-form.json +++ b/tests/integration/expected_test_results/protected_product/get-edited-protected-product-web-form.json @@ -512,6 +512,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -519,6 +520,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -737,7 +739,7 @@ "category_available" : 1, "data" : { "energy" : 10, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 62.5, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/integration/expected_test_results/protected_product/get-edited-unprotected-product-api-v2.json b/tests/integration/expected_test_results/protected_product/get-edited-unprotected-product-api-v2.json index c86abc60a6e57..08790b537314f 100644 --- a/tests/integration/expected_test_results/protected_product/get-edited-unprotected-product-api-v2.json +++ b/tests/integration/expected_test_results/protected_product/get-edited-unprotected-product-api-v2.json @@ -505,6 +505,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -512,6 +513,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -736,7 +738,7 @@ "category_available" : 1, "data" : { "energy" : 10, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 62.5, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/integration/expected_test_results/protected_product/get-edited-unprotected-product-web-form.json b/tests/integration/expected_test_results/protected_product/get-edited-unprotected-product-web-form.json index ba05c5fd9c5c4..89fd7762a79ff 100644 --- a/tests/integration/expected_test_results/protected_product/get-edited-unprotected-product-web-form.json +++ b/tests/integration/expected_test_results/protected_product/get-edited-unprotected-product-web-form.json @@ -509,6 +509,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -516,6 +517,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -740,7 +742,7 @@ "category_available" : 1, "data" : { "energy" : 10, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 62.5, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/integration/expected_test_results/search_v1/search-no-filter.json b/tests/integration/expected_test_results/search_v1/search-no-filter.json index 6dd59de559c71..b24dc07ee90b2 100644 --- a/tests/integration/expected_test_results/search_v1/search-no-filter.json +++ b/tests/integration/expected_test_results/search_v1/search-no-filter.json @@ -484,6 +484,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -491,6 +492,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -1310,11 +1312,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:fruit", "en:rice" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:fruit", "en:rice" @@ -1424,7 +1428,7 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 75, "is_beverage" : 0, "is_cheese" : 0, @@ -1979,12 +1983,14 @@ "3", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", "en:egg" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -2785,12 +2791,14 @@ "3", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:water", "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -3731,11 +3739,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:water" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -4705,11 +4715,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:water" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/search_v1/search-tags-categories-without-ingredients-from-palm-oil.json b/tests/integration/expected_test_results/search_v1/search-tags-categories-without-ingredients-from-palm-oil.json index 5e5ee45722475..e87ad2a94cf92 100644 --- a/tests/integration/expected_test_results/search_v1/search-tags-categories-without-ingredients-from-palm-oil.json +++ b/tests/integration/expected_test_results/search_v1/search-tags-categories-without-ingredients-from-palm-oil.json @@ -564,11 +564,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:water" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -1538,11 +1540,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:water" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/integration/expected_test_results/search_v1/search-without-ingredients-from-palm-oil.json b/tests/integration/expected_test_results/search_v1/search-without-ingredients-from-palm-oil.json index 6dd59de559c71..b24dc07ee90b2 100644 --- a/tests/integration/expected_test_results/search_v1/search-without-ingredients-from-palm-oil.json +++ b/tests/integration/expected_test_results/search_v1/search-without-ingredients-from-palm-oil.json @@ -484,6 +484,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", @@ -491,6 +492,7 @@ "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -1310,11 +1312,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:fruit", "en:rice" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:fruit", "en:rice" @@ -1424,7 +1428,7 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 75, "is_beverage" : 0, "is_cheese" : 0, @@ -1979,12 +1983,14 @@ "3", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:milk", "en:egg" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -2785,12 +2791,14 @@ "3", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:water", "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -3731,11 +3739,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:water" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", @@ -4705,11 +4715,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple", "en:water" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/unit/expected_test_results/attributes/en-attributes.json b/tests/unit/expected_test_results/attributes/en-attributes.json index afe8e48a93d54..49118ffe0578f 100644 --- a/tests/unit/expected_test_results/attributes/en-attributes.json +++ b/tests/unit/expected_test_results/attributes/en-attributes.json @@ -1014,6 +1014,7 @@ "11", "11-20" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:wheat-flour", "en:sugar", @@ -1028,6 +1029,7 @@ "en:e120" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:wheat-flour", "en:cereal", diff --git a/tests/unit/expected_test_results/attributes/en-ecoscore-score-at-20-threshold.json b/tests/unit/expected_test_results/attributes/en-ecoscore-score-at-20-threshold.json index 1646163273332..909fe9feac391 100644 --- a/tests/unit/expected_test_results/attributes/en-ecoscore-score-at-20-threshold.json +++ b/tests/unit/expected_test_results/attributes/en-ecoscore-score-at-20-threshold.json @@ -854,8 +854,8 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/unit/expected_test_results/attributes/en-maybe-vegan.json b/tests/unit/expected_test_results/attributes/en-maybe-vegan.json index fda9eb1d02c06..e17f8a9e4bf20 100644 --- a/tests/unit/expected_test_results/attributes/en-maybe-vegan.json +++ b/tests/unit/expected_test_results/attributes/en-maybe-vegan.json @@ -691,12 +691,14 @@ "3", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:tapioca", "en:palm-oil", "en:enzyme" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:tapioca", "en:starch", @@ -801,7 +803,7 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 0, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/unit/expected_test_results/attributes/en-no-ingredients.json b/tests/unit/expected_test_results/attributes/en-no-ingredients.json index 69f8386c986c2..0c73485e65154 100644 --- a/tests/unit/expected_test_results/attributes/en-no-ingredients.json +++ b/tests/unit/expected_test_results/attributes/en-no-ingredients.json @@ -849,8 +849,8 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 1, "is_fat_oil_nuts_seeds" : 0, diff --git a/tests/unit/expected_test_results/attributes/en-nova-groups-markers.json b/tests/unit/expected_test_results/attributes/en-nova-groups-markers.json index c185833b664e6..36652a182dc4f 100644 --- a/tests/unit/expected_test_results/attributes/en-nova-groups-markers.json +++ b/tests/unit/expected_test_results/attributes/en-nova-groups-markers.json @@ -907,6 +907,7 @@ "7", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:cow-s-milk", "en:salt", @@ -917,6 +918,7 @@ "en:high-fructose-corn-syrup" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:cow-s-milk", "en:dairy", @@ -1067,7 +1069,7 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 0, "is_beverage" : 0, "is_cheese" : 1, diff --git a/tests/unit/expected_test_results/attributes/en-nutriscore.json b/tests/unit/expected_test_results/attributes/en-nutriscore.json index 66fa55ad3f3b1..56969401542ce 100644 --- a/tests/unit/expected_test_results/attributes/en-nutriscore.json +++ b/tests/unit/expected_test_results/attributes/en-nutriscore.json @@ -817,10 +817,12 @@ "1", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:fruit" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:fruit" ], diff --git a/tests/unit/expected_test_results/attributes/en-unknown-ingredients.json b/tests/unit/expected_test_results/attributes/en-unknown-ingredients.json index 2ce3f73e381ee..cf2b45f00b3bc 100644 --- a/tests/unit/expected_test_results/attributes/en-unknown-ingredients.json +++ b/tests/unit/expected_test_results/attributes/en-unknown-ingredients.json @@ -825,10 +825,12 @@ "1", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:some-ingredient-that-we-do-not-recognize" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:some-ingredient-that-we-do-not-recognize" ], @@ -918,7 +920,7 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 0, "is_beverage" : 0, "is_cheese" : 1, diff --git a/tests/unit/expected_test_results/attributes/fr-palm-kernel-fat.json b/tests/unit/expected_test_results/attributes/fr-palm-kernel-fat.json index ffb105e5f6351..56625a8308cc5 100644 --- a/tests/unit/expected_test_results/attributes/fr-palm-kernel-fat.json +++ b/tests/unit/expected_test_results/attributes/fr-palm-kernel-fat.json @@ -662,10 +662,12 @@ "1", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:palm-kernel-fat" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:palm-kernel-fat", "en:oil-and-fat", @@ -752,7 +754,7 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 0, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/unit/expected_test_results/attributes/fr-palm-oil-free.json b/tests/unit/expected_test_results/attributes/fr-palm-oil-free.json index b533d144c6aba..1f78685da3eb6 100644 --- a/tests/unit/expected_test_results/attributes/fr-palm-oil-free.json +++ b/tests/unit/expected_test_results/attributes/fr-palm-oil-free.json @@ -686,6 +686,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:water", "en:flour", @@ -693,6 +694,7 @@ "en:chocolate" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:water", "en:flour", @@ -781,7 +783,7 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 0, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/unit/expected_test_results/attributes/fr-palm-oil.json b/tests/unit/expected_test_results/attributes/fr-palm-oil.json index cfab0e822d76e..103d4361d6b51 100644 --- a/tests/unit/expected_test_results/attributes/fr-palm-oil.json +++ b/tests/unit/expected_test_results/attributes/fr-palm-oil.json @@ -675,11 +675,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:potato", "en:palm-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:potato", "en:vegetable", @@ -768,7 +770,7 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 0, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/unit/expected_test_results/attributes/fr-vegetable-oils.json b/tests/unit/expected_test_results/attributes/fr-vegetable-oils.json index d173c6e153b92..749d6a9ca9038 100644 --- a/tests/unit/expected_test_results/attributes/fr-vegetable-oils.json +++ b/tests/unit/expected_test_results/attributes/fr-vegetable-oils.json @@ -679,12 +679,14 @@ "3", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:corn-flour", "en:vegetable-oil", "en:salt" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:corn-flour", "en:cereal", @@ -777,7 +779,7 @@ "category_available" : 0, "data" : { "energy" : null, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 0, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/unit/expected_test_results/nutriscore/94-percent-sugar-and-unknown-ingredient.json b/tests/unit/expected_test_results/nutriscore/94-percent-sugar-and-unknown-ingredient.json index 35b0aaf0452e2..d703b9018c9ab 100644 --- a/tests/unit/expected_test_results/nutriscore/94-percent-sugar-and-unknown-ingredient.json +++ b/tests/unit/expected_test_results/nutriscore/94-percent-sugar-and-unknown-ingredient.json @@ -83,11 +83,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:sugar", "en:strange-ingredient" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:sugar", "en:added-sugar", @@ -156,7 +158,7 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, + "fiber" : null, "fruits_vegetables_legumes" : 0, "is_beverage" : 0, "is_cheese" : 0, diff --git a/tests/unit/expected_test_results/nutriscore/beverage-with-80-percent-milk.json b/tests/unit/expected_test_results/nutriscore/beverage-with-80-percent-milk.json index ad90d0abb9999..447c35471be59 100644 --- a/tests/unit/expected_test_results/nutriscore/beverage-with-80-percent-milk.json +++ b/tests/unit/expected_test_results/nutriscore/beverage-with-80-percent-milk.json @@ -72,11 +72,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:fresh-milk", "en:sugar" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:fresh-milk", "en:dairy", @@ -249,8 +251,8 @@ { "id" : "non_nutritive_sweeteners", "points" : 0, - "points_max" : null, - "unit" : null, + "points_max" : 4, + "unit" : "number", "value" : 0 } ], @@ -286,8 +288,7 @@ "is_red_meat_product" : 0, "is_water" : 0, "negative_points" : 24, - "negative_points_max" : 50, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", diff --git a/tests/unit/expected_test_results/nutriscore/breakfast-cereals.json b/tests/unit/expected_test_results/nutriscore/breakfast-cereals.json index 28af56b0f6b76..e41fdf803774f 100644 --- a/tests/unit/expected_test_results/nutriscore/breakfast-cereals.json +++ b/tests/unit/expected_test_results/nutriscore/breakfast-cereals.json @@ -147,7 +147,7 @@ "points" : 0, "points_max" : 5, "unit" : "%", - "value" : 0 + "value" : null } ] }, diff --git a/tests/unit/expected_test_results/nutriscore/cocoa-and-chocolate-powders.json b/tests/unit/expected_test_results/nutriscore/cocoa-and-chocolate-powders.json index fa71e5e73f891..001dee567b04b 100644 --- a/tests/unit/expected_test_results/nutriscore/cocoa-and-chocolate-powders.json +++ b/tests/unit/expected_test_results/nutriscore/cocoa-and-chocolate-powders.json @@ -141,7 +141,7 @@ "points" : 0, "points_max" : 5, "unit" : "%", - "value" : 0 + "value" : null } ] }, diff --git a/tests/unit/expected_test_results/nutriscore/colza-oil.json b/tests/unit/expected_test_results/nutriscore/colza-oil.json index 279a7623e2347..414b0ced6d9b9 100644 --- a/tests/unit/expected_test_results/nutriscore/colza-oil.json +++ b/tests/unit/expected_test_results/nutriscore/colza-oil.json @@ -157,7 +157,7 @@ "points" : 0, "points_max" : 5, "unit" : "%", - "value" : 0 + "value" : null } ] }, diff --git a/tests/unit/expected_test_results/nutriscore/cookies.json b/tests/unit/expected_test_results/nutriscore/cookies.json index b0919736acfd5..49828cf43a562 100644 --- a/tests/unit/expected_test_results/nutriscore/cookies.json +++ b/tests/unit/expected_test_results/nutriscore/cookies.json @@ -140,7 +140,7 @@ "points" : 0, "points_max" : 5, "unit" : "%", - "value" : 0 + "value" : null } ] }, diff --git a/tests/unit/expected_test_results/nutriscore/dairy-drink-with-80-percent-milk.json b/tests/unit/expected_test_results/nutriscore/dairy-drink-with-80-percent-milk.json index 2c05ccb9aa8e4..9beb584f191a8 100644 --- a/tests/unit/expected_test_results/nutriscore/dairy-drink-with-80-percent-milk.json +++ b/tests/unit/expected_test_results/nutriscore/dairy-drink-with-80-percent-milk.json @@ -80,11 +80,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:fresh-milk", "en:sugar" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:fresh-milk", "en:dairy", @@ -257,8 +259,8 @@ { "id" : "non_nutritive_sweeteners", "points" : 0, - "points_max" : null, - "unit" : null, + "points_max" : 4, + "unit" : "number", "value" : 0 } ], @@ -294,8 +296,7 @@ "is_red_meat_product" : 0, "is_water" : 0, "negative_points" : 22, - "negative_points_max" : 50, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", diff --git a/tests/unit/expected_test_results/nutriscore/dairy-drink-with-less-than-80-percent-milk.json b/tests/unit/expected_test_results/nutriscore/dairy-drink-with-less-than-80-percent-milk.json index 5d0121f0c46af..8c4e426aa53d4 100644 --- a/tests/unit/expected_test_results/nutriscore/dairy-drink-with-less-than-80-percent-milk.json +++ b/tests/unit/expected_test_results/nutriscore/dairy-drink-with-less-than-80-percent-milk.json @@ -78,11 +78,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:milk", "en:sugar" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:milk", "en:dairy", @@ -253,8 +255,8 @@ { "id" : "non_nutritive_sweeteners", "points" : 0, - "points_max" : null, - "unit" : null, + "points_max" : 4, + "unit" : "number", "value" : 0 } ], @@ -290,8 +292,7 @@ "is_red_meat_product" : 0, "is_water" : 0, "negative_points" : 24, - "negative_points_max" : 50, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", diff --git a/tests/unit/expected_test_results/nutriscore/dairy-drinks-without-milk.json b/tests/unit/expected_test_results/nutriscore/dairy-drinks-without-milk.json index 34d02aa6b9103..77c66012058cb 100644 --- a/tests/unit/expected_test_results/nutriscore/dairy-drinks-without-milk.json +++ b/tests/unit/expected_test_results/nutriscore/dairy-drinks-without-milk.json @@ -73,11 +73,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:water", "en:sugar" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:water", "en:sugar", @@ -246,8 +248,8 @@ { "id" : "non_nutritive_sweeteners", "points" : 0, - "points_max" : null, - "unit" : null, + "points_max" : 4, + "unit" : "number", "value" : 0 } ], @@ -283,8 +285,7 @@ "is_red_meat_product" : 0, "is_water" : 0, "negative_points" : 22, - "negative_points_max" : 50, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", diff --git a/tests/unit/expected_test_results/nutriscore/en-apple-estimated-nutrients.json b/tests/unit/expected_test_results/nutriscore/en-apple-estimated-nutrients.json index af814a16084aa..33eff09c911fe 100644 --- a/tests/unit/expected_test_results/nutriscore/en-apple-estimated-nutrients.json +++ b/tests/unit/expected_test_results/nutriscore/en-apple-estimated-nutrients.json @@ -72,10 +72,12 @@ "1", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple", "en:fruit", diff --git a/tests/unit/expected_test_results/nutriscore/en-avocado-oil.json b/tests/unit/expected_test_results/nutriscore/en-avocado-oil.json index 2713b01ebda96..d70b1b480651d 100644 --- a/tests/unit/expected_test_results/nutriscore/en-avocado-oil.json +++ b/tests/unit/expected_test_results/nutriscore/en-avocado-oil.json @@ -75,10 +75,12 @@ "1", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:avocado" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:avocado", "en:vegetable", diff --git a/tests/unit/expected_test_results/nutriscore/en-beers-category.json b/tests/unit/expected_test_results/nutriscore/en-beers-category.json index 60c16548b6a38..ca29518df2939 100644 --- a/tests/unit/expected_test_results/nutriscore/en-beers-category.json +++ b/tests/unit/expected_test_results/nutriscore/en-beers-category.json @@ -76,12 +76,13 @@ "data" : { "energy" : 182, "fiber" : 0.5, - "fruits_vegetables_legumes" : 0, + "fruits_vegetables_legumes" : null, "is_beverage" : 1, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, "is_red_meat_product" : 0, "is_water" : 0, + "non_nutritive_sweeteners" : null, "proteins" : 0.2, "salt" : 0.5, "saturated_fat" : 0, diff --git a/tests/unit/expected_test_results/nutriscore/en-cherry-tomatoes.json b/tests/unit/expected_test_results/nutriscore/en-cherry-tomatoes.json index 4ae0430fee62e..651f8ae8dfab5 100644 --- a/tests/unit/expected_test_results/nutriscore/en-cherry-tomatoes.json +++ b/tests/unit/expected_test_results/nutriscore/en-cherry-tomatoes.json @@ -79,10 +79,12 @@ "1", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:cherry-tomato" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:cherry-tomato", "en:vegetable", diff --git a/tests/unit/expected_test_results/nutriscore/en-milk.json b/tests/unit/expected_test_results/nutriscore/en-milk.json index 999986e5aca08..fca0ef046ed7f 100644 --- a/tests/unit/expected_test_results/nutriscore/en-milk.json +++ b/tests/unit/expected_test_results/nutriscore/en-milk.json @@ -126,9 +126,9 @@ { "id" : "non_nutritive_sweeteners", "points" : 0, - "points_max" : null, - "unit" : null, - "value" : 0 + "points_max" : 4, + "unit" : "number", + "value" : null } ], "positive" : [ @@ -144,14 +144,14 @@ "points" : 0, "points_max" : 5, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "fruits_vegetables_legumes", "points" : 0, "points_max" : 6, "unit" : "%", - "value" : 0 + "value" : null } ] }, @@ -163,8 +163,7 @@ "is_red_meat_product" : 0, "is_water" : 0, "negative_points" : 6, - "negative_points_max" : 50, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", diff --git a/tests/unit/expected_test_results/nutriscore/en-olive-oil-unrecognized-ingredients.json b/tests/unit/expected_test_results/nutriscore/en-olive-oil-unrecognized-ingredients.json index 7c2aa519ffc30..6243e73fe017e 100644 --- a/tests/unit/expected_test_results/nutriscore/en-olive-oil-unrecognized-ingredients.json +++ b/tests/unit/expected_test_results/nutriscore/en-olive-oil-unrecognized-ingredients.json @@ -81,10 +81,12 @@ "1", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:some-very-fancy-but-unrecognized-way-of-writing-olive-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:some-very-fancy-but-unrecognized-way-of-writing-olive-oil" ], diff --git a/tests/unit/expected_test_results/nutriscore/en-olive-oil.json b/tests/unit/expected_test_results/nutriscore/en-olive-oil.json index 94d428af2bef9..3c123b49bf605 100644 --- a/tests/unit/expected_test_results/nutriscore/en-olive-oil.json +++ b/tests/unit/expected_test_results/nutriscore/en-olive-oil.json @@ -78,10 +78,12 @@ "1", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:olive-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:olive-oil", "en:oil-and-fat", diff --git a/tests/unit/expected_test_results/nutriscore/en-orange-juice-category-and-ingredients.json b/tests/unit/expected_test_results/nutriscore/en-orange-juice-category-and-ingredients.json index 75435384d671e..b0166843a1646 100644 --- a/tests/unit/expected_test_results/nutriscore/en-orange-juice-category-and-ingredients.json +++ b/tests/unit/expected_test_results/nutriscore/en-orange-juice-category-and-ingredients.json @@ -104,12 +104,14 @@ "3", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:orange-juice", "en:water", "en:sugar" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:orange-juice", "en:fruit", @@ -285,8 +287,8 @@ { "id" : "non_nutritive_sweeteners", "points" : 0, - "points_max" : null, - "unit" : null, + "points_max" : 4, + "unit" : "number", "value" : 0 } ], @@ -322,8 +324,7 @@ "is_red_meat_product" : 0, "is_water" : 0, "negative_points" : 12, - "negative_points_max" : 50, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", diff --git a/tests/unit/expected_test_results/nutriscore/en-orange-juice-category.json b/tests/unit/expected_test_results/nutriscore/en-orange-juice-category.json index 1a7b6d1b2580d..812bd2c8be6a2 100644 --- a/tests/unit/expected_test_results/nutriscore/en-orange-juice-category.json +++ b/tests/unit/expected_test_results/nutriscore/en-orange-juice-category.json @@ -140,9 +140,9 @@ { "id" : "non_nutritive_sweeteners", "points" : 0, - "points_max" : null, - "unit" : null, - "value" : 0 + "points_max" : 4, + "unit" : "number", + "value" : null } ], "positive" : [ @@ -177,8 +177,7 @@ "is_red_meat_product" : 0, "is_water" : 0, "negative_points" : 12, - "negative_points_max" : 50, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", diff --git a/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-ingredients-with-lots-of-meat.json b/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-ingredients-with-lots-of-meat.json index e5bb881903d1c..910263396815a 100644 --- a/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-ingredients-with-lots-of-meat.json +++ b/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-ingredients-with-lots-of-meat.json @@ -115,6 +115,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:pork-meat", "en:lamb-meat", @@ -122,6 +123,7 @@ "en:salt" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:pork-meat", "en:animal", @@ -309,7 +311,7 @@ "points" : 0, "points_max" : 5, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "fruits_vegetables_legumes", diff --git a/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-ingredients-with-no-meat.json b/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-ingredients-with-no-meat.json index 8e46cea9a9e93..a97f0f40c4dcf 100644 --- a/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-ingredients-with-no-meat.json +++ b/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-ingredients-with-no-meat.json @@ -99,12 +99,14 @@ "3", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:salmon", "en:wheat-flour", "en:salt" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:salmon", "en:fish", @@ -291,7 +293,7 @@ "points" : 0, "points_max" : 5, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "fruits_vegetables_legumes", diff --git a/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-ingredients-with-very-little-meat.json b/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-ingredients-with-very-little-meat.json index 9cef2ba1b2bbc..007c2028ea5a2 100644 --- a/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-ingredients-with-very-little-meat.json +++ b/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-ingredients-with-very-little-meat.json @@ -134,6 +134,7 @@ "6", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:egg", "en:wheat-flour", @@ -143,6 +144,7 @@ "en:salt" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:egg", "en:wheat-flour", @@ -335,7 +337,7 @@ "points" : 0, "points_max" : 5, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "fruits_vegetables_legumes", diff --git a/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-no-ingredients.json b/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-no-ingredients.json index 79dd39025de82..461ed9043c0f7 100644 --- a/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-no-ingredients.json +++ b/tests/unit/expected_test_results/nutriscore/en-red-meat-ambiguous-category-no-ingredients.json @@ -138,14 +138,14 @@ "points" : 0, "points_max" : 5, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "fruits_vegetables_legumes", "points" : 0, "points_max" : 5, "unit" : "%", - "value" : 0 + "value" : null } ] }, diff --git a/tests/unit/expected_test_results/nutriscore/en-red-meat-category-no-ingredients.json b/tests/unit/expected_test_results/nutriscore/en-red-meat-category-no-ingredients.json index 7304fc4335a11..c420f22607874 100644 --- a/tests/unit/expected_test_results/nutriscore/en-red-meat-category-no-ingredients.json +++ b/tests/unit/expected_test_results/nutriscore/en-red-meat-category-no-ingredients.json @@ -147,14 +147,14 @@ "points" : 0, "points_max" : 5, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "fruits_vegetables_legumes", "points" : 0, "points_max" : 5, "unit" : "%", - "value" : 0 + "value" : null } ] }, diff --git a/tests/unit/expected_test_results/nutriscore/en-soy-beans-processed-and-unprocessed.json b/tests/unit/expected_test_results/nutriscore/en-soy-beans-processed-and-unprocessed.json index f08d830ea29fa..469c1cddd64ca 100644 --- a/tests/unit/expected_test_results/nutriscore/en-soy-beans-processed-and-unprocessed.json +++ b/tests/unit/expected_test_results/nutriscore/en-soy-beans-processed-and-unprocessed.json @@ -114,6 +114,7 @@ "5", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:soya-bean", "en:soya-bean", @@ -122,6 +123,7 @@ "en:soya-bean" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:soya-bean", "en:vegetable", @@ -285,7 +287,7 @@ "points" : 0, "points_max" : 5, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "fruits_vegetables_legumes", diff --git a/tests/unit/expected_test_results/nutriscore/en-sugar-estimated-nutrients.json b/tests/unit/expected_test_results/nutriscore/en-sugar-estimated-nutrients.json index cfe51d49eb1e9..7b0fad852ef70 100644 --- a/tests/unit/expected_test_results/nutriscore/en-sugar-estimated-nutrients.json +++ b/tests/unit/expected_test_results/nutriscore/en-sugar-estimated-nutrients.json @@ -64,10 +64,12 @@ "1", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:sugar" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:sugar", "en:added-sugar", diff --git a/tests/unit/expected_test_results/nutriscore/en-sweeteners-erythritol.json b/tests/unit/expected_test_results/nutriscore/en-sweeteners-erythritol.json index 47381d3383f6e..33ab6dab40edd 100644 --- a/tests/unit/expected_test_results/nutriscore/en-sweeteners-erythritol.json +++ b/tests/unit/expected_test_results/nutriscore/en-sweeteners-erythritol.json @@ -36,10 +36,10 @@ "en:carbonated-drinks", "en:sodas" ], - "food_groups" : "en:artificially-sweetened-beverages", + "food_groups" : "en:sweetened-beverages", "food_groups_tags" : [ "en:beverages", - "en:artificially-sweetened-beverages" + "en:sweetened-beverages" ], "ingredients" : [ { @@ -109,6 +109,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:apple-juice", "en:water", @@ -116,6 +117,7 @@ "en:e968" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple-juice", "en:fruit", @@ -246,8 +248,8 @@ { "id" : "non_nutritive_sweeteners", "points" : 0, - "points_max" : null, - "unit" : null, + "points_max" : 4, + "unit" : "number", "value" : 0 } ], @@ -264,7 +266,7 @@ "points" : 0, "points_max" : 5, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "fruits_vegetables_legumes", @@ -283,8 +285,7 @@ "is_red_meat_product" : 0, "is_water" : 0, "negative_points" : 4, - "negative_points_max" : 50, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", @@ -363,12 +364,11 @@ "beverages", "known" ], - "pnns_groups_2" : "Artificially sweetened beverages", + "pnns_groups_2" : "Sweetened beverages", "pnns_groups_2_tags" : [ - "artificially-sweetened-beverages", + "sweetened-beverages", "known" ], "unknown_ingredients_n" : 0, - "vitamins_tags" : [], - "with_sweeteners" : 1 + "vitamins_tags" : [] } diff --git a/tests/unit/expected_test_results/nutriscore/en-sweeteners.json b/tests/unit/expected_test_results/nutriscore/en-sweeteners.json index 3e81b943b67a7..72842142a74cb 100644 --- a/tests/unit/expected_test_results/nutriscore/en-sweeteners.json +++ b/tests/unit/expected_test_results/nutriscore/en-sweeteners.json @@ -36,10 +36,10 @@ "en:carbonated-drinks", "en:sodas" ], - "food_groups" : "en:artificially-sweetened-beverages", + "food_groups" : "en:sweetened-beverages", "food_groups_tags" : [ "en:beverages", - "en:artificially-sweetened-beverages" + "en:sweetened-beverages" ], "ingredients" : [ { @@ -109,6 +109,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 1, "ingredients_original_tags" : [ "en:apple-juice", "en:water", @@ -116,6 +117,7 @@ "en:e951" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:apple-juice", "en:fruit", @@ -245,9 +247,9 @@ { "id" : "non_nutritive_sweeteners", "points" : 4, - "points_max" : null, - "unit" : null, - "value" : 0 + "points_max" : 4, + "unit" : "number", + "value" : 1 } ], "positive" : [ @@ -263,7 +265,7 @@ "points" : 0, "points_max" : 5, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "fruits_vegetables_legumes", @@ -282,16 +284,14 @@ "is_red_meat_product" : 0, "is_water" : 0, "negative_points" : 8, - "negative_points_max" : 50, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", "fruits_vegetables_legumes" ], "positive_points" : 4, - "positive_points_max" : 18, - "with_non_nutritive_sweeteners" : 1 + "positive_points_max" : 18 }, "grade" : "c", "nutrients_available" : 1, @@ -363,13 +363,11 @@ "beverages", "known" ], - "pnns_groups_2" : "Artificially sweetened beverages", + "pnns_groups_2" : "Sweetened beverages", "pnns_groups_2_tags" : [ - "artificially-sweetened-beverages", + "sweetened-beverages", "known" ], "unknown_ingredients_n" : 0, - "vitamins_tags" : [], - "with_non_nutritive_sweeteners" : 1, - "with_sweeteners" : 1 + "vitamins_tags" : [] } diff --git a/tests/unit/expected_test_results/nutriscore/en-tofu.json b/tests/unit/expected_test_results/nutriscore/en-tofu.json index c6b61fa15d00d..edccbc62ec87e 100644 --- a/tests/unit/expected_test_results/nutriscore/en-tofu.json +++ b/tests/unit/expected_test_results/nutriscore/en-tofu.json @@ -99,12 +99,14 @@ "3", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:soya-bean", "en:water", "en:salt" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:soya-bean", "en:vegetable", @@ -290,7 +292,7 @@ "points" : 0, "points_max" : 5, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "fruits_vegetables_legumes", diff --git a/tests/unit/expected_test_results/nutriscore/en-vegetable-crisps.json b/tests/unit/expected_test_results/nutriscore/en-vegetable-crisps.json index 7f57216664ccb..acc8ed662b9e8 100644 --- a/tests/unit/expected_test_results/nutriscore/en-vegetable-crisps.json +++ b/tests/unit/expected_test_results/nutriscore/en-vegetable-crisps.json @@ -83,11 +83,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:parsnip", "en:red-beetroot" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:parsnip", "en:vegetable", @@ -272,7 +274,7 @@ "points" : 0, "points_max" : 5, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "fruits_vegetables_legumes", diff --git a/tests/unit/expected_test_results/nutriscore/flavored-spring-water-no-nutrition.json b/tests/unit/expected_test_results/nutriscore/flavored-spring-water-no-nutrition.json index 30dab9840d54e..29c02d8e91363 100644 --- a/tests/unit/expected_test_results/nutriscore/flavored-spring-water-no-nutrition.json +++ b/tests/unit/expected_test_results/nutriscore/flavored-spring-water-no-nutrition.json @@ -74,13 +74,14 @@ "category_available" : 1, "data" : { "energy" : null, - "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fiber" : null, + "fruits_vegetables_legumes" : null, "is_beverage" : 1, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 0, "is_red_meat_product" : 0, "is_water" : 0, + "non_nutritive_sweeteners" : null, "proteins" : null, "salt" : null, "saturated_fat" : null, diff --git a/tests/unit/expected_test_results/nutriscore/flavored-spring-with-nutrition.json b/tests/unit/expected_test_results/nutriscore/flavored-spring-with-nutrition.json index ee006bbe3129a..16bf5125324fa 100644 --- a/tests/unit/expected_test_results/nutriscore/flavored-spring-with-nutrition.json +++ b/tests/unit/expected_test_results/nutriscore/flavored-spring-with-nutrition.json @@ -131,9 +131,9 @@ { "id" : "non_nutritive_sweeteners", "points" : 0, - "points_max" : null, - "unit" : null, - "value" : 0 + "points_max" : 4, + "unit" : "number", + "value" : null } ], "positive" : [ @@ -156,7 +156,7 @@ "points" : 0, "points_max" : 6, "unit" : "%", - "value" : 0 + "value" : null } ] }, @@ -168,8 +168,7 @@ "is_red_meat_product" : 0, "is_water" : 0, "negative_points" : 11, - "negative_points_max" : 50, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", diff --git a/tests/unit/expected_test_results/nutriscore/fr-canned-green-beans.json b/tests/unit/expected_test_results/nutriscore/fr-canned-green-beans.json index 392acf5523d88..76e96a0a5484e 100644 --- a/tests/unit/expected_test_results/nutriscore/fr-canned-green-beans.json +++ b/tests/unit/expected_test_results/nutriscore/fr-canned-green-beans.json @@ -116,12 +116,14 @@ "3", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:water", "en:sugar", "en:green-bean" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:water", "en:sugar", diff --git a/tests/unit/expected_test_results/nutriscore/fr-canned-pineapple.json b/tests/unit/expected_test_results/nutriscore/fr-canned-pineapple.json index 118ee9bb731c2..b99029849ed17 100644 --- a/tests/unit/expected_test_results/nutriscore/fr-canned-pineapple.json +++ b/tests/unit/expected_test_results/nutriscore/fr-canned-pineapple.json @@ -89,12 +89,14 @@ "3", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:water", "en:sugar", "en:pineapple" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:water", "en:sugar", diff --git a/tests/unit/expected_test_results/nutriscore/fr-coconut-milk.json b/tests/unit/expected_test_results/nutriscore/fr-coconut-milk.json index eec7b532d155e..595f8fe092fec 100644 --- a/tests/unit/expected_test_results/nutriscore/fr-coconut-milk.json +++ b/tests/unit/expected_test_results/nutriscore/fr-coconut-milk.json @@ -79,11 +79,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:coconut", "en:water" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:coconut", "en:fruit", diff --git a/tests/unit/expected_test_results/nutriscore/fr-gaspacho.json b/tests/unit/expected_test_results/nutriscore/fr-gaspacho.json index 2238453f7e603..48c3d7ee7bc18 100644 --- a/tests/unit/expected_test_results/nutriscore/fr-gaspacho.json +++ b/tests/unit/expected_test_results/nutriscore/fr-gaspacho.json @@ -210,6 +210,7 @@ "11", "11-20" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:tomato", "en:cucumber", @@ -224,6 +225,7 @@ "en:lemon-juice" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:tomato", "en:vegetable", diff --git a/tests/unit/expected_test_results/nutriscore/fr-green-beans-beverage.json b/tests/unit/expected_test_results/nutriscore/fr-green-beans-beverage.json index 6ce963889d5e6..bd20d6ea00368 100644 --- a/tests/unit/expected_test_results/nutriscore/fr-green-beans-beverage.json +++ b/tests/unit/expected_test_results/nutriscore/fr-green-beans-beverage.json @@ -86,12 +86,14 @@ "3", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:water", "en:sugar", "en:green-bean" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:water", "en:sugar", diff --git a/tests/unit/expected_test_results/nutriscore/fr-ice-tea-with-sweetener.json b/tests/unit/expected_test_results/nutriscore/fr-ice-tea-with-sweetener.json index 3e83251508d67..1e11fa3191d6e 100644 --- a/tests/unit/expected_test_results/nutriscore/fr-ice-tea-with-sweetener.json +++ b/tests/unit/expected_test_results/nutriscore/fr-ice-tea-with-sweetener.json @@ -261,6 +261,7 @@ "16", "11-20" ], + "ingredients_non_nutritive_sweeteners_n" : 1, "ingredients_original_tags" : [ "en:water", "en:sugar", @@ -280,6 +281,7 @@ "en:e960" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:water", "en:sugar", @@ -484,9 +486,9 @@ { "id" : "non_nutritive_sweeteners", "points" : 4, - "points_max" : null, - "unit" : null, - "value" : 0 + "points_max" : 4, + "unit" : "number", + "value" : 1 } ], "positive" : [ @@ -502,7 +504,7 @@ "points" : 0, "points_max" : 5, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "fruits_vegetables_legumes", @@ -521,16 +523,14 @@ "is_red_meat_product" : 0, "is_water" : 0, "negative_points" : 8, - "negative_points_max" : 50, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", "fruits_vegetables_legumes" ], "positive_points" : 0, - "positive_points_max" : 18, - "with_non_nutritive_sweeteners" : 1 + "positive_points_max" : 18 }, "grade" : "d", "nutrients_available" : 1, @@ -603,13 +603,11 @@ "beverages", "known" ], - "pnns_groups_2" : "Artificially sweetened beverages", + "pnns_groups_2" : "Sweetened beverages", "pnns_groups_2_tags" : [ - "artificially-sweetened-beverages", + "sweetened-beverages", "known" ], "unknown_ingredients_n" : 1, - "vitamins_tags" : [], - "with_non_nutritive_sweeteners" : 1, - "with_sweeteners" : 1 + "vitamins_tags" : [] } diff --git a/tests/unit/expected_test_results/nutriscore/fr-mixed-oils-with-olive-oil.json b/tests/unit/expected_test_results/nutriscore/fr-mixed-oils-with-olive-oil.json index 5a08dfe722c47..d187891415017 100644 --- a/tests/unit/expected_test_results/nutriscore/fr-mixed-oils-with-olive-oil.json +++ b/tests/unit/expected_test_results/nutriscore/fr-mixed-oils-with-olive-oil.json @@ -129,6 +129,7 @@ "5", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:colza-oil", "en:sunflower-oil", @@ -137,6 +138,7 @@ "en:vitamin-d" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:colza-oil", "en:oil-and-fat", diff --git a/tests/unit/expected_test_results/nutriscore/fr-orange-nectar-0-fat.json b/tests/unit/expected_test_results/nutriscore/fr-orange-nectar-0-fat.json index 8243779d8e64f..40f8abb5b83d5 100644 --- a/tests/unit/expected_test_results/nutriscore/fr-orange-nectar-0-fat.json +++ b/tests/unit/expected_test_results/nutriscore/fr-orange-nectar-0-fat.json @@ -112,6 +112,7 @@ "4", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:orange", "en:water", @@ -119,6 +120,7 @@ "en:carrot" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:orange", "en:fruit", @@ -295,8 +297,8 @@ { "id" : "non_nutritive_sweeteners", "points" : 0, - "points_max" : null, - "unit" : null, + "points_max" : 4, + "unit" : "number", "value" : 0 } ], @@ -332,8 +334,7 @@ "is_red_meat_product" : 0, "is_water" : 0, "negative_points" : 17, - "negative_points_max" : 50, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", diff --git a/tests/unit/expected_test_results/nutriscore/fr-plant-beverages-soy-milk.json b/tests/unit/expected_test_results/nutriscore/fr-plant-beverages-soy-milk.json index 04b594ad72c06..78d97a225f221 100644 --- a/tests/unit/expected_test_results/nutriscore/fr-plant-beverages-soy-milk.json +++ b/tests/unit/expected_test_results/nutriscore/fr-plant-beverages-soy-milk.json @@ -96,11 +96,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:water", "en:soya-bean" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:water", "en:soya-bean", @@ -273,8 +275,8 @@ { "id" : "non_nutritive_sweeteners", "points" : 0, - "points_max" : null, - "unit" : null, + "points_max" : 4, + "unit" : "number", "value" : 0 } ], @@ -310,8 +312,7 @@ "is_red_meat_product" : 0, "is_water" : 0, "negative_points" : 3, - "negative_points_max" : 50, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", diff --git a/tests/unit/expected_test_results/nutriscore/fr-rapeseed-oil.json b/tests/unit/expected_test_results/nutriscore/fr-rapeseed-oil.json index 1414d3a043d3e..25b2bf5ddc2da 100644 --- a/tests/unit/expected_test_results/nutriscore/fr-rapeseed-oil.json +++ b/tests/unit/expected_test_results/nutriscore/fr-rapeseed-oil.json @@ -76,10 +76,12 @@ "1", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:colza-oil" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:colza-oil", "en:oil-and-fat", diff --git a/tests/unit/expected_test_results/nutriscore/milk.json b/tests/unit/expected_test_results/nutriscore/milk.json index 6103f75ba0f5a..bff8b5c5ea05b 100644 --- a/tests/unit/expected_test_results/nutriscore/milk.json +++ b/tests/unit/expected_test_results/nutriscore/milk.json @@ -67,10 +67,12 @@ "1", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:milk" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:milk", "en:dairy" @@ -238,8 +240,8 @@ { "id" : "non_nutritive_sweeteners", "points" : 0, - "points_max" : null, - "unit" : null, + "points_max" : 4, + "unit" : "number", "value" : 0 } ], @@ -275,8 +277,7 @@ "is_red_meat_product" : 0, "is_water" : 0, "negative_points" : 22, - "negative_points_max" : 50, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", diff --git a/tests/unit/expected_test_results/nutriscore/mushrooms.json b/tests/unit/expected_test_results/nutriscore/mushrooms.json index 2c2770a5b2e94..05f537dd4c7b9 100644 --- a/tests/unit/expected_test_results/nutriscore/mushrooms.json +++ b/tests/unit/expected_test_results/nutriscore/mushrooms.json @@ -78,11 +78,13 @@ "2", "1-10" ], + "ingredients_non_nutritive_sweeteners_n" : 0, "ingredients_original_tags" : [ "en:oyster-mushroom", "fr:chapelure-de-mais" ], "ingredients_percent_analysis" : 1, + "ingredients_sweeteners_n" : 0, "ingredients_tags" : [ "en:oyster-mushroom", "en:mushroom", diff --git a/tests/unit/expected_test_results/nutriscore/spring-water-no-nutrition.json b/tests/unit/expected_test_results/nutriscore/spring-water-no-nutrition.json index 60a2389f02da1..4c728adc33acf 100644 --- a/tests/unit/expected_test_results/nutriscore/spring-water-no-nutrition.json +++ b/tests/unit/expected_test_results/nutriscore/spring-water-no-nutrition.json @@ -89,60 +89,60 @@ { "id" : "energy", "points" : 0, - "points_max" : null, + "points_max" : 10, "unit" : "kJ", - "value" : 0 + "value" : null }, { "id" : "sugars", "points" : 0, - "points_max" : null, + "points_max" : 10, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "saturated_fat", "points" : 0, - "points_max" : null, + "points_max" : 10, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "salt", "points" : 0, - "points_max" : null, + "points_max" : 20, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "non_nutritive_sweeteners", "points" : 0, - "points_max" : null, - "unit" : null, - "value" : 0 + "points_max" : 4, + "unit" : "number", + "value" : null } ], "positive" : [ { "id" : "proteins", "points" : 0, - "points_max" : null, + "points_max" : 7, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "fiber", "points" : 0, "points_max" : 5, "unit" : "g", - "value" : 0 + "value" : null }, { "id" : "fruits_vegetables_legumes", "points" : 0, "points_max" : 6, "unit" : "%", - "value" : 0 + "value" : null } ] }, @@ -154,15 +154,14 @@ "is_red_meat_product" : 0, "is_water" : "1", "negative_points" : 0, - "negative_points_max" : 0, - "non_nutritive_sweeteners_max" : 4, + "negative_points_max" : 54, "positive_nutrients" : [ "proteins", "fiber", "fruits_vegetables_legumes" ], "positive_points" : 0, - "positive_points_max" : 11 + "positive_points_max" : 18 }, "grade" : "a", "nutrients_available" : 1, diff --git a/tests/unit/expected_test_results/nutriscore/sunflower-oil-no-sugar-no-sat-fat.json b/tests/unit/expected_test_results/nutriscore/sunflower-oil-no-sugar-no-sat-fat.json index 725e04ec91610..38d90bb4f681c 100644 --- a/tests/unit/expected_test_results/nutriscore/sunflower-oil-no-sugar-no-sat-fat.json +++ b/tests/unit/expected_test_results/nutriscore/sunflower-oil-no-sugar-no-sat-fat.json @@ -90,7 +90,7 @@ "energy" : 3378, "fat" : 100, "fiber" : 0, - "fruits_vegetables_legumes" : 0, + "fruits_vegetables_legumes" : null, "is_beverage" : 0, "is_cheese" : 0, "is_fat_oil_nuts_seeds" : 1, diff --git a/tests/unit/expected_test_results/nutriscore/sunflower-oil-no-sugar.json b/tests/unit/expected_test_results/nutriscore/sunflower-oil-no-sugar.json index 3715b3d2a7e6e..7d40b81b4ac2a 100644 --- a/tests/unit/expected_test_results/nutriscore/sunflower-oil-no-sugar.json +++ b/tests/unit/expected_test_results/nutriscore/sunflower-oil-no-sugar.json @@ -158,7 +158,7 @@ "points" : 0, "points_max" : 5, "unit" : "%", - "value" : 0 + "value" : null } ] }, diff --git a/tests/unit/expected_test_results/nutriscore/sunflower-oil.json b/tests/unit/expected_test_results/nutriscore/sunflower-oil.json index cdfb257a4260e..409fcea25e850 100644 --- a/tests/unit/expected_test_results/nutriscore/sunflower-oil.json +++ b/tests/unit/expected_test_results/nutriscore/sunflower-oil.json @@ -158,7 +158,7 @@ "points" : 0, "points_max" : 5, "unit" : "%", - "value" : 0 + "value" : null } ] }, diff --git a/tests/unit/expected_test_results/nutriscore/walnut-oil.json b/tests/unit/expected_test_results/nutriscore/walnut-oil.json index 28d3b853630c6..2e2f0ca3f836e 100644 --- a/tests/unit/expected_test_results/nutriscore/walnut-oil.json +++ b/tests/unit/expected_test_results/nutriscore/walnut-oil.json @@ -160,7 +160,7 @@ "points" : 0, "points_max" : 5, "unit" : "%", - "value" : 0 + "value" : null } ] },