2015-12-12 22:42:52 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-04-19 19:48:48 +00:00
|
|
|
feature 'Issue notes polling', :feature, :js do
|
|
|
|
let(:project) { create(:empty_project, :public) }
|
|
|
|
let(:issue) { create(:issue, project: project) }
|
2015-12-12 22:42:52 +00:00
|
|
|
|
2017-04-19 19:48:48 +00:00
|
|
|
before do
|
2015-12-12 22:42:52 +00:00
|
|
|
visit namespace_project_issue_path(project.namespace, project, issue)
|
|
|
|
end
|
|
|
|
|
2017-04-19 19:48:48 +00:00
|
|
|
it 'should display the new comment' do
|
|
|
|
note = create(:note, noteable: issue, project: project, note: 'Looks good!')
|
2015-12-14 08:41:59 +00:00
|
|
|
page.execute_script('notes.refresh();')
|
2016-04-26 11:52:18 +00:00
|
|
|
|
2015-12-12 22:42:52 +00:00
|
|
|
expect(page).to have_selector("#note_#{note.id}", text: 'Looks good!')
|
|
|
|
end
|
|
|
|
end
|