Commit bac19f4c authored by Alfredo Sumaran's avatar Alfredo Sumaran

Fix failing test

Test was not waiting for the page to be fully loaded
parent 43252ccb
require 'spec_helper'
feature 'Create New Merge Request', feature: true, js: true do
include WaitForAjax
let(:user) { create(:user) }
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/)
click_link 'Side-by-side'
wait_for_ajax
click_link 'Changes'
expect(page.find_link('Inline')[:class]).not_to match(/\bactive\b/)
expect(page.find_link('Side-by-side')[:class]).to match(/\bactive\b/)
within '.merge-request' do
expect(page).not_to have_css('a.btn.active', text: 'Inline')
expect(page).to have_css('a.btn.active', text: 'Side-by-side')
end
end
end
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