OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
add specs for project list sharing
Tobias Dillmannddaf174be83a
diff --git a/spec/features/projects/persisted_lists_sharing_spec.rb b/spec/features/projects/persisted_lists_sharing_spec.rbindex 32d7f904baa..3c209d5f71f 100644--- a/spec/features/projects/persisted_lists_sharing_spec.rb+++ b/spec/features/projects/persisted_lists_sharing_spec.rb@@ -178,6 +178,44 @@ RSpec.describe "Project list sharing",# projects_index_page.expect_toast(message: "The modified list has been saved")endend++ context "when searching for users to share with" do+ it "does not show the mail address of other users" do+ using_session "sharer" do+ login_as(sharer)++ projects_index_page.visit!+ projects_index_page.set_sidebar_filter "Member-of list"+ projects_index_page.open_share_dialog++ share_dialog.expect_open+ target_dropdown = share_dialog.search_user("")++ expect(target_dropdown).to have_css(".ng-option", text: wildcard_user.firstname)+ expect(target_dropdown).to have_no_css(".ng-option", text: wildcard_user.mail)+ end+ end++ context "with permission to see emails" do+ let!(:standard) { create(:standard_global_role) }++ it "does show the mail address of other users" do+ using_session "sharer" do+ login_as(sharer)++ projects_index_page.visit!+ projects_index_page.set_sidebar_filter "Member-of list"+ projects_index_page.open_share_dialog++ share_dialog.expect_open+ target_dropdown = share_dialog.search_user("")++ expect(target_dropdown).to have_css(".ng-option", text: wildcard_user.firstname)+ expect(target_dropdown).to have_css(".ng-option", text: wildcard_user.mail)+ end+ end+ end+ endendcontext "without the permission to manage public project lists" do