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]: collapse assertions for efficiency

Kabiru Mwenja14d343fb3919
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 9eb5f65b0f7..2491b114c14 100644
--- a/spec/features/admin/project_custom_fields/project_mappings_spec.rb
+++ b/spec/features/admin/project_custom_fields/project_mappings_spec.rb
@@ -52,38 +52,34 @@ RSpec.describe "Project Custom Field Mappings", :js do
visit project_mappings_admin_settings_project_custom_field_path(project_custom_field)
end
- it "shows a correct breadcrumb menu" do
- within ".PageHeader-breadcrumbs" do
- expect(page).to have_link("Administration")
- expect(page).to have_link("Projects")
- expect(page).to have_link("Project attributes")
- expect(page).to have_text(project_custom_field.name)
+ it "renders the project custom field mappings page" do
+ aggregate_failures "shows a correct breadcrumb menu" do
+ within ".PageHeader-breadcrumbs" do
+ expect(page).to have_link("Administration")
+ expect(page).to have_link("Projects")
+ expect(page).to have_link("Project attributes")
+ expect(page).to have_text(project_custom_field.name)
+ end
end
- end
- it "shows tab navigation" do
- within_test_selector("project_attribute_detail_header") do
- expect(page).to have_link("Details")
- expect(page).to have_link("Projects")
+ aggregate_failures "shows tab navigation" do
+ within_test_selector("project_attribute_detail_header") do
+ expect(page).to have_link("Details")
+ expect(page).to have_link("Projects")
+ end
end
- end
- it "shows the correct project mappings" do
- within "#project-table" do
- expect(page).to have_text(project.name)
+ aggregate_failures "shows the correct project mappings" do
+ within "#project-table" do
+ expect(page).to have_text(project.name)
+ end
end
- end
- it "renders more menu list item" do
- project_custom_field_mappings_page.activate_menu_of(project) do |menu|
- 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("Deactivate for this project", project)
+ aggregate_failures "allows to unlinking a project" do
+ project_custom_field_mappings_page.click_menu_item_of("Deactivate for this project", project)
- expect(page).to have_no_text(project.name)
+ expect(page).to have_no_text(project.name)
+ end
end
context "and the project custom field is required" do