2015-12-12 17:42:52 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
feature 'Issue notes polling' do
|
|
|
|
let!(:project) { create(:project, :public) }
|
|
|
|
let!(:issue) { create(:issue, project: project) }
|
|
|
|
|
|
|
|
background do
|
|
|
|
visit namespace_project_issue_path(project.namespace, project, issue)
|
|
|
|
end
|
|
|
|
|
|
|
|
scenario 'Another user adds a comment to an issue', js: true do
|
2016-05-18 13:38:52 -04:00
|
|
|
note = create(:note, noteable: issue, project: project,
|
|
|
|
note: 'Looks good!')
|
2016-04-26 07:52:18 -04:00
|
|
|
|
2015-12-14 03:41:59 -05:00
|
|
|
page.execute_script('notes.refresh();')
|
2016-04-26 07:52:18 -04:00
|
|
|
|
2015-12-12 17:42:52 -05:00
|
|
|
expect(page).to have_selector("#note_#{note.id}", text: 'Looks good!')
|
|
|
|
end
|
|
|
|
end
|