Test using autocomplete / typeahead fields#22
Open
pfrenssen wants to merge 1 commit intominkphp:masterfrom
Open
Test using autocomplete / typeahead fields#22pfrenssen wants to merge 1 commit intominkphp:masterfrom
pfrenssen wants to merge 1 commit intominkphp:masterfrom
Conversation
aik099
reviewed
Jul 22, 2018
| $this->getSession()->getPage()->fillField('autocomplete', 'arc'); | ||
| $this->getSession()->wait(5000, '$("ul.ui-autocomplete li").is(":visible") === true'); | ||
|
|
||
| $this->assertContains('Arctic fox', $this->getSession()->getPage()->getText()); |
Member
There was a problem hiding this comment.
When you fill arc into the input, then auto-complete results will show, but current field value won't be set to 1st match. Or does work like that?
Author
There was a problem hiding this comment.
I used the jQuery UI Autocomplete library which doesn't automatically fill up the field as you type. It shows the results in a dropdown, you can then use the arrow down / arrow up keys to select the right value, and then pressing enter will put the value in the field.
The test is now just checking that the autocomplete results show up in the dropdown. If you want I can also add coverage for selecting the results with the arrow keys, and then checking that the final value appears in the field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a test for a regression in MinkSelenium2Driver. Ref. minkphp/MinkSelenium2Driver#286