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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz.bizon@ntsn.pl>2015-12-13 01:42:52 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2015-12-15 16:19:35 +0300
commit7c14541d2bb9735402086c951730344fa5203278 (patch)
tree0cfcdc83cb0f2aabe010dd052ab4b03da3afc5f2 /spec/features
parent9451db3819ae45734c4343e55a74d347cdacf70d (diff)
Add feature specs for note polling
Ref. #4032, !2084
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/issues/note_polling_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/features/issues/note_polling_spec.rb b/spec/features/issues/note_polling_spec.rb
new file mode 100644
index 00000000000..1698a0a3e5d
--- /dev/null
+++ b/spec/features/issues/note_polling_spec.rb
@@ -0,0 +1,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