Commit 59ddf726 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett Committed by Luke Bennett

Fixed failing tests with WaitForAjax

parent dd79472b
require 'spec_helper' require 'spec_helper'
feature 'Diffs URL', js: true, feature: true do feature 'Diffs URL', js: true, feature: true do
include WaitForAjax
before do before do
login_as :admin login_as :admin
@merge_request = create(:merge_request) @merge_request = create(:merge_request)
...@@ -153,6 +155,7 @@ feature 'Diffs URL', js: true, feature: true do ...@@ -153,6 +155,7 @@ feature 'Diffs URL', js: true, feature: true do
expect(notes_holder_input[:class].include? notes_holder_input_class).to be true expect(notes_holder_input[:class].include? notes_holder_input_class).to be true
notes_holder_input.fill_in 'note[note]', with: test_note_comment notes_holder_input.fill_in 'note[note]', with: test_note_comment
click_button 'Comment' click_button 'Comment'
wait_for_ajax
expect(line_holder).to have_xpath notes_holder_input_xpath expect(line_holder).to have_xpath notes_holder_input_xpath
notes_holder_saved = line_holder.find(:xpath, notes_holder_input_xpath) notes_holder_saved = line_holder.find(:xpath, notes_holder_input_xpath)
expect(notes_holder_saved[:class].include? notes_holder_input_class).to be false expect(notes_holder_saved[:class].include? notes_holder_input_class).to be false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment