diff options
author | Phil Hughes <me@iamphill.com> | 2017-08-08 14:25:00 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-08-15 16:09:36 +0100 |
commit | 554afea059446384783f3c68c09ac56afa0e7d49 (patch) | |
tree | 950495ef2a046ccf514dfeab8cacb38b7e817497 /spec | |
parent | 0ec87b3bf0ac27af5f5fedf97d51c8b14b050f50 (diff) | |
download | gitlab-ce-554afea059446384783f3c68c09ac56afa0e7d49.tar.gz |
Fix race condition with dispatcher.jsdispatcher-race-condition-fix
The dispatcher was trying to create a new instance of a class that is loaded in a file after main.js which would cause the filtered search to not work on issues. This would only happen on the first load when the JS is not cached. If the JS is cached, then everything will be fine.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/merge_requests/conflicts_spec.rb | 10 | ||||
-rw-r--r-- | spec/helpers/version_check_helper_spec.rb | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/spec/features/merge_requests/conflicts_spec.rb b/spec/features/merge_requests/conflicts_spec.rb index 2c560632a1b..2d2c674f8fb 100644 --- a/spec/features/merge_requests/conflicts_spec.rb +++ b/spec/features/merge_requests/conflicts_spec.rb @@ -28,11 +28,12 @@ feature 'Merge request conflict resolution', js: true do end click_button 'Commit conflict resolution' - wait_for_requests expect(page).to have_content('All merge conflicts were resolved') merge_request.reload_diff + wait_for_requests + click_on 'Changes' wait_for_requests @@ -69,10 +70,12 @@ feature 'Merge request conflict resolution', js: true do end click_button 'Commit conflict resolution' - wait_for_requests + expect(page).to have_content('All merge conflicts were resolved') merge_request.reload_diff + wait_for_requests + click_on 'Changes' wait_for_requests @@ -140,12 +143,13 @@ feature 'Merge request conflict resolution', js: true do end click_button 'Commit conflict resolution' - wait_for_requests expect(page).to have_content('All merge conflicts were resolved') merge_request.reload_diff + wait_for_requests + click_on 'Changes' wait_for_requests click_link 'Expand all' diff --git a/spec/helpers/version_check_helper_spec.rb b/spec/helpers/version_check_helper_spec.rb index 889fe441171..5eba03ef576 100644 --- a/spec/helpers/version_check_helper_spec.rb +++ b/spec/helpers/version_check_helper_spec.rb @@ -23,7 +23,7 @@ describe VersionCheckHelper do end it 'should have a js prefixed css class' do - expect(@image_tag).to match(/class="js-version-status-badge"/) + expect(@image_tag).to match(/class="js-version-status-badge lazy"/) end it 'should have a VersionCheck url as the src' do |