Skip to content
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

Update unit test for autocomplete suggests fix #104

Conversation

kuafucode
Copy link
Contributor

Description (*)

Since 2.4.7 we noticed search autocomplete would suggest search terms with no result.

here are some more cases of bad search suggestions with sample data package :
Intending to search for "Didi Sports Watch"
"didi" -> suggestion "duti" with no matches

Intending to search for "Bottle"
"bot" -> suggestion for "but" and "boi", the latter bringing no search results

Intending to serach for "Summit
"summ" -> suggestion "seam" and "sued" which bring results but not the watch
Manual testing scenarios (*)

install sample data package
type in following terms in searchbox on store front and verify it don't suggest autocomplete with strange result:

"didi" -> does not suggestion "duti"
"bot" -> does not suggest "boi"
"summ" -> does notsuggestion "seam" or "sued"

@kuafucode kuafucode requested a review from a team as a code owner October 1, 2024 04:20
Copy link
Contributor

@Vinai Vinai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the update making the new dependencies optional constructor arguments. Now only the removal of the field provider needs to be reversed... sorry for yet another change request, and thanks again for your work!

@fballiano
Copy link
Contributor

@Vinai: @kuafucode should have fixed the PR, could you quickly check? can I remove your change-request and approve it?

@fballiano
Copy link
Contributor

I'll make sure to merge this one right after #106 and #107

@fballiano fballiano merged commit 4096445 into mage-os:2.4-develop Oct 29, 2024
5 of 7 checks passed
rhoerr pushed a commit to rhoerr/mageos-magento2 that referenced this pull request Oct 29, 2024
* added additional check to ensure autocomplete suggests only searchable terms

* updated unitest for search suggest fix

* added type casting for isSuggestible

* reverted suggestible flag and fixed getSuggestFields method

* updated suggest contructor params to avoid bic

* updated unit test with new dependency productAttributeCollectionFactory for Suggestions

* add fieldProvider back to Suggestions constructor

---------

Co-authored-by: Ryan Sun <ryansun@isnweb.com>
@rhoerr rhoerr mentioned this pull request Oct 29, 2024
5 tasks
rhoerr added a commit that referenced this pull request Oct 30, 2024
* Bugfix: autocomplete suggests nonsearchable terms (#102)

* added additional check to ensure autocomplete suggests only searchable terms

---------

Co-authored-by: Ryan Sun <ryansun@isnweb.com>

* Update unit test for autocomplete suggests fix (#104)

* added additional check to ensure autocomplete suggests only searchable terms

* updated unitest for search suggest fix

* added type casting for isSuggestible

* reverted suggestible flag and fixed getSuggestFields method

* updated suggest contructor params to avoid bic

* updated unit test with new dependency productAttributeCollectionFactory for Suggestions

* add fieldProvider back to Suggestions constructor

---------

Co-authored-by: Ryan Sun <ryansun@isnweb.com>

---------

Co-authored-by: Ryan Sun <ryansun81@gmail.com>
Co-authored-by: Ryan Sun <ryansun@isnweb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants