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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-08 12:09:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-08 12:09:43 +0300
commitf5050253469fc0961c02deec0e698ad62bdd9de5 (patch)
tree30bbd8f8b556fd5b730f0123921138ee1d6bdaa2 /spec/features
parentf6cdec670b9b757fc2225a2c6627ab79765e5b8a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/admin/dashboard_spec.rb26
-rw-r--r--spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb2
2 files changed, 25 insertions, 3 deletions
diff --git a/spec/features/admin/dashboard_spec.rb b/spec/features/admin/dashboard_spec.rb
index 6cb345c5066..018ef13cbb6 100644
--- a/spec/features/admin/dashboard_spec.rb
+++ b/spec/features/admin/dashboard_spec.rb
@@ -2,14 +2,14 @@
require 'spec_helper'
-describe 'admin visits dashboard', :js do
+describe 'admin visits dashboard' do
include ProjectForksHelper
before do
sign_in(create(:admin))
end
- context 'counting forks' do
+ context 'counting forks', :js do
it 'correctly counts 2 forks of a project' do
project = create(:project)
project_fork = fork_project(project)
@@ -25,4 +25,26 @@ describe 'admin visits dashboard', :js do
expect(page).to have_content('Forks 2')
end
end
+
+ describe 'Users statistic' do
+ let_it_be(:users_statistics) { create(:users_statistics) }
+
+ it 'shows correct amounts of users', :aggregate_failures do
+ expected_active_users_text = Gitlab.ee? ? 'Active users (Billable users) 71' : 'Active users 71'
+
+ sign_in(create(:admin))
+ visit admin_dashboard_stats_path
+
+ expect(page).to have_content('Users without a Group and Project 23')
+ expect(page).to have_content('Users with highest role Guest 5')
+ expect(page).to have_content('Users with highest role Reporter 9')
+ expect(page).to have_content('Users with highest role Developer 21')
+ expect(page).to have_content('Users with highest role Maintainer 6')
+ expect(page).to have_content('Users with highest role Owner 5')
+ expect(page).to have_content('Bots 2')
+ expect(page).to have_content(expected_active_users_text)
+ expect(page).to have_content('Blocked users 7')
+ expect(page).to have_content('Total users 78')
+ end
+ end
end
diff --git a/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb b/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb
index f8179979018..2eaa2d24c4b 100644
--- a/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb
+++ b/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb
@@ -174,7 +174,7 @@ describe 'Set up Mattermost slash commands', :js do
describe 'stable logo url' do
it 'shows a publicly available logo' do
- expect(File.exist?(Rails.root.join('public/slash-command-logo.png')))
+ expect(File.exist?(Rails.root.join('public/slash-command-logo.png'))).to be_truthy
end
end
end