summaryrefslogtreecommitdiff
path: root/spec/features/admin
diff options
context:
space:
mode:
authorTaurie Davis, Simon Knox and Adam Niedzielski <awesome@gitlab.com>2017-05-24 12:25:44 +0200
committerAdam Niedzielski <adamsunday@gmail.com>2017-06-01 17:37:21 +0200
commit26dde5f55f1dac2e6bea4f7e1dfa51c72dc756cb (patch)
treef0168cb9ad0be7c4bf8657a5321e5da0bda8e83b /spec/features/admin
parentc72abcefe79dd906cbbf0088b442a8979e9fc746 (diff)
downloadgitlab-ce-26dde5f55f1dac2e6bea4f7e1dfa51c72dc756cb.tar.gz
Add Conversational Development Index page to admin panel
Diffstat (limited to 'spec/features/admin')
-rw-r--r--spec/features/admin/admin_conversational_development_index_spec.rb40
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/features/admin/admin_conversational_development_index_spec.rb b/spec/features/admin/admin_conversational_development_index_spec.rb
new file mode 100644
index 00000000000..739ab907a29
--- /dev/null
+++ b/spec/features/admin/admin_conversational_development_index_spec.rb
@@ -0,0 +1,40 @@
+require 'spec_helper'
+
+describe 'Admin Conversational Development Index' do
+ before do
+ login_as :admin
+ end
+
+ context 'when usage ping is disabled' do
+ it 'shows empty state' do
+ stub_application_setting(usage_ping_enabled: false)
+
+ visit admin_conversational_development_index_path
+
+ expect(page).to have_content('Usage ping is not enabled')
+ end
+ end
+
+ context 'when there is no data to display' do
+ it 'shows empty state' do
+ stub_application_setting(usage_ping_enabled: true)
+
+ visit admin_conversational_development_index_path
+
+ expect(page).to have_content('Data is still calculating')
+ end
+ end
+
+ context 'when there is data to display' do
+ it 'shows numbers for each metric' do
+ stub_application_setting(usage_ping_enabled: true)
+ create(:conversational_development_index_metric)
+
+ visit admin_conversational_development_index_path
+
+ expect(page).to have_content(
+ 'Issues created per active user 1.2 You 9.3 Lead 13.3%'
+ )
+ end
+ end
+end