canvas-lms/spec/coffeescripts/jquery
Brent Burgoyne cdf3f96439 abort previous request in course/user search
if the reqeuest is not complete. also increase the debounce time to
reduce the chance of making more expensive search requests than
needed if someone is typing slow. without this fix the search was
making multiple requests to the server and would always show the last
results to come back regardless of order. this would lead to cases
where the right results show temporarily then the wrong results show
immediately after.

closes CORE-1347

test plan:
- test with course and user search. it will help to have a ton of
  records to make the search slow. when i tested I just added
  `sleep (rand 3) + 1` to each of the api controller actions to
  simulate slow search and make it more likely requests will come
  back in the wrong order.
- have the network tab open
- if you type in the search bar slowly enough to trigger multiple
  request the unfinished requests should be aborted
- results should always match the search term

Change-Id: I8953d73ea81784e4080cd64412effa0e95520761
Reviewed-on: https://gerrit.instructure.com/150218
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Matt Miller <mmiller@instructure.com>
2018-05-25 18:29:15 +00:00
..
ModuleSequenceFooterSpec.js Bump canvas-rce to 3.1.0 2018-03-30 20:46:29 +00:00
ajaxJSONSpec.js abort previous request in course/user search 2018-05-25 18:29:15 +00:00
fixDialogButtonsSpec.js [spec][decaffeinate] convert coffe specs to js syntax 2018-02-22 16:45:17 +00:00
mediaCommentSpec.js [spec][decaffeinate] convert coffe specs to js syntax 2018-02-22 16:45:17 +00:00
mediaCommentThumbnailSpec.js [spec][decaffeinate] convert coffe specs to js syntax 2018-02-22 16:45:17 +00:00
outerclickSpec.js [spec][decaffeinate] convert coffe specs to js syntax 2018-02-22 16:45:17 +00:00
redirectClickToSpec.js [spec][decaffeinate] convert coffe specs to js syntax 2018-02-22 16:45:17 +00:00
serializeFormSpec.js [spec][decaffeinate] convert coffe specs to js syntax 2018-02-22 16:45:17 +00:00