Typeahead
-Types 'ge' into search window
-Verifies typeaheads
openAndWait / (open the main interface)
comment Wait for page to load up
waitForDispatchCompleted 30000
verifyTextNotPresent gecko 'gecko' shouldn't appear (if so del cache)
comment Simulate the user typing 'gecko'
click entry Click the search box
type entry gecko
keyUp entry 103
waitForVisible //div[@id='searchFieldTypeAhead']/div/label
comment Verify that 'gecko' is the first result
verifyText //div[@id='searchFieldTypeAhead']/div/label[1] *gecko
comment TODO - Verify a few others.
comment TODO - Simulate the user typing g, arrow-down-twice, and pressing tab
comment Check to see if 'gecko' appears in the search results
comment TODO Press Arrow keys to move down to a given result
comment TODO press tab character
comment verify search did not submit
comment type in webapprequ
click entry Click the search box
type entry webapprequ
comment fire correct events for the 'e' char
keyDown entry 101
keyPress entry 101
keyUp entry 101
waitForVisible //div[@id='searchFieldTypeAhead']/div/label
comment Check to see if 'webapprequestdispatcher' appears in the autosearch results
verifyText //div[@id='searchFieldTypeAhead']/div/label[2] *webapprequestdispatcher*
comment Check the count is also right
verifyText //div[@id='searchFieldTypeAhead']/div/label[2] (6)*
comment TODO - Verify a couple tokens selected at random, that searching for only that token, over all time, returns the right number of results.
comment Simulate the user typing a string with xml-illegal chars
click entry Click the search box
type entry foo><
keyUp entry 103
waitForVisible //div[@id='searchFieldTypeAhead']/div/label
comment Verify that we didnt explode
verifyText //div[@id='searchFieldTypeAhead']/div/label[1] *(No matches found)
comment Try and find the unmatched closing parens case.
click entry Click the search box
comment Verify a specific case that used to fail (SPL-6538)
type entry punct="[___::_]_[]__:__(:
keyUp entry 95
keyUp entry \95
waitForVisible //div[@id='searchFieldTypeAhead']/div/label
verifyText //div[@id='searchFieldTypeAhead']/div/label[1] *punct="[___::_]_[]__:__(:_)"
comment Arrow down
keyDown entry \40
comment Tab char, to get typeahead to dump out the word.
keyDown entry \9
pause 1000
comment Verify that typeahead auto-quoted the string.
verifyValue entry punct="[___::_]_[]__:__(:_)"
comment SPL-7119 -- can't type '(' when the typeahead menu is open
click entry Click the search box
type entry s (
verifyValue entry s (