Welcome to mirror list, hosted at ThFree Co, Russian Federation.

note_polling_spec.rb « issues « features « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1698a0a3e5daae34395c69a45c810f56d302931a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
    note = create(:note_on_issue, noteable: issue,
                  project_id: project.project_id,
                  note: 'Looks good!')
    sleep 16 # refresh interval in notes.js.coffee, 15 seconds
    expect(page).to have_selector("#note_#{note.id}", text: 'Looks good!')
  end
end