Skip to content

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

adjust specs

Bruno Pagnof7d9ddd2450c
diff --git a/spec/features/projects/settings/activities_settings_spec.rb b/spec/features/projects/settings/activities_settings_spec.rb
index 47023654056..965cb437f49 100644
--- a/spec/features/projects/settings/activities_settings_spec.rb
+++ b/spec/features/projects/settings/activities_settings_spec.rb
@@ -36,7 +36,7 @@ RSpec.describe "WorkPackages-Settings-Activities", :js do
current_user { create(:admin) }
- it "enables and disables the settings for the project" do
+ it "enables and disables the settings for the project", with_ee: %i[comments_with_restricted_visibility] do
activities_settings_page.visit!
expect(page).to have_css("#activities-form")
diff --git a/spec/features/projects/settings/work_packages_settings_spec.rb b/spec/features/projects/settings/work_packages_settings_spec.rb
index 7d7aa81dba3..16b3ac3140d 100644
--- a/spec/features/projects/settings/work_packages_settings_spec.rb
+++ b/spec/features/projects/settings/work_packages_settings_spec.rb
@@ -72,7 +72,7 @@ RSpec.describe "Projects", "work packages settings menu", :js do
end
end
- context "when the user has access to the activities tab" do
+ context "when the user has access to the activities tab", with_ee: %i[comments_with_restricted_visibility] do
let(:permissions) { %i(edit_project view_work_packages) }
current_user { create(:user, member_with_permissions: { project => permissions }) }
@@ -84,6 +84,17 @@ RSpec.describe "Projects", "work packages settings menu", :js do
end
end
+ context "when the user has access to activities tab but not to enterprise" do
+ let(:permissions) { %i(edit_project view_work_packages) }
+
+ current_user { create(:user, member_with_permissions: { project => permissions }) }
+
+ it "shows the enterprise banner" do
+ work_packages_settings_page.visit!
+ expect(page).to have_test_selector("op-ee-banner-comments-with-restricted-visibility")
+ end
+ end
+
context "when the user does not have access to any tabs" do
let(:permissions) { %i(view_work_packages) }