Fix failing test
Test was not waiting for the page to be fully loaded
This commit is contained in:
parent
43252ccbee
commit
bac19f4c5c
1 changed files with 7 additions and 4 deletions
|
@ -1,6 +1,8 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
feature 'Create New Merge Request', feature: true, js: true do
|
feature 'Create New Merge Request', feature: true, js: true do
|
||||||
|
include WaitForAjax
|
||||||
|
|
||||||
let(:user) { create(:user) }
|
let(:user) { create(:user) }
|
||||||
let(:project) { create(:project, :public) }
|
let(:project) { create(:project, :public) }
|
||||||
|
|
||||||
|
@ -53,10 +55,11 @@ feature 'Create New Merge Request', feature: true, js: true do
|
||||||
expect(page.find_link('Side-by-side')[:class]).not_to match(/\bactive\b/)
|
expect(page.find_link('Side-by-side')[:class]).not_to match(/\bactive\b/)
|
||||||
|
|
||||||
click_link 'Side-by-side'
|
click_link 'Side-by-side'
|
||||||
|
wait_for_ajax
|
||||||
|
|
||||||
click_link 'Changes'
|
within '.merge-request' do
|
||||||
|
expect(page).not_to have_css('a.btn.active', text: 'Inline')
|
||||||
expect(page.find_link('Inline')[:class]).not_to match(/\bactive\b/)
|
expect(page).to have_css('a.btn.active', text: 'Side-by-side')
|
||||||
expect(page.find_link('Side-by-side')[:class]).to match(/\bactive\b/)
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue