BigW Consortium Gitlab

note_polling_spec.rb 556 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
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
Grzegorz Bizon committed
12 13
    note = create(:note, noteable: issue, project: project,
                         note: 'Looks good!')
14

15
    page.execute_script('notes.refresh();')
16

17 18 19
    expect(page).to have_selector("#note_#{note.id}", text: 'Looks good!')
  end
end