The autocomplete on the "Add content item" widget is actually pretty sophisticated! It should only show options for nodes of the selected "Content Type" and it shouldn't cache results when the user changes the "Content Type".
This used to be broken and this issue has a pretty good description of how this is supposed to work: #2374715: "Content Type" filter on the "Add content item" widget is broken
We need Behat tests to verify that it continues to work the way it should!
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | panopoly_test-contentitem-autocomplete-2374827-6.patch | 4.11 KB | dsnopek |
Comments
Comment #1
dsnopekBehat has an "a" in it. :-)
Comment #2
dsnopekHere's an example of a step that fills in autocomplete and selects the first option:
https://gist.github.com/IslandUsurper/12723643dddc9315ff71
Comment #3
shawn dearmond commentedComment #4
shawn dearmond commentedI added the step to panopoly_test.behat.inc and added the test to contentitem_widget.feature
Comment #5
lsolesen commented@Shawn DeArmond It seems that indentation in the patch for the step is off and there is extra lines in the function.
Comment #6
dsnopek@Shawn DeArmond: Thanks for the patch!
I second @lsolesen's review. Also, I tried the test myself and it wasn't working because it would try to press the down arrow before the autocomplete options were visible. I tried a bunch of things but only could get a
sleep(1)to get it working for me.Attached is a new version of the patch that fixes the indentation and gets the test working for me. I'll try this on Travis next and see if it runs there.
EDIT: Here's the Travis-CI build: https://travis-ci.org/panopoly/panopoly/builds/63691408
Comment #7
dsnopekComment #8
dsnopekThe
sleep(1)is messy, but it worked on Travis-CI which is good enough for me for now. :-) We can always open another issue later to try and get rid of that!So, committed! Thanks for your work on this. :-)