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:
authorSean McGivern <sean@mcgivern.me.uk>2018-07-27 16:12:35 +0300
committerSean McGivern <sean@mcgivern.me.uk>2018-07-27 16:12:35 +0300
commited81ee9ba2b5a0b68996ccb238bfa4c69a6df062 (patch)
tree831e186cd5ed4072a0883c4eac563cbcd9c70f23 /spec/features
parent636ea40e182fca92e89facbcb52445fcefef9506 (diff)
Revert "Merge branch '41416-making-instance-wide-data-tools-more-accessible' into 'master'"
This reverts merge request !20679
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/admin/admin_cohorts_spec.rb (renamed from spec/features/instance_statistics/cohorts_spec.rb)4
-rw-r--r--spec/features/admin/admin_conversational_development_index_spec.rb (renamed from spec/features/instance_statistics/conversational_development_index_spec.rb)8
-rw-r--r--spec/features/dashboard/active_tab_spec.rb28
-rw-r--r--spec/features/dashboard/instance_statistics_spec.rb60
4 files changed, 17 insertions, 83 deletions
diff --git a/spec/features/instance_statistics/cohorts_spec.rb b/spec/features/admin/admin_cohorts_spec.rb
index 81fc5eff980..9dce9494b97 100644
--- a/spec/features/instance_statistics/cohorts_spec.rb
+++ b/spec/features/admin/admin_cohorts_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-describe 'Cohorts page' do
+describe 'Admin cohorts page' do
before do
sign_in(create(:admin))
end
@@ -8,7 +8,7 @@ describe 'Cohorts page' do
it 'See users count per month' do
2.times { create(:user) }
- visit instance_statistics_cohorts_path
+ visit admin_cohorts_path
expect(page).to have_content("#{Time.now.strftime('%b %Y')} 3 0")
end
diff --git a/spec/features/instance_statistics/conversational_development_index_spec.rb b/spec/features/admin/admin_conversational_development_index_spec.rb
index d441a7a5af9..2d2c7df5364 100644
--- a/spec/features/instance_statistics/conversational_development_index_spec.rb
+++ b/spec/features/admin/admin_conversational_development_index_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe 'Conversational Development Index' do
+describe 'Admin Conversational Development Index' do
before do
sign_in(create(:admin))
end
@@ -9,7 +9,7 @@ describe 'Conversational Development Index' do
it 'shows empty state' do
stub_application_setting(usage_ping_enabled: false)
- visit instance_statistics_conversational_development_index_index_path
+ visit admin_conversational_development_index_path
expect(page).to have_content('Usage ping is not enabled')
end
@@ -19,7 +19,7 @@ describe 'Conversational Development Index' do
it 'shows empty state' do
stub_application_setting(usage_ping_enabled: true)
- visit instance_statistics_conversational_development_index_index_path
+ visit admin_conversational_development_index_path
expect(page).to have_content('Data is still calculating')
end
@@ -30,7 +30,7 @@ describe 'Conversational Development Index' do
stub_application_setting(usage_ping_enabled: true)
create(:conversational_development_index_metric)
- visit instance_statistics_conversational_development_index_index_path
+ visit admin_conversational_development_index_path
expect(page).to have_content(
'Issues created per active user 1.2 You 9.3 Lead 13.3%'
diff --git a/spec/features/dashboard/active_tab_spec.rb b/spec/features/dashboard/active_tab_spec.rb
index f4d0f82d248..8bab501134b 100644
--- a/spec/features/dashboard/active_tab_spec.rb
+++ b/spec/features/dashboard/active_tab_spec.rb
@@ -7,38 +7,32 @@ RSpec.describe 'Dashboard Active Tab', :js do
shared_examples 'page has active tab' do |title|
it "#{title} tab" do
- subject
-
expect(page).to have_selector('.navbar-sub-nav li.active', count: 1)
expect(find('.navbar-sub-nav li.active')).to have_content(title)
end
end
context 'on dashboard projects' do
- it_behaves_like 'page has active tab', 'Projects' do
- subject { visit dashboard_projects_path }
+ before do
+ visit dashboard_projects_path
end
+
+ it_behaves_like 'page has active tab', 'Projects'
end
context 'on dashboard groups' do
- it_behaves_like 'page has active tab', 'Groups' do
- subject { visit dashboard_groups_path }
+ before do
+ visit dashboard_groups_path
end
+
+ it_behaves_like 'page has active tab', 'Groups'
end
context 'on activity projects' do
- it_behaves_like 'page has active tab', 'Activity' do
- subject { visit activity_dashboard_path }
+ before do
+ visit activity_dashboard_path
end
- end
- context 'on instance statistics' do
- subject { visit instance_statistics_root_path }
-
- it 'shows Instance Statistics` as active' do
- subject
-
- expect(find('.navbar-sub-nav li.active')).to have_link('Instance Statistics')
- end
+ it_behaves_like 'page has active tab', 'Activity'
end
end
diff --git a/spec/features/dashboard/instance_statistics_spec.rb b/spec/features/dashboard/instance_statistics_spec.rb
deleted file mode 100644
index 21ee2796bd8..00000000000
--- a/spec/features/dashboard/instance_statistics_spec.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe 'Showing instance statistics' do
- before do
- sign_in user if user
- end
-
- # Using a path that is publicly accessible
- subject { visit explore_projects_path }
-
- context 'for unauthenticated users' do
- let(:user) { nil }
-
- it 'does not show the instance statistics link' do
- subject
-
- expect(page).not_to have_link('Instance Statistics')
- end
- end
-
- context 'for regular users' do
- let(:user) { create(:user) }
-
- context 'when instance statistics are publicly available' do
- before do
- stub_application_setting(instance_statistics_visibility_private: false)
- end
-
- it 'shows the instance statistics link' do
- subject
-
- expect(page).to have_link('Instance Statistics')
- end
- end
-
- context 'when instance statistics are not publicly available' do
- before do
- stub_application_setting(instance_statistics_visibility_private: true)
- end
-
- it 'shows the instance statistics link' do
- subject
-
- expect(page).not_to have_link('Instance Statistics')
- end
- end
- end
-
- context 'for admins' do
- let(:user) { create(:admin) }
-
- it 'shows the instance statistics link' do
- subject
-
- expect(page).to have_link('Instance Statistics')
- end
- end
-end