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:
authorFrancisco Javier López <fjlopez@gitlab.com>2018-07-06 10:51:31 +0300
committerDouwe Maan <douwe@gitlab.com>2018-07-06 10:51:31 +0300
commit837c3b3d7322c56aa7baeec9b8fb617afe5b5e5c (patch)
treeb6da7ba13c76c13e3afee03c11b7524f896f207f /spec/features/dashboard
parent83f79ced3fd98031194e5667c4d80f66d7987c67 (diff)
Fix User role displayed on projects dashboard
Diffstat (limited to 'spec/features/dashboard')
-rw-r--r--spec/features/dashboard/projects_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/features/dashboard/projects_spec.rb b/spec/features/dashboard/projects_spec.rb
index 46935662288..8647616101b 100644
--- a/spec/features/dashboard/projects_spec.rb
+++ b/spec/features/dashboard/projects_spec.rb
@@ -29,6 +29,34 @@ describe 'Dashboard Projects' do
end
end
+ context 'when user has access to the project' do
+ it 'shows role badge' do
+ visit dashboard_projects_path
+
+ page.within '.user-access-role' do
+ expect(page).to have_content('Developer')
+ end
+ end
+
+ context 'when role changes', :use_clean_rails_memory_store_fragment_caching do
+ it 'displays the right role' do
+ visit dashboard_projects_path
+
+ page.within '.user-access-role' do
+ expect(page).to have_content('Developer')
+ end
+
+ project.members.last.update(access_level: 40)
+
+ visit dashboard_projects_path
+
+ page.within '.user-access-role' do
+ expect(page).to have_content('Maintainer')
+ end
+ end
+ end
+ end
+
context 'when last_repository_updated_at, last_activity_at and update_at are present' do
it 'shows the last_repository_updated_at attribute as the update date' do
project.update_attributes!(last_repository_updated_at: Time.now, last_activity_at: 1.hour.ago)