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

tests[Op#55196]: update project custom field mappings feature tests

Kabiru Mwenjabe606b0dba1c
diff --git a/spec/features/admin/project_custom_fields/project_mappings_spec.rb b/spec/features/admin/project_custom_fields/project_mappings_spec.rb
index 0d9f88287fc..9eb5f65b0f7 100644
--- a/spec/features/admin/project_custom_fields/project_mappings_spec.rb
+++ b/spec/features/admin/project_custom_fields/project_mappings_spec.rb
@@ -76,14 +76,22 @@ RSpec.describe "Project Custom Field Mappings", :js do
it "renders more menu list item" do
project_custom_field_mappings_page.activate_menu_of(project) do |menu|
- expect(menu).to have_link("Delete")
+ expect(menu).to have_link("Deactivate for this project")
end
end
it "allows to unlink a project" do
- project_custom_field_mappings_page.click_menu_item_of("Delete", project)
+ project_custom_field_mappings_page.click_menu_item_of("Deactivate for this project", project)
expect(page).to have_no_text(project.name)
end
+
+ context "and the project custom field is required" do
+ shared_let(:project_custom_field) { create(:project_custom_field, is_required: true) }
+
+ it "renders a blank slate" do
+ expect(page).to have_text("Required in all projects")
+ end
+ end
end
end