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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Run `rubocop -a` on spec/features
Aaron Contreras9b75ea6f9058
diff --git a/spec/features/admin/attachments/quarantined_attachments_spec.rb b/spec/features/admin/attachments/quarantined_attachments_spec.rbindex e0058c993aa..898b457a1d5 100644--- a/spec/features/admin/attachments/quarantined_attachments_spec.rb+++ b/spec/features/admin/attachments/quarantined_attachments_spec.rb@@ -61,7 +61,7 @@ RSpec.describe 'Quarantined attachments', :js, :with_cuprite doexpect { quarantined_attachment.reload }.to raise_error(ActiveRecord::RecordNotFound)end- expect(page).not_to have_text 'other-1.txt'+ expect(page).to have_no_text 'other-1.txt'expect(page).to have_text 'other-2.txt'endenddiff --git a/spec/features/custom_fields/multi_user_custom_field_spec.rb b/spec/features/custom_fields/multi_user_custom_field_spec.rbindex bf1a63f0731..c9a2b283d26 100644--- a/spec/features/custom_fields/multi_user_custom_field_spec.rb+++ b/spec/features/custom_fields/multi_user_custom_field_spec.rb@@ -4,6 +4,7 @@ require "support/pages/work_packages/abstract_work_package"RSpec.describe "multi select custom values", :js, :with_cuprite doshared_let(:admin) { create(:admin) }let(:current_user) { admin }+ let(:wp_page) { Pages::FullWorkPackage.new work_package }let(:cf_edit_field) dofield = wp_page.edit_field custom_field.attribute_name(:camel_case)field.field_type = 'create-autocompleter'@@ -25,8 +26,6 @@ RSpec.describe "multi select custom values", :js, :with_cuprite do)end- let(:wp_page) { Pages::FullWorkPackage.new work_package }-before dologin_as current_userwp_page.visit!diff --git a/spec/features/projects/modules_spec.rb b/spec/features/projects/modules_spec.rbindex f1952488686..c4177c545c5 100644--- a/spec/features/projects/modules_spec.rb+++ b/spec/features/projects/modules_spec.rb@@ -50,7 +50,7 @@ RSpec.describe 'Projects module administration' doexpect(page).to have_unchecked_field 'Time and costs'expect(page).to have_unchecked_field 'Work packages'- expect(page).not_to have_xpath(project_work_packages_menu_link_selector, visible: false)+ expect(page).to have_no_xpath(project_work_packages_menu_link_selector)check 'Activity'click_button 'Save'@@ -71,7 +71,7 @@ RSpec.describe 'Projects module administration' dodependency: 'Work packages',module: 'Calendars')- expect(page).not_to have_xpath(project_work_packages_menu_link_selector, visible: false)+ expect(page).to have_no_xpath(project_work_packages_menu_link_selector)check 'Work packages'click_button 'Save'@@ -83,12 +83,12 @@ RSpec.describe 'Projects module administration' doexpect(page).to have_unchecked_field 'Time and costs'expect(page).to have_checked_field 'Work packages'- expect(page).to have_xpath(project_work_packages_menu_link_selector, visible: false)+ expect(page).to have_xpath(project_work_packages_menu_link_selector, visible: :all)uncheck 'Work packages'click_button 'Save'- expect(page).not_to have_xpath(project_work_packages_menu_link_selector, visible: false)+ expect(page).to have_no_xpath(project_work_packages_menu_link_selector)endcontext 'with a user who does not have the correct permissions (#38097)' dodiff --git a/spec/features/projects/projects_index_spec.rb b/spec/features/projects/projects_index_spec.rbindex 0009b06932d..b2f27c2cccb 100644--- a/spec/features/projects/projects_index_spec.rb+++ b/spec/features/projects/projects_index_spec.rb@@ -316,7 +316,7 @@ RSpec.describe 'Projects index page',# The same filters should still be intact but the order should be DESC on nameprojects_page.expect_projects_listed(public_project)- projects_page.expect_projects_not_listed(project, # Filtered out+ projects_page.expect_projects_not_listed(project, # Filtered outdevelopment_project) # Present on page 2projects_page.expect_total_pages(2) # Filters kept active, so there is no third page.diff --git a/spec/features/work_packages/display_representations/switch_display_representations_on_mobile_spec.rb b/spec/features/work_packages/display_representations/switch_display_representations_on_mobile_spec.rbindex 4af5b111db8..12c5fd59a2f 100644--- a/spec/features/work_packages/display_representations/switch_display_representations_on_mobile_spec.rb+++ b/spec/features/work_packages/display_representations/switch_display_representations_on_mobile_spec.rb@@ -36,11 +36,11 @@ RSpec.describe 'Switching work package view on mobile', :js dolet(:wp_1) docreate(:work_package,- project:,)+ project:)endlet(:wp_2) docreate(:work_package,- project:,)+ project:)endbefore dodiff --git a/spec/features/work_packages/edit_on_change_work_package_status_permission_spec.rb b/spec/features/work_packages/edit_on_change_work_package_status_permission_spec.rbindex 7e3870cdb21..194f8c9e6b0 100644--- a/spec/features/work_packages/edit_on_change_work_package_status_permission_spec.rb+++ b/spec/features/work_packages/edit_on_change_work_package_status_permission_spec.rb@@ -37,7 +37,7 @@ RSpec.describe 'edit work package', :js domember_with_roles: { project => role })endlet(:permissions) { %i[view_work_packages change_work_package_status] }- let(:role) { create(:project_role, permissions: permissions) }+ let(:role) { create(:project_role, permissions:) }let(:type) { create(:type) }let(:project) { create(:project, types: [type]) }@@ -48,7 +48,7 @@ RSpec.describe 'edit work package', :js dotype_id: type.id,old_status: status_new,new_status: status_done,- role: role)+ role:)endlet(:work_package) docreate(:work_package,diff --git a/spec/features/work_packages/share/share_spec.rb b/spec/features/work_packages/share/share_spec.rbindex 1683655ce62..68e6797c63d 100644--- a/spec/features/work_packages/share/share_spec.rb+++ b/spec/features/work_packages/share/share_spec.rb@@ -81,7 +81,6 @@ RSpec.describe 'Work package sharing',let(:columns) { Components::WorkPackages::Columns.new }let(:wp_modal) { Components::WorkPackages::TableConfigurationModal.new }-current_user { create(:user, firstname: 'Signed in', lastname: 'User') }def shared_principals@@ -304,7 +303,6 @@ RSpec.describe 'Work package sharing',columns.add 'Shared with', save_changes: falsecolumns.apply-wp_row = wp_table.row(work_package)expect(wp_row).to have_css('.wp-table--cell-td.sharedWithUsers .badge', text: '7')wp_row.find('.wp-table--cell-td.sharedWithUsers .badge').clickdiff --git a/spec/features/work_packages/sorting/manual_sorting_spec.rb b/spec/features/work_packages/sorting/manual_sorting_spec.rbindex fb613bab13e..385c9c17d6d 100644--- a/spec/features/work_packages/sorting/manual_sorting_spec.rb+++ b/spec/features/work_packages/sorting/manual_sorting_spec.rb@@ -403,7 +403,6 @@ RSpec.describe 'Manual sorting of WP table', :js doqueryend-it 'reloads after drop' dowp_timeline.visit_query(query_tl)wp_timeline.expect_timeline!