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

spec for unset feature flag

Tobias Dillmanna86382f3c75a
diff --git a/spec/features/work_packages/table/project_phase_field_spec.rb b/spec/features/work_packages/table/project_phase_field_spec.rb
index fc6ea29a996..3438a1609c2 100644
--- a/spec/features/work_packages/table/project_phase_field_spec.rb
+++ b/spec/features/work_packages/table/project_phase_field_spec.rb
@@ -161,9 +161,12 @@ RSpec.describe "Project phase field in the work package table", :js do
end
end
- # TODO
- # context "with the feature flag being inactive", with_flag: { stages_and_gates: false } do
- # it "does not allow to add the column to a query" do
- # end
- # end
+ context "with the feature flag being inactive", with_flag: { stages_and_gates: false } do
+ let(:query_columns) { %w(subject) }
+
+ it "does not offer to add the column to a query" do
+ wp_table.click_setting_item("Insert column")
+ wp_table.expect_no_column_add_option("Project phase")
+ end
+ end
end
diff --git a/spec/support/pages/work_packages/work_packages_table.rb b/spec/support/pages/work_packages/work_packages_table.rb
index d84bb3d41c5..773a20540b5 100644
--- a/spec/support/pages/work_packages/work_packages_table.rb
+++ b/spec/support/pages/work_packages/work_packages_table.rb
@@ -34,6 +34,7 @@ require_relative "concerns/work_package_by_button_creator"
module Pages
class WorkPackagesTable < Page
include ::Pages::WorkPackages::Concerns::WorkPackageByButtonCreator
+ include ::Components::Autocompleter::NgSelectAutocompleteHelpers
attr_reader :project
@@ -371,6 +372,11 @@ module Pages
Components::WorkPackages::ProgressPopover.new(container: work_package_container(work_package))
end
+ def expect_no_column_add_option(column_name)
+ completer = find(".wp-table--configuration-modal .op-draggable-autocomplete--input")
+ expect_no_ng_option(completer, column_name, results_selector: "body")
+ end
+
protected
def container