diff options
author | Luke Bennett <lukeeeebennettplus@gmail.com> | 2016-08-21 09:32:06 +0100 |
---|---|---|
committer | Luke Bennett <lukeeeebennettplus@gmail.com> | 2016-08-22 00:20:03 +0100 |
commit | 5906cca0135c0044d984417a745ba9f5e644c5e5 (patch) | |
tree | 9b226942c2239af131c3fa9a8c42c22f42c339d8 | |
parent | 884baf2659cc7e220ed3fd6ebb6a66d9e15b7e6b (diff) | |
download | gitlab-ce-tests-for-diff-notes.tar.gz |
Fixed timing issue with selecting parallel or inline view typestests-for-diff-notes
-rw-r--r-- | spec/features/merge_requests/diff_notes_spec.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/features/merge_requests/diff_notes_spec.rb b/spec/features/merge_requests/diff_notes_spec.rb index e1da6338ae4..b8f82d06e19 100644 --- a/spec/features/merge_requests/diff_notes_spec.rb +++ b/spec/features/merge_requests/diff_notes_spec.rb @@ -17,8 +17,7 @@ feature 'Diff notes', js: true, feature: true do context 'when hovering over the parallel view diff file' do before(:each) do - visit diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request) - click_link 'Side-by-side' + visit diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request, view: 'parallel') end context 'with an old line on the left and no line on the right' do @@ -74,8 +73,7 @@ feature 'Diff notes', js: true, feature: true do context 'when hovering over the inline view diff file' do before do - visit diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request) - click_link 'Inline' + visit diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request, view: 'inline') end context 'with a new line' do @@ -109,7 +107,6 @@ feature 'Diff notes', js: true, feature: true do expect(line[:num]).to have_css comment_button_class comment_on_line(line_holder, line) - wait_for_ajax assert_comment_persistence(line_holder) end @@ -150,6 +147,7 @@ feature 'Diff notes', js: true, feature: true do notes_holder_input.fill_in 'note[note]', with: test_note_comment click_button 'Comment' + wait_for_ajax end def assert_comment_persistence(line_holder) |