-
-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use ingredient list if lang != lc to parse ingredients #8855
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8855 +/- ##
==========================================
+ Coverage 48.67% 48.70% +0.02%
==========================================
Files 118 118
Lines 22044 22060 +16
Branches 4899 4901 +2
==========================================
+ Hits 10730 10744 +14
- Misses 10010 10011 +1
- Partials 1304 1305 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
379ab9c
to
1c914dc
Compare
Those changes are due to the way we construct the products to be searched on, by calling the API with values like:
There's a bug in the API, and this results in "ingredients_text" + "ingredients_text_en" to be set with "apple, water, palm oil". With the existing code, we assume "ingredients_text" is in Spanish (because of the lang set to "es"). With your code, we don't look at ingredients_text and instead see the "ingredients_text_en" and assume it is in English. |
I'll fix the API bug. |
Could you add a couple of tests cases specifically for this new feature? |
@raphael0202 This should fix the test differences in search: #8877 |
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Solves #5546.
As we add a new field, many expected results files are updated.
Many changes are added to search expected results files, but most of them don't seem to be due to the changes added in this PR.