-
Notifications
You must be signed in to change notification settings - Fork 315
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
Display autosuggest results on focus back, return to input on key up if first item. #4064
Conversation
cy.get('.wp-block-search__button').focus(); | ||
cy.get('.wp-block-search__input').click(); | ||
cy.get('.wp-block-search__input').focus(); | ||
|
||
cy.get('.ep-autosuggest').should(($autosuggestList) => { | ||
// eslint-disable-next-line no-unused-expressions | ||
expect($autosuggestList).to.be.visible; | ||
expect($autosuggestList[0].innerText).to.contains('Markup: HTML Tags and Formatting'); | ||
}); | ||
}); |
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.
As e2e tests are very resource intensive, we don't make them as atomic as unit tests. Let's add this last part to the existent test and stick with just one (bigger) test.
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.
Merged into
single: 3ea6778
Description of the Change
Closes #1860, #3482
How to test the Change
Up arrow on first Autosuggest item
1.- Type something into the autosuggest
2.- Press down to move to the first item.
3.- Press up.
4.- First item should be unselected.
outoffirstitem.mov
Autosuggest list should appear on focus back
1.- Type something into autosuggest
2.- Move the focus away by clicking outside the search input
3.- Click back into the input
4.- Autosuggest list should be displayed.
focusautosuggest.mov
Changelog Entry
Credits
Props @oscarssanchezz , @JakePT, @felipeelia
Checklist: