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

ensure not showing admin without feature flag set

Ivan Kuchin63ecbe03bb9b
diff --git a/spec/features/admin/project_life_cycle_step_definitions_spec.rb b/spec/features/admin/project_life_cycle_step_definitions_spec.rb
index 5a4e3a2f710..7b84bd61676 100644
--- a/spec/features/admin/project_life_cycle_step_definitions_spec.rb
+++ b/spec/features/admin/project_life_cycle_step_definitions_spec.rb
@@ -61,6 +61,21 @@ RSpec.describe "Projects life cycle settings", :js, :with_cuprite, with_flag: {
end
end
+ context "as admin without feature flag", with_flag: { stages_and_gates: false } do
+ current_user { create(:admin) }
+
+ it "allows viewing definitions" do
+ definitions_page.visit!
+
+ definitions_page.expect_listed([])
+
+ definitions_page.expect_flash(
+ message: "[Error 404] The page you were trying to access doesn't exist or has been removed.",
+ type: :error
+ )
+ end
+ end
+
context "as admin with activated enterprise token", with_ee: %i[customize_life_cycle] do
current_user { create(:admin) }