BigW Consortium Gitlab

note_polling_spec.rb 520 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
12
    note = create(:note_on_issue, noteable: issue, note: 'Looks good!')
13
    page.execute_script('notes.refresh();')
14 15 16
    expect(page).to have_selector("#note_#{note.id}", text: 'Looks good!')
  end
end