diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-06-05 09:18:12 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-06-05 09:18:12 +0000 |
commit | 3b39cf4e0c5d0ca680a40bb7232fee4f7fdfb02e (patch) | |
tree | ef2c85a93d787ca15ee857f1aa3754e58dbc163e /spec/features/admin | |
parent | e90ca0f0fcae087f95b92a4699f884167b47eaaf (diff) | |
parent | d913ce176351094e2908344206a6136163fdfa89 (diff) | |
download | gitlab-ce-3b39cf4e0c5d0ca680a40bb7232fee4f7fdfb02e.tar.gz |
Merge branch '30469-convdev-index' into 'master'
ConvDev Index
Closes #30469
See merge request !11377
Diffstat (limited to 'spec/features/admin')
-rw-r--r-- | spec/features/admin/admin_conversational_development_index_spec.rb | 40 |
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 |