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

Add multi version custom field spec

Dombi Attila3020f45e2048
diff --git a/spec/features/custom_fields/multi_version_custom_field_spec.rb b/spec/features/custom_fields/multi_version_custom_field_spec.rb
index 3dfc30f16f9..323713de720 100644
--- a/spec/features/custom_fields/multi_version_custom_field_spec.rb
+++ b/spec/features/custom_fields/multi_version_custom_field_spec.rb
@@ -2,6 +2,8 @@ require "spec_helper"
require "support/pages/work_packages/abstract_work_package"
RSpec.describe "multi version custom field", :js do
+ include Components::Autocompleter::NgSelectAutocompleteHelpers
+
shared_let(:admin) { create(:admin) }
let(:current_user) { admin }
let(:wp_page) { Pages::FullWorkPackage.new work_package }
@@ -98,8 +100,12 @@ RSpec.describe "multi version custom field", :js do
expect(page).to have_text "Version Current"
page.find(".inline-edit--display-field", text: "Version Old").click
-
cf_edit_field.unset_value "Version Old", multi: true
+
+ expect_ng_option(cf_edit_field, version_old, grouping: project.name, results_selector: "body")
+ expect_no_ng_option(cf_edit_field, version_current, results_selector: "body")
+ expect_ng_option(cf_edit_field, version_future, grouping: project.name, results_selector: "body")
+
cf_edit_field.set_value "Version Future"
click_on "Fix version: Save"