diff options
author | Luke Bennett <lukeeeebennettplus@gmail.com> | 2016-10-13 04:33:09 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2016-12-15 15:20:33 +0000 |
commit | 1356e40f22c555f676777ed9385a12b09c19fdce (patch) | |
tree | b8291341f9ea2dbdda5db5254b70bf631162ae69 /spec/features/participants_autocomplete_spec.rb | |
parent | 677e7e837e3fb41deb46cb77de8b9395d031c07c (diff) | |
download | gitlab-ce-1356e40f22c555f676777ed9385a12b09c19fdce.tar.gz |
Changed autocomplete_sources into an action that returns a single 'at' type of sources at a time18435-autocomplete-is-not-performant
Finished up autocomplete_sources action and added frontend to fetch data only when its needed
Added wait_for_ajax to specs
Fixed builds and improved the setup/destroy lifecycle
Changed global namespace and DRYed up loading logic
Added safety for accidentally loading data twice
Removed destroy as its not necessary and is messing with click events from a blur race condition
Created AutocompleteSourcesController and updated routes
Fixed @undefined from tabbing before load ends
Disable tabSelectsMatch until we have loaded data
Review changes
Diffstat (limited to 'spec/features/participants_autocomplete_spec.rb')
-rw-r--r-- | spec/features/participants_autocomplete_spec.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/features/participants_autocomplete_spec.rb b/spec/features/participants_autocomplete_spec.rb index a78a1c9c890..c2545b0c259 100644 --- a/spec/features/participants_autocomplete_spec.rb +++ b/spec/features/participants_autocomplete_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' feature 'Member autocomplete', feature: true do + include WaitForAjax + let(:project) { create(:project, :public) } let(:user) { create(:user) } let(:participant) { create(:user) } @@ -79,11 +81,10 @@ feature 'Member autocomplete', feature: true do end def open_member_suggestions - sleep 1 page.within('.new-note') do - sleep 1 - find('#note_note').native.send_keys('@') + find('#note_note').send_keys('@') end + wait_for_ajax end def visit_issue(project, issue) |