Commit 830ccdfd authored by Alfredo Sumaran's avatar Alfredo Sumaran

Fix failing specs

parent d84f1180
require 'rails_helper' require 'rails_helper'
feature 'Multiple issue updating from issues#index', feature: true do feature 'Multiple issue updating from issues#index', feature: true do
include WaitForAjax
let!(:project) { create(:project) } let!(:project) { create(:project) }
let!(:issue) { create(:issue, project: project) } let!(:issue) { create(:issue, project: project) }
let!(:user) { create(:user)} let!(:user) { create(:user)}
...@@ -24,9 +26,7 @@ feature 'Multiple issue updating from issues#index', feature: true do ...@@ -24,9 +26,7 @@ feature 'Multiple issue updating from issues#index', feature: true do
it 'should be set to open' do it 'should be set to open' do
create_closed create_closed
visit namespace_project_issues_path(project.namespace, project) visit namespace_project_issues_path(project.namespace, project, state: 'closed')
find('.issues-state-filters a', text: 'Closed').click
find('#check_all_issues').click find('#check_all_issues').click
find('.js-issue-status').click find('.js-issue-status').click
...@@ -61,8 +61,8 @@ feature 'Multiple issue updating from issues#index', feature: true do ...@@ -61,8 +61,8 @@ feature 'Multiple issue updating from issues#index', feature: true do
click_link 'Unassigned' click_link 'Unassigned'
click_update_issues_button click_update_issues_button
sleep 1 # needed
within first('.issue .controls') do page.within first('.issue .controls') do
expect(page).to have_no_selector('.author_link') expect(page).to have_no_selector('.author_link')
end end
end end
...@@ -95,7 +95,8 @@ feature 'Multiple issue updating from issues#index', feature: true do ...@@ -95,7 +95,8 @@ feature 'Multiple issue updating from issues#index', feature: true do
find('.dropdown-menu-milestone a', text: "No Milestone").click find('.dropdown-menu-milestone a', text: "No Milestone").click
click_update_issues_button click_update_issues_button
expect(first('.issue')).not_to have_content milestone.title sleep 1 # needed
expect(first('.issue')).to_not have_content milestone.title
end end
end end
...@@ -113,5 +114,6 @@ feature 'Multiple issue updating from issues#index', feature: true do ...@@ -113,5 +114,6 @@ feature 'Multiple issue updating from issues#index', feature: true do
def click_update_issues_button def click_update_issues_button
find('.update_selected_issues').click find('.update_selected_issues').click
wait_for_ajax
end 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