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 --autocorrect` on all files
Christophe Bliard8fa85845385d
diff --git a/app/components/members/user_filter_component.rb b/app/components/members/user_filter_component.rbindex 98203f91f81..3dc96333fc0 100644--- a/app/components/members/user_filter_component.rb+++ b/app/components/members/user_filter_component.rb@@ -64,7 +64,7 @@ module Membersdef status_members_query(status)params = {project_id: project.id,- status:,+ status:}self.class.filter(params)diff --git a/app/components/oauth/applications/row_component.rb b/app/components/oauth/applications/row_component.rbindex b36ba9c0ccb..33bfc1e631d 100644--- a/app/components/oauth/applications/row_component.rb+++ b/app/components/oauth/applications/row_component.rb@@ -31,7 +31,6 @@module OAuthmodule Applicationsclass RowComponent < ::RowComponent-property :confidentialdef applicationdiff --git a/app/components/users/auto_login_tokens/row_component.rb b/app/components/users/auto_login_tokens/row_component.rbindex 33b2808d37a..784205909c9 100644--- a/app/components/users/auto_login_tokens/row_component.rb+++ b/app/components/users/auto_login_tokens/row_component.rb@@ -37,9 +37,7 @@ module Usersmodelend- def token_data- token.data- end+ delegate :data, to: :token, prefix: truedef current?token == current_tokendiff --git a/app/contracts/model_contract.rb b/app/contracts/model_contract.rbindex 35979f861da..4c482f3cbdf 100644--- a/app/contracts/model_contract.rb+++ b/app/contracts/model_contract.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './base_contract'+require_relative 'base_contract'### Model contract for AR records thatdiff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rbindex 07f139f7c5f..b055a92dbe0 100644--- a/app/controllers/account_controller.rb+++ b/app/controllers/account_controller.rb@@ -203,12 +203,10 @@ class AccountController < ApplicationControllerelseflash[:error] = I18n.t(:notice_activation_failed)end+ elsif user.active?+ flash[:notice] = I18n.t(:notice_account_already_activated)else- if user.active?- flash[:notice] = I18n.t(:notice_account_already_activated)- else- flash[:error] = I18n.t(:notice_activation_failed)- end+ flash[:error] = I18n.t(:notice_activation_failed)enddiff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rbindex 39a82824868..91dd292afc9 100644--- a/app/controllers/admin_controller.rb+++ b/app/controllers/admin_controller.rb@@ -105,7 +105,7 @@ class AdminController < ApplicationControllerprivatedef hidden_admin_menu_items- (OpenProject::Configuration.hidden_menu_items[:admin_menu.to_s] || [])+ OpenProject::Configuration.hidden_menu_items[:admin_menu.to_s] || []enddef plaintext_extraction_checksdiff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rbindex a4f381b8f82..9aa5ae8ee0c 100644--- a/app/controllers/application_controller.rb+++ b/app/controllers/application_controller.rb@@ -263,7 +263,7 @@ class ApplicationController < ActionController::Baseenddef authorize_in_model(ctrl = params[:controller], action = params[:action])- model = instance_variable_get("@#{model_object.to_s.underscore}")+ model = instance_variable_get(:"@#{model_object.to_s.underscore}")allowed = User.current.allowed_in_entity?({ controller: ctrl, action: }, model, model_object)@@ -377,7 +377,7 @@ class ApplicationController < ActionController::Basemodel = self.class._model_objectif model@object = model.find(params[object_id])- instance_variable_set("@#{controller_name.singularize}", @object) if @object+ instance_variable_set(:"@#{controller_name.singularize}", @object) if @objectendrescue ActiveRecord::RecordNotFoundrender_404@@ -388,7 +388,7 @@ class ApplicationController < ActionController::Basemodel_object = self.class._model_objectinstance = model_object.find(params[object_id])@project = instance.project- instance_variable_set("@#{model_object.to_s.underscore}", instance)+ instance_variable_set(:"@#{model_object.to_s.underscore}", instance)else@project = Project.find(params[:project_id])enddiff --git a/app/controllers/concerns/accounts/current_user.rb b/app/controllers/concerns/accounts/current_user.rbindex 47caaf98f16..ef2b81a36f5 100644--- a/app/controllers/concerns/accounts/current_user.rb+++ b/app/controllers/concerns/accounts/current_user.rb@@ -113,6 +113,7 @@ module Accounts::CurrentUserdef current_api_key_userreturn unless Setting.rest_api_enabled? && api_request?+key = api_key_from_requestif key && accept_key_auth_actions.include?(params[:action])diff --git a/app/controllers/concerns/member_helper.rb b/app/controllers/concerns/member_helper.rbindex 2a1dc038b25..93f15002b4e 100644--- a/app/controllers/concerns/member_helper.rb+++ b/app/controllers/concerns/member_helper.rb@@ -79,10 +79,8 @@ module MemberHelper!OpenProject::Enterprise.user_limit_reached? || !OpenProject::Enterprise.fail_fast?end- def each_comma_separated(array, &block)- array.map do |e|- block.call(e)- end.flatten+ def each_comma_separated(array, &)+ array.map(&).flattenenddef transform_array_of_comma_separated_ids(array)diff --git a/app/controllers/concerns/op_turbo/component_stream.rb b/app/controllers/concerns/op_turbo/component_stream.rbindex f88302e9057..6d8c2ed136a 100644--- a/app/controllers/concerns/op_turbo/component_stream.rb+++ b/app/controllers/concerns/op_turbo/component_stream.rb@@ -36,7 +36,7 @@ module OpTurborender turbo_stream: turbo_streams, status:end- format_block.call(format) if block_given?+ yield(format) if format_blockendendalias_method :respond_with_turbo_streams, :respond_to_with_turbo_streamsdiff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rbindex bf5208a0387..d67db8c46e1 100644--- a/app/controllers/errors_controller.rb+++ b/app/controllers/errors_controller.rb@@ -8,7 +8,7 @@ class ErrorsController < ActionController::Baseenddef unacceptable- render file: "#{Rails.root}/public/422.html",+ render file: "#{Rails.public_path.join('422.html')}",status: :unacceptable,layout: falseenddiff --git a/app/controllers/members/menus_controller.rb b/app/controllers/members/menus_controller.rbindex 9caa40f2212..6d0aeca4cc6 100644--- a/app/controllers/members/menus_controller.rb+++ b/app/controllers/members/menus_controller.rb@@ -65,8 +65,6 @@ module Members]end- private-def project_roles_entriesProjectRole.where(id: MemberRole.where(member_id: @project.members.select(:id)).select(:role_id))diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rbindex 68a66f190d3..24937ec8899 100644--- a/app/controllers/messages_controller.rb+++ b/app/controllers/messages_controller.rb@@ -114,7 +114,7 @@ class MessagesController < ApplicationControllerif call.success?flash[:notice] = t(:notice_successful_update)@message.reload- redirect_to topic_path(@message.root, r: (@message.parent_id && @message.id))+ redirect_to topic_path(@message.root, r: @message.parent_id && @message.id)elserender action: 'edit'enddiff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rbindex f976ba70785..c71ef05ecbd 100644--- a/app/controllers/search_controller.rb+++ b/app/controllers/search_controller.rb@@ -151,7 +151,7 @@ class SearchController < ApplicationController# don't search projectstypes.delete('projects')# only show what the user is allowed to view- types = types.select { |o| User.current.allowed_in_project?("view_#{o}".to_sym, projects_to_search) }+ types = types.select { |o| User.current.allowed_in_project?(:"view_#{o}", projects_to_search) }endtypesdiff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rbindex 7ac971a8973..0babd91d5d3 100644--- a/app/controllers/wiki_controller.rb+++ b/app/controllers/wiki_controller.rb@@ -336,7 +336,7 @@ class WikiController < ApplicationControllerdefault_item = default_menu_item(page)return unless default_item- "no-menu-item-#{default_item.menu_identifier}".to_sym+ :"no-menu-item-#{default_item.menu_identifier}"endprivatediff --git a/app/controllers/wiki_menu_items_controller.rb b/app/controllers/wiki_menu_items_controller.rbindex 8f2fac35a84..b3dcb8d8735 100644--- a/app/controllers/wiki_menu_items_controller.rb+++ b/app/controllers/wiki_menu_items_controller.rb@@ -52,7 +52,7 @@ class WikiMenuItemsController < ApplicationControllermenu_item = controller.default_menu_item(page)return unless menu_item- "no-menu-item-#{menu_item.menu_identifier}".to_sym+ :"no-menu-item-#{menu_item.menu_identifier}"endbefore_action :find_project_by_project_iddiff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rbindex 619fc733970..4c62e7e928b 100644--- a/app/helpers/admin_helper.rb+++ b/app/helpers/admin_helper.rb@@ -34,7 +34,7 @@ module AdminHelperdef linked_sha_reference(sha, url)if sha && url- link_to sha, url, target: '_blank'+ link_to sha, url, target: '_blank', rel: 'noopener'elseshaenddiff --git a/app/helpers/error_message_helper.rb b/app/helpers/error_message_helper.rbindex 67f4de9983f..6b3205e4f3a 100644--- a/app/helpers/error_message_helper.rb+++ b/app/helpers/error_message_helper.rb@@ -30,7 +30,7 @@ module ErrorMessageHelperinclude ActionView::Helpers::OutputSafetyHelperdef error_messages_for(object)- object = instance_variable_get("@#{object}") unless object.respond_to?(:to_model)+ object = instance_variable_get(:"@#{object}") unless object.respond_to?(:to_model)object = convert_to_model(object)return unless objectdiff --git a/app/helpers/individual_principal_hooks_helper.rb b/app/helpers/individual_principal_hooks_helper.rbindex 5cde7180e7f..07080e5681a 100644--- a/app/helpers/individual_principal_hooks_helper.rb+++ b/app/helpers/individual_principal_hooks_helper.rb@@ -29,7 +29,7 @@module IndividualPrincipalHooksHelperdef call_individual_principals_memberships_hook(individual_principal, suffix, context = {})call_context = { individual_principal_key(individual_principal) => individual_principal }.merge(context)- call_hook("view_#{individual_principal.class.name.underscore.pluralize}_memberships_table_#{suffix}".to_sym, call_context)+ call_hook(:"view_#{individual_principal.class.name.underscore.pluralize}_memberships_table_#{suffix}", call_context)enddef individual_principal_key(individual_principal)diff --git a/app/helpers/mail_layout_helper.rb b/app/helpers/mail_layout_helper.rbindex 50c9d8c372a..3ca91ed4817 100644--- a/app/helpers/mail_layout_helper.rb+++ b/app/helpers/mail_layout_helper.rb@@ -61,10 +61,10 @@ module MailLayoutHelperdef placeholder_cell(number, vertical:)style = if vertical- "max-width:#{number}; min-width:#{number}; width:#{number}"- else- "line-height:#{number}; max-width:0; min-width:0; height:#{number}; width:0; font-size:#{number}"- end+ "max-width:#{number}; min-width:#{number}; width:#{number}"+ else+ "line-height:#{number}; max-width:0; min-width:0; height:#{number}; width:0; font-size:#{number}"+ endcontent_tag('td', ' '.html_safe, style:)enddiff --git a/app/helpers/reports_helper.rb b/app/helpers/reports_helper.rbindex 254fa2519eb..a2896d9f195 100644--- a/app/helpers/reports_helper.rb+++ b/app/helpers/reports_helper.rb@@ -41,8 +41,8 @@ module ReportsHelperend || 0end- def aggregate_link(data, criteria, *args)+ def aggregate_link(data, criteria, *)a = aggregate data, criteria- a.positive? ? link_to(h(a), *args) : '-'+ a.positive? ? link_to(h(a), *) : '-'endenddiff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rbindex 30839e3bc0f..151811a6fad 100644--- a/app/helpers/repositories_helper.rb+++ b/app/helpers/repositories_helper.rb@@ -252,7 +252,7 @@ module RepositoriesHelperaction: 'repository-settings#updateSelectedType','repository-settings-target': 'scmVendor'},- disabled: (repository && !repository.new_record?))+ disabled: repository && !repository.new_record?)enddef git_path_encoding_options(repository)diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rbindex ce38b80d093..e8c169e20b3 100644--- a/app/helpers/settings_helper.rb+++ b/app/helpers/settings_helper.rb@@ -169,7 +169,7 @@ module SettingsHelperhidden +styled_check_box_tag("settings[#{setting}]",1,- Setting.send("#{setting}?"),+ Setting.send(:"#{setting}?"),disabled_setting_option(setting).merge(options))endend@@ -199,11 +199,11 @@ module SettingsHelperprivate- def wrap_field_outer(options, &block)+ def wrap_field_outer(options, &)if options[:label] == false- block.call+ yieldelse- content_tag(:span, class: 'form--field-container', &block)+ content_tag(:span, class: 'form--field-container', &)endend@@ -216,7 +216,7 @@ module SettingsHelperhidden_field_tag("settings[#{setting}][]", '') +I18n.t("setting_#{setting}")end- end.join.html_safe # rubocop:disable Rails/OutputSafety+ end.join.html_safeendenddiff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rbindex 449b64fc1ad..e9ade0c7d7e 100644--- a/app/helpers/sort_helper.rb+++ b/app/helpers/sort_helper.rb@@ -124,7 +124,6 @@ module SortHelper.map { |c, o| [@available_criteria[c], o] }.reject { |c, _| c.nil? }.filter_map { |c, o| append_direction(Array(c), o) }-enddef to_query_hash@@ -142,9 +141,9 @@ module SortHelpernormalize!end- def add(*args)+ def add(*)r = self.class.new.from_param(to_param)- r.add!(*args)+ r.add!(*)renddiff --git a/app/mailers/sharing_mailer.rb b/app/mailers/sharing_mailer.rbindex dbbcc4f8d52..31550cb9498 100644--- a/app/mailers/sharing_mailer.rb+++ b/app/mailers/sharing_mailer.rb@@ -50,17 +50,18 @@ class SharingMailer < ApplicationMailerenddef derive_allowed_work_package_actions(role)- allowed_actions = case role.builtin- when Role::BUILTIN_WORK_PACKAGE_EDITOR- [I18n.t('work_package.sharing.permissions.view'),- I18n.t('work_package.sharing.permissions.comment'),- I18n.t('work_package.sharing.permissions.edit')]- when Role::BUILTIN_WORK_PACKAGE_COMMENTER- [I18n.t('work_package.sharing.permissions.view'),- I18n.t('work_package.sharing.permissions.comment')]- when Role::BUILTIN_WORK_PACKAGE_VIEWER- [I18n.t('work_package.sharing.permissions.view')]- end+ allowed_actions =+ case role.builtin+ when Role::BUILTIN_WORK_PACKAGE_EDITOR+ [I18n.t('work_package.sharing.permissions.view'),+ I18n.t('work_package.sharing.permissions.comment'),+ I18n.t('work_package.sharing.permissions.edit')]+ when Role::BUILTIN_WORK_PACKAGE_COMMENTER+ [I18n.t('work_package.sharing.permissions.view'),+ I18n.t('work_package.sharing.permissions.comment')]+ when Role::BUILTIN_WORK_PACKAGE_VIEWER+ [I18n.t('work_package.sharing.permissions.view')]+ endallowed_actions.map(&:downcase)enddiff --git a/app/models/activities/base_activity_provider.rb b/app/models/activities/base_activity_provider.rbindex e707198f940..6ce3df6038d 100644--- a/app/models/activities/base_activity_provider.rb+++ b/app/models/activities/base_activity_provider.rb@@ -68,7 +68,7 @@ class Activities::BaseActivityProviderself.activity_provider_options = {type: name.underscore.pluralize,activities: [:activity],- permission: "view_#{name.underscore.pluralize}".to_sym+ permission: :"view_#{name.underscore.pluralize}"}.merge(options)enddiff --git a/app/models/changeset.rb b/app/models/changeset.rbindex adf39adc177..5aca757d752 100644--- a/app/models/changeset.rb+++ b/app/models/changeset.rb@@ -146,7 +146,7 @@ class Changeset < ApplicationRecordrefs = match[3]next unless action.present? || ref_keywords_any- refs.scan(/#(\d+)(\s+@#{TIMELOG_RE})?/).each do |m|+ refs.scan(/#(\d+)(\s+@#{TIMELOG_RE})?/o).each do |m|work_package = find_referenced_work_package_by_id(m[0].to_i)hours = m[2]if work_packagediff --git a/app/models/concerns/virtual_attribute.rb b/app/models/concerns/virtual_attribute.rbindex fc55d991868..55558d41e30 100644--- a/app/models/concerns/virtual_attribute.rb+++ b/app/models/concerns/virtual_attribute.rb@@ -56,7 +56,7 @@ module VirtualAttributeenddef _define_virtual_attribute_setter(attribute)- define_method "#{attribute}=" do |value|+ define_method :"#{attribute}=" do |value|set_virtual_attribute(attribute, value) if send(attribute) != valueinstance_variable_set(:"@#{attribute}_set", true)instance_variable_set(:"@#{attribute}", value)diff --git a/app/models/custom_actions/conditions/base.rb b/app/models/custom_actions/conditions/base.rbindex 7d08e43aa96..bc63a7abc9d 100644--- a/app/models/custom_actions/conditions/base.rb+++ b/app/models/custom_actions/conditions/base.rb@@ -110,17 +110,17 @@ class CustomActions::Conditions::Baseprivate_class_method :habtm_tabledef self.key_id- @key_id ||= "#{key}_id".to_sym+ @key_id ||= :"#{key}_id"endprivate_class_method :key_iddef self.association_key- "#{key}_conditions".to_sym+ :"#{key}_conditions"endprivate_class_method :association_keydef self.association_ids- "#{key}_condition_ids".to_sym+ :"#{key}_condition_ids"endprivate_class_method :association_idsenddiff --git a/app/models/custom_style.rb b/app/models/custom_style.rbindex e12ce883900..38d1cbffd23 100644--- a/app/models/custom_style.rb+++ b/app/models/custom_style.rb@@ -23,7 +23,7 @@ class CustomStyle < ApplicationRecordend%i(favicon touch_icon export_logo export_cover logo).each do |name|- define_method "#{name}_path" do+ define_method :"#{name}_path" doimage = send(name)if image.readable?@@ -31,7 +31,7 @@ class CustomStyle < ApplicationRecordendend- define_method "remove_#{name}" do+ define_method :"remove_#{name}" doimage = send(name)image&.remove!diff --git a/app/models/exports/exporter.rb b/app/models/exports/exporter.rbindex a30e7474b1b..1aae11aaa61 100644--- a/app/models/exports/exporter.rb+++ b/app/models/exports/exporter.rb@@ -67,9 +67,9 @@ module Exports::Exports::Register.formatter_for(model, attribute, export_format)end- def format_attribute(object, attribute, export_format, **options)+ def format_attribute(object, attribute, export_format, **)formatter = formatter_for(attribute, export_format)- formatter.format(object, **options)+ formatter.format(object, **)endendenddiff --git a/app/models/journable/with_historic_attributes.rb b/app/models/journable/with_historic_attributes.rbindex ad28a466186..98ee689f019 100644--- a/app/models/journable/with_historic_attributes.rb+++ b/app/models/journable/with_historic_attributes.rb@@ -235,6 +235,7 @@ class Journable::WithHistoricAttributes < SimpleDelegatorhistoric_journable = at_timestamp(Timestamp.parse(timestamp))return unless historic_journable+changes = ::Acts::Journalized::JournableDiffer.changes(__getobj__, historic_journable)# In the other occurrences of JournableDiffer.association_changes calls, we are using the pluraldiff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rbindex db4b00b21e7..74e8515e121 100644--- a/app/models/mail_handler.rb+++ b/app/models/mail_handler.rb@@ -297,8 +297,8 @@ class MailHandler < ActionMailer::Base# Adds To and Cc as watchers of the given object if the sender has the# appropriate permissiondef add_watchers(obj)- if user.allowed_in_project?("add_#{obj.class.name.underscore}_watchers".to_sym, obj.project) ||- user.allowed_in_project?("add_#{obj.class.lookup_ancestors.last.name.underscore}_watchers".to_sym, obj.project)+ if user.allowed_in_project?(:"add_#{obj.class.name.underscore}_watchers", obj.project) ||+ user.allowed_in_project?(:"add_#{obj.class.lookup_ancestors.last.name.underscore}_watchers", obj.project)addresses = [email.to, email.cc].flatten.compact.uniq.map { |a| a.strip.downcase }unless addresses.empty?Userdiff --git a/app/models/menu_items/wiki_menu_item.rb b/app/models/menu_items/wiki_menu_item.rbindex 1321c783816..f480aebc3b3 100644--- a/app/models/menu_items/wiki_menu_item.rb+++ b/app/models/menu_items/wiki_menu_item.rb@@ -44,7 +44,7 @@ class MenuItems::WikiMenuItem < MenuItemenddef menu_identifier- "wiki-#{slug}".to_sym+ :"wiki-#{slug}"enddef index_page@@ -68,6 +68,6 @@ class MenuItems::WikiMenuItem < MenuItemenddef self.add_entry_item_prefix(identifier)- "entry-item-#{identifier}".to_sym+ :"entry-item-#{identifier}"endenddiff --git a/app/models/news.rb b/app/models/news.rbindex dc18018395f..e4b84568e47 100644--- a/app/models/news.rb+++ b/app/models/news.rb@@ -61,7 +61,7 @@ class News < ApplicationRecordenddef description=(val)- super val.presence || ''+ super(val.presence || '')end# returns latest news for projects visible by userdiff --git a/app/models/principals/scopes/status.rb b/app/models/principals/scopes/status.rbindex 9ea1f8196b9..c04a360c985 100644--- a/app/models/principals/scopes/status.rb+++ b/app/models/principals/scopes/status.rb@@ -41,7 +41,7 @@ module Principals::Scopesnot_builtin.where(status: val)end- define_singleton_method("not_#{key}") do+ define_singleton_method(:"not_#{key}") donot_builtin.where.not(status: val)endenddiff --git a/app/models/queries/columns/base.rb b/app/models/queries/columns/base.rbindex 7a4d2de86ef..e56616ea9c4 100644--- a/app/models/queries/columns/base.rb+++ b/app/models/queries/columns/base.rb@@ -54,7 +54,7 @@ class Queries::Columns::Baseassociationnull_handlingdefault_order).each do |attribute|- send("#{attribute}=", options[attribute])+ send(:"#{attribute}=", options[attribute])endenddiff --git a/app/models/queries/filters/base.rb b/app/models/queries/filters/base.rbindex 3bff06524a4..b030df6f5da 100644--- a/app/models/queries/filters/base.rb+++ b/app/models/queries/filters/base.rb@@ -49,7 +49,7 @@ class Queries::Filters::Baseself.context = options[:context]self.class.filter_params.each do |param_field|- send("#{param_field}=", options[param_field])+ send(:"#{param_field}=", options[param_field])endenddiff --git a/app/models/queries/filters/not_existing_filter.rb b/app/models/queries/filters/not_existing_filter.rbindex 207405c096d..632ab69c0ef 100644--- a/app/models/queries/filters/not_existing_filter.rb+++ b/app/models/queries/filters/not_existing_filter.rb@@ -56,7 +56,7 @@ module Queriesdef to_hash{- (name || :non_existent_filter) => {+ name || :non_existent_filter => {operator:,values:}diff --git a/app/models/queries/filters/shared/custom_field_filter.rb b/app/models/queries/filters/shared/custom_field_filter.rbindex 3df07a2d873..762234a142f 100644--- a/app/models/queries/filters/shared/custom_field_filter.rb+++ b/app/models/queries/filters/shared/custom_field_filter.rb@@ -60,19 +60,19 @@ module Queries::Filters::Shared::CustomFieldFilter### Create a filter instance for the given custom field accessor- def create!(name:, **options)+ def create!(name:, **)custom_field = find_by_accessor(name)raise ::Queries::Filters::InvalidError if custom_field.nil?- from_custom_field!(custom_field:, **options)+ from_custom_field!(custom_field:, **)end### Create a filter instance for the given custom field- def from_custom_field!(custom_field:, **options)+ def from_custom_field!(custom_field:, **)constant_name = subfilter_module(custom_field)clazz = "::Queries::Filters::Shared::CustomFields::#{constant_name}".constantize- clazz.create!(custom_field:, custom_field_context:, **options)+ clazz.create!(custom_field:, custom_field_context:, **)rescue NameError => eRails.logger.error "Failed to constantize custom field filter for #{name}. #{e}"raise ::Queries::Filters::InvalidErrordiff --git a/app/models/queries/filters/shared/custom_fields/base.rb b/app/models/queries/filters/shared/custom_fields/base.rbindex ca575c18c8c..7f0faf751aa 100644--- a/app/models/queries/filters/shared/custom_fields/base.rb+++ b/app/models/queries/filters/shared/custom_fields/base.rb@@ -42,8 +42,8 @@ module Queries::Filters::Sharedsuper(name, options)end- def self.create!(custom_field:, custom_field_context:, **options)- new(custom_field:, custom_field_context:, **options)+ def self.create!(custom_field:, custom_field_context:, **)+ new(custom_field:, custom_field_context:, **)enddef projectdiff --git a/app/models/queries/work_packages/columns/manual_sorting_column.rb b/app/models/queries/work_packages/columns/manual_sorting_column.rbindex 0a5e6d19f18..33cae657a48 100644--- a/app/models/queries/work_packages/columns/manual_sorting_column.rb+++ b/app/models/queries/work_packages/columns/manual_sorting_column.rb@@ -30,10 +30,10 @@ class Queries::WorkPackages::Columns::ManualSortingColumn < Queries::WorkPackageinclude ::Queries::WorkPackages::Common::ManualSortingdef initialize- super :manual_sorting,+ super(:manual_sorting,default_order: 'asc',displayable: false,- sortable: "#{OrderedWorkPackage.table_name}.position NULLS LAST, #{WorkPackage.table_name}.id"+ sortable: "#{OrderedWorkPackage.table_name}.position NULLS LAST, #{WorkPackage.table_name}.id")enddef sortable_join_statement(query)diff --git a/app/models/queries/work_packages/columns/relation_of_type_column.rb b/app/models/queries/work_packages/columns/relation_of_type_column.rbindex 12dd8fa1daa..d9e1055e96c 100644--- a/app/models/queries/work_packages/columns/relation_of_type_column.rb+++ b/app/models/queries/work_packages/columns/relation_of_type_column.rb@@ -34,7 +34,7 @@ class Queries::WorkPackages::Columns::RelationOfTypeColumn < Queries::WorkPackagenddef name- "relations_of_type_#{type[:sym]}".to_sym+ :"relations_of_type_#{type[:sym]}"enddef symdiff --git a/app/models/queries/work_packages/columns/relation_to_type_column.rb b/app/models/queries/work_packages/columns/relation_to_type_column.rbindex 1b4776812ab..60a714f92cd 100644--- a/app/models/queries/work_packages/columns/relation_to_type_column.rb+++ b/app/models/queries/work_packages/columns/relation_to_type_column.rb@@ -35,7 +35,7 @@ class Queries::WorkPackages::Columns::RelationToTypeColumn < Queries::WorkPackagenddef set_name!(type)- self.name = "relations_to_type_#{type.id}".to_sym+ self.name = :"relations_to_type_#{type.id}"enddef captiondiff --git a/app/models/queries/work_packages/filter/category_filter.rb b/app/models/queries/work_packages/filter/category_filter.rbindex ad2f5464329..fede1f83805 100644--- a/app/models/queries/work_packages/filter/category_filter.rb+++ b/app/models/queries/work_packages/filter/category_filter.rb@@ -49,7 +49,6 @@ class Queries::WorkPackages::Filter::CategoryFilter <values.filter_map { |category_id| available_categories[category_id.to_i] }-enddef ar_object_filter?diff --git a/app/models/queries/work_packages/filter/group_filter.rb b/app/models/queries/work_packages/filter/group_filter.rbindex d95a6a93d71..9900c0ba25b 100644--- a/app/models/queries/work_packages/filter/group_filter.rb+++ b/app/models/queries/work_packages/filter/group_filter.rb@@ -56,7 +56,6 @@ class Queries::WorkPackages::Filter::GroupFilter < Queries::WorkPackages::Filtervalues.filter_map { |group_id| available_groups[group_id.to_i] }-enddef wherediff --git a/app/models/queries/work_packages/filter/priority_filter.rb b/app/models/queries/work_packages/filter/priority_filter.rbindex 28d806c165b..e2cc9836291 100644--- a/app/models/queries/work_packages/filter/priority_filter.rb+++ b/app/models/queries/work_packages/filter/priority_filter.rb@@ -53,7 +53,6 @@ class Queries::WorkPackages::Filter::PriorityFilter <values.filter_map { |priority_id| available_priorities[priority_id.to_i] }-endprivatediff --git a/app/models/queries/work_packages/filter/status_filter.rb b/app/models/queries/work_packages/filter/status_filter.rbindex 68c8d38b7c3..71e0ce4b9cc 100644--- a/app/models/queries/work_packages/filter/status_filter.rb+++ b/app/models/queries/work_packages/filter/status_filter.rb@@ -54,7 +54,6 @@ class Queries::WorkPackages::Filter::StatusFilter < Queries::WorkPackages::Filtedef value_objectsvalues.filter_map { |status_id| all_statuses[status_id.to_i] }-enddef allowed_objectsdiff --git a/app/models/queries/work_packages/filter/subproject_filter.rb b/app/models/queries/work_packages/filter/subproject_filter.rbindex c90d54ec86d..5be76d0f343 100644--- a/app/models/queries/work_packages/filter/subproject_filter.rb+++ b/app/models/queries/work_packages/filter/subproject_filter.rb@@ -63,7 +63,6 @@ class Queries::WorkPackages::Filter::SubprojectFilter <values.filter_map { |subproject_id| available_subprojects[subproject_id.to_i] }-enddef wherediff --git a/app/models/queries/work_packages/filter/type_filter.rb b/app/models/queries/work_packages/filter/type_filter.rbindex 5716fd00466..9d1e10beb9e 100644--- a/app/models/queries/work_packages/filter/type_filter.rb+++ b/app/models/queries/work_packages/filter/type_filter.rb@@ -53,7 +53,6 @@ class Queries::WorkPackages::Filter::TypeFilter <values.filter_map { |type_id| available_types[type_id.to_i] }-endprivatediff --git a/app/models/queries/work_packages/filter/version_filter.rb b/app/models/queries/work_packages/filter/version_filter.rbindex a1b65904e83..7bbce13d97c 100644--- a/app/models/queries/work_packages/filter/version_filter.rb+++ b/app/models/queries/work_packages/filter/version_filter.rb@@ -54,7 +54,6 @@ class Queries::WorkPackages::Filter::VersionFilter <values.filter_map { |version_id| available_versions[version_id.to_i] }-endprivatediff --git a/app/models/query/results.rb b/app/models/query/results.rbindex cf1f23890a7..d35e834590d 100644--- a/app/models/query/results.rb+++ b/app/models/query/results.rb@@ -136,7 +136,6 @@ class ::Query::Resultsquery.sort_criteria_columns.filter_map { |column, _direction| column.sortable_join_statement(query) }-enddef sort_criteria_arraydiff --git a/app/models/query/sort_criteria.rb b/app/models/query/sort_criteria.rbindex f8c86dc8a38..52720b582b5 100644--- a/app/models/query/sort_criteria.rb+++ b/app/models/query/sort_criteria.rb@@ -45,7 +45,6 @@ class ::Query::SortCriteria < SortHelper::SortCriteria.reject { |column, criterion, _| column.nil? || criterion.nil? }.map { |column, criterion, order| [column, execute_criterion(criterion), order] }.filter_map { |column, criterion, order| append_order(column, Array(criterion), order) }-endprivatediff --git a/app/models/relation.rb b/app/models/relation.rbindex 24299adeca5..cfd1d28845c 100644--- a/app/models/relation.rb+++ b/app/models/relation.rb@@ -154,7 +154,7 @@ class Relation < ApplicationRecordendTYPES.each_key do |type|- define_method "#{type}?" do+ define_method :"#{type}?" docanonical_type == self.class.canonical_type(type)endenddiff --git a/app/models/setting.rb b/app/models/setting.rbindex acc1d1275df..a72883ab72f 100644--- a/app/models/setting.rb+++ b/app/models/setting.rb@@ -116,11 +116,11 @@ class Setting < ApplicationRecordclass_eval src, __FILE__, __LINE__end- def method_missing(method, *args, &)+ def method_missing(method, *, &)if exists?(accessor_base_name(method))create_setting_accessors(accessor_base_name(method))- send(method, *args)+ send(method, *)elsesuperenddiff --git a/app/models/timestamp.rb b/app/models/timestamp.rbindex 4962ff681b3..604f6007fac 100644--- a/app/models/timestamp.rb+++ b/app/models/timestamp.rb@@ -38,7 +38,7 @@ class TimestampDATE_KEYWORD_REGEX =%r{- ^(?:#{ALLOWED_DATE_KEYWORDS.join("|")}) # match the relative date keyword+ ^(?:#{ALLOWED_DATE_KEYWORDS.join('|')}) # match the relative date keyword@(?:([0-1]?[0-9]|2[0-3]):[0-5]?[0-9]) # match the hour part[+-](?:([0-1]?[0-9]|2[0-3]):[0-5]?[0-9])$ # match the timezone offset}xdiff --git a/app/models/type/attribute_groups.rb b/app/models/type/attribute_groups.rbindex 0edc6787cda..739924546b9 100644--- a/app/models/type/attribute_groups.rb+++ b/app/models/type/attribute_groups.rb@@ -229,7 +229,6 @@ module Type::AttributeGroupsids = (old_groups.map(&:last).flatten - new_groups.map(&:last).flatten).filter_map { |k| ::Type::QueryGroup.query_attribute_id(k) }-Query.where(id: ids).destroy_allenddiff --git a/app/models/type/query_group.rb b/app/models/type/query_group.rbindex 432e086a622..c5436fc7428 100644--- a/app/models/type/query_group.rb+++ b/app/models/type/query_group.rb@@ -30,11 +30,11 @@ class Type::QueryGroup < Type::FormGroupMEMBER_PREFIX = 'query_'.freezedef self.query_attribute?(name)- name.to_s.match?(/#{Type::QueryGroup::MEMBER_PREFIX}(\d+)/)+ name.to_s.match?(/#{Type::QueryGroup::MEMBER_PREFIX}(\d+)/o)enddef self.query_attribute_id(name)- match = name.to_s.match(/#{Type::QueryGroup::MEMBER_PREFIX}(\d+)/)+ match = name.to_s.match(/#{Type::QueryGroup::MEMBER_PREFIX}(\d+)/o)match ? match[1] : nilenddiff --git a/app/models/user.rb b/app/models/user.rbindex 658bf8447ff..bbba1c38f7c 100644--- a/app/models/user.rb+++ b/app/models/user.rb@@ -366,8 +366,8 @@ class User < Principalblock_threshold = Setting.brute_force_block_after_failed_logins.to_ireturn false if block_threshold == 0 # disabled- (last_failed_login_within_block_time? and- failed_login_count >= block_threshold)+ last_failed_login_within_block_time? and+ failed_login_count >= block_thresholdenddef log_failed_logindiff --git a/app/models/users/permission_checks.rb b/app/models/users/permission_checks.rbindex ddbc1ca1aaf..47a76e08ddb 100644--- a/app/models/users/permission_checks.rb+++ b/app/models/users/permission_checks.rb@@ -38,11 +38,11 @@ module Users::PermissionChecksentity_name_underscored = entity_model_name.underscoreentity_class = entity_model_name.constantize- define_method "allowed_in_#{entity_name_underscored}?" do |permission, entity|+ define_method :"allowed_in_#{entity_name_underscored}?" do |permission, entity|allowed_in_entity?(permission, entity, entity_class)end- define_method "allowed_in_any_#{entity_name_underscored}?" do |permission, in_project: nil|+ define_method :"allowed_in_any_#{entity_name_underscored}?" do |permission, in_project: nil|allowed_in_any_entity?(permission, entity_class, in_project:)endenddiff --git a/app/models/work_package/ask_before_destruction.rb b/app/models/work_package/ask_before_destruction.rbindex 1d37487f4aa..ce9c4f861e3 100644--- a/app/models/work_package/ask_before_destruction.rb+++ b/app/models/work_package/ask_before_destruction.rb@@ -45,9 +45,9 @@ module WorkPackage::AskBeforeDestructiondef cleanup_associated_before_destructing_if_required(work_packages, user, to_do = { action: 'destroy' })cleanup_required = cleanup_action_required_before_destructing?(work_packages)- (!cleanup_required ||+ !cleanup_required ||(cleanup_required &&- cleanup_each_associated_class(work_packages, user, to_do)))+ cleanup_each_associated_class(work_packages, user, to_do))enddef associated_classes_to_address_before_destruction_of(work_packages)diff --git a/app/models/work_package/exports/formatters/spent_units.rb b/app/models/work_package/exports/formatters/spent_units.rbindex ca3104c3dc8..df7f05fb373 100644--- a/app/models/work_package/exports/formatters/spent_units.rb+++ b/app/models/work_package/exports/formatters/spent_units.rb@@ -37,7 +37,8 @@ module WorkPackage::Exportsvalues = cost_helper.summarized_cost_entries.map do |kvp|cost_type = kvp[0]volume = kvp[1]- type_unit = volume.to_d == 1.0.to_d ? cost_type.unit : cost_type.unit_plural+ BigDecimal('1.0')+ type_unit = volume.to_d == BigDecimal('1.0') ? cost_type.unit : cost_type.unit_plural"#{volume} #{type_unit}"endreturn nil if values.empty?diff --git a/app/models/work_package/pdf_export/common.rb b/app/models/work_package/pdf_export/common.rbindex 76eb03b75fa..54c9d44073b 100644--- a/app/models/work_package/pdf_export/common.rb+++ b/app/models/work_package/pdf_export/common.rb@@ -141,7 +141,7 @@ module WorkPackage::PDFExport::Commondef draw_text_multiline_left(text:, text_style:, max_left:, top:, max_lines:)lines = wrap_to_lines(text, max_left - pdf.bounds.left, text_style, max_lines)starting_position = top- lines.reverse.each do |line|+ lines.reverse_each do |line|starting_position += draw_text_multiline_part(line, text_style, pdf.bounds.left, starting_position)endend@@ -149,7 +149,7 @@ module WorkPackage::PDFExport::Commondef draw_text_multiline_right(text:, text_style:, max_left:, top:, max_lines:)lines = wrap_to_lines(text, pdf.bounds.right - max_left, text_style, max_lines)starting_position = top- lines.reverse.each do |line|+ lines.reverse_each do |line|line_width = measure_text_width(line, text_style)line_x = pdf.bounds.right - line_widthstarting_position += draw_text_multiline_part(line, text_style, line_x, starting_position)diff --git a/app/models/work_package/pdf_export/style.rb b/app/models/work_package/pdf_export/style.rbindex 6c3cd46aeb2..00a0764178b 100644--- a/app/models/work_package/pdf_export/style.rb+++ b/app/models/work_package/pdf_export/style.rb@@ -147,7 +147,7 @@ module WorkPackage::PDFExport::Styledef toc_item(level)resolve_font(@styles.dig(:toc, :item)).merge(- resolve_font(@styles.dig(:toc, "item_level_#{level}".to_sym))+ resolve_font(@styles.dig(:toc, :"item_level_#{level}")))end@@ -157,7 +157,7 @@ module WorkPackage::PDFExport::Styledef toc_item_margins(level)resolve_margin(@styles.dig(:toc, :item)).merge(- resolve_margin(@styles.dig(:toc, "item_level_#{level}".to_sym))+ resolve_margin(@styles.dig(:toc, :"item_level_#{level}")))end@@ -167,7 +167,7 @@ module WorkPackage::PDFExport::Styledef wp_subject(level)resolve_font(@styles.dig(:work_package, :subject)).merge(- resolve_font(@styles.dig(:work_package, "subject_level_#{level}".to_sym))+ resolve_font(@styles.dig(:work_package, :"subject_level_#{level}")))enddiff --git a/app/models/work_package/pdf_export/sums_table.rb b/app/models/work_package/pdf_export/sums_table.rbindex 483ce95cfd8..b3556c8ea6d 100644--- a/app/models/work_package/pdf_export/sums_table.rb+++ b/app/models/work_package/pdf_export/sums_table.rb@@ -27,7 +27,7 @@#++module WorkPackage::PDFExport::SumsTable- def write_work_packages_sums!(work_packages)+ def write_work_packages_sums!(_work_packages)return unless has_summable_column?write_optional_page_breakdiff --git a/app/seeders/demo_data/overview_seeder.rb b/app/seeders/demo_data/overview_seeder.rbindex 3b8be1ed1f9..23153c03555 100644--- a/app/seeders/demo_data/overview_seeder.rb+++ b/app/seeders/demo_data/overview_seeder.rb@@ -73,7 +73,7 @@ module DemoDataendend- def query_id_references(overview, widget_options)+ def query_id_references(_overview, widget_options)if widget_options && widget_options['queryId']widget_options['queryId'] = with_references(widget_options['queryId'])enddiff --git a/app/seeders/demo_data/project_seeder.rb b/app/seeders/demo_data/project_seeder.rbindex 8b154c6a006..4c193ab4fc9 100644--- a/app/seeders/demo_data/project_seeder.rb+++ b/app/seeders/demo_data/project_seeder.rb@@ -56,7 +56,7 @@ module DemoDataDemoData::WorkPackageSeeder,DemoData::WorkPackageBoardSeeder,::Meetings::DemoData::MeetingSeeder,- ::Meetings::DemoData::MeetingAgendaItemsSeeder,+ ::Meetings::DemoData::MeetingAgendaItemsSeeder]enddiff --git a/app/services/attachments/set_attributes_service.rb b/app/services/attachments/set_attributes_service.rbindex 7077ff446b3..99c7360cbab 100644--- a/app/services/attachments/set_attributes_service.rb+++ b/app/services/attachments/set_attributes_service.rb@@ -31,7 +31,7 @@ module Attachmentsdef set_attributes(params)# Don't set the content type manually,# we always want to infer it- super params.except :content_type+ super(params.except :content_type)enddef set_default_attributes(_params)diff --git a/app/services/authentication/omniauth_service.rb b/app/services/authentication/omniauth_service.rbindex 3be8c4217a9..88f987cb1a0 100644--- a/app/services/authentication/omniauth_service.rb+++ b/app/services/authentication/omniauth_service.rb@@ -252,7 +252,7 @@ module Authenticationmail: info[:email],firstname: info[:first_name] || info[:name],lastname: info[:last_name],- identity_url: identity_url_from_omniauth,+ identity_url: identity_url_from_omniauth}# Map the admin attribute if provided in an attribute mapping@@ -284,7 +284,7 @@ module Authentication### Try to provide some context of the auth_hash in case of errorsdef auth_uid- hash = (auth_hash || {})+ hash = auth_hash || {}hash.dig(:info, :uid) || hash.dig(:uid) || 'unknown'endenddiff --git a/app/services/authorization/query_transformation.rb b/app/services/authorization/query_transformation.rbindex 0564a718ebb..6b1c9268826 100644--- a/app/services/authorization/query_transformation.rb+++ b/app/services/authorization/query_transformation.rb@@ -42,7 +42,7 @@ class Authorization::QueryTransformationself.block = blockend- def apply(*args)- block.call(*args)+ def apply(*)+ block.call(*)endenddiff --git a/app/services/backups/create_service.rb b/app/services/backups/create_service.rbindex bac02942b39..99fd19218c2 100644--- a/app/services/backups/create_service.rb+++ b/app/services/backups/create_service.rb@@ -29,7 +29,7 @@module Backupsclass CreateService < ::BaseServices::Createdef initialize(user:, backup_token:, include_attachments: true, contract_class: ::Backups::CreateContract)- super user:, contract_class:, contract_options: { backup_token: }+ super(user:, contract_class:, contract_options: { backup_token: })@include_attachments = include_attachmentsenddiff --git a/app/services/create_type_service.rb b/app/services/create_type_service.rbindex a9614cf1f50..1a7a9141c7a 100644--- a/app/services/create_type_service.rb+++ b/app/services/create_type_service.rb@@ -28,7 +28,7 @@class CreateTypeService < BaseTypeServicedef initialize(user)- super Type.new, user+ super(Type.new, user)endprivatediff --git a/app/services/design/update_design_service.rb b/app/services/design/update_design_service.rbindex 3815dd10821..0c55bc5b598 100644--- a/app/services/design/update_design_service.rb+++ b/app/services/design/update_design_service.rb@@ -83,7 +83,7 @@ module Designenddef custom_style- @custom_style ||= (CustomStyle.current || CustomStyle.create!)+ @custom_style ||= CustomStyle.current || CustomStyle.create!endendenddiff --git a/app/services/grids/copy_service.rb b/app/services/grids/copy_service.rbindex f71f5cc4f7f..d574e5e536a 100644--- a/app/services/grids/copy_service.rb+++ b/app/services/grids/copy_service.rb@@ -46,7 +46,7 @@ module Gridsenddef initialize(user:, source:, contract_class: ::EmptyContract)- super user:, source:, contract_class:+ super(user:, source:, contract_class:)endprotecteddiff --git a/app/services/groups/add_users_service.rb b/app/services/groups/add_users_service.rbindex 8f60350ba5c..7614a321c17 100644--- a/app/services/groups/add_users_service.rb+++ b/app/services/groups/add_users_service.rb@@ -33,8 +33,8 @@ module Groupsdef initialize(group, current_user:, contract_class: AdminOnlyContract)self.model = group- super user: current_user,- contract_class:+ super(user: current_user,+ contract_class:)endprivatediff --git a/app/services/groups/cleanup_inherited_roles_service.rb b/app/services/groups/cleanup_inherited_roles_service.rbindex 96113812eed..b10cb44ad7c 100644--- a/app/services/groups/cleanup_inherited_roles_service.rb+++ b/app/services/groups/cleanup_inherited_roles_service.rb@@ -40,8 +40,8 @@ module Groupsdef initialize(group, current_user:, contract_class: AdminOnlyContract)self.model = group- super user: current_user,- contract_class:+ super(user: current_user,+ contract_class:)endprivatediff --git a/app/services/groups/create_inherited_roles_service.rb b/app/services/groups/create_inherited_roles_service.rbindex d8652e808f3..0f51b81bef3 100644--- a/app/services/groups/create_inherited_roles_service.rb+++ b/app/services/groups/create_inherited_roles_service.rb@@ -36,8 +36,8 @@ module Groupsdef initialize(group, current_user:, contract_class: AdminOnlyContract)self.model = group- super user: current_user,- contract_class:+ super(user: current_user,+ contract_class:)endprivatediff --git a/app/services/groups/update_roles_service.rb b/app/services/groups/update_roles_service.rbindex 6ca419d37c2..b14eab5abbf 100644--- a/app/services/groups/update_roles_service.rb+++ b/app/services/groups/update_roles_service.rb@@ -35,8 +35,8 @@ module Groupsdef initialize(group, current_user:, contract_class: AdminOnlyContract)self.model = group- super user: current_user,- contract_class:+ super(user: current_user,+ contract_class:)endprivatediff --git a/app/services/journals/create_service.rb b/app/services/journals/create_service.rbindex 07220d620e2..59d3286f068 100644--- a/app/services/journals/create_service.rb+++ b/app/services/journals/create_service.rb@@ -254,9 +254,9 @@ module Journalsdef association_modifications_sql(association, predecessor)<<~SQLcleanup_predecessor_#{association} AS (- #{send("cleanup_predecessor_#{association}", predecessor)}+ #{send(:"cleanup_predecessor_#{association}", predecessor)}), insert_#{association} AS (- #{send("insert_#{association}_sql")}+ #{send(:"insert_#{association}_sql")})SQLenddiff --git a/app/services/notifications/create_from_model_service.rb b/app/services/notifications/create_from_model_service.rbindex f5fe42869f8..9713bd1cded 100644--- a/app/services/notifications/create_from_model_service.rb+++ b/app/services/notifications/create_from_model_service.rb@@ -345,7 +345,7 @@ class Notifications::CreateFromModelServiceenddef strategy- @strategy ||= if self.class.const_defined?("#{resource.class}Strategy")+ @strategy ||= if self.class.const_defined?(:"#{resource.class}Strategy")"#{self.class}::#{resource.class}Strategy".constantizeendenddiff --git a/app/services/notifications/mail_service.rb b/app/services/notifications/mail_service.rbindex 2bd1eb39d4c..bf9d5cf89b2 100644--- a/app/services/notifications/mail_service.rb+++ b/app/services/notifications/mail_service.rb@@ -52,7 +52,7 @@ module Notificationsenddef strategy- @strategy ||= if self.class.const_defined?("#{strategy_model}Strategy")+ @strategy ||= if self.class.const_defined?(:"#{strategy_model}Strategy")"#{self.class}::#{strategy_model}Strategy".constantizeendenddiff --git a/app/services/principals/replace_references_service.rb b/app/services/principals/replace_references_service.rbindex 72f3af41a25..e7846ec00a7 100644--- a/app/services/principals/replace_references_service.rb+++ b/app/services/principals/replace_references_service.rb@@ -86,8 +86,7 @@ module PrincipalsBudget,MeetingAgenda,MeetingMinutes,- MeetingAgendaItem- ].each do |klass|+ MeetingAgendaItem].each do |klass|rewrite(klass, :author_id, from, to)endenddiff --git a/app/services/settings/update_service.rb b/app/services/settings/update_service.rbindex 364fe7c8462..617aa26ed1c 100644--- a/app/services/settings/update_service.rb+++ b/app/services/settings/update_service.rb@@ -28,8 +28,8 @@class Settings::UpdateService < BaseServices::BaseContracteddef initialize(user:)- super user:,- contract_class: Settings::UpdateContract+ super(user:,+ contract_class: Settings::UpdateContract)enddef persist(call)diff --git a/app/services/work_packages/update_ancestors/loader.rb b/app/services/work_packages/update_ancestors/loader.rbindex 6e745869763..ce4aa638a27 100644--- a/app/services/work_packages/update_ancestors/loader.rb+++ b/app/services/work_packages/update_ancestors/loader.rb@@ -111,13 +111,13 @@ class WorkPackages::UpdateAncestors::Loader.send(relation_type).where.not(id: queried_work_package.id)- if send("#{relation_type}_joins")- scope = scope.joins(send("#{relation_type}_joins"))+ if send(:"#{relation_type}_joins")+ scope = scope.joins(send(:"#{relation_type}_joins"))endscope- .pluck(*send("selected_#{relation_type}_attributes"))- .map { |p| LoaderStruct.new(send("selected_#{relation_type}_attributes").zip(p).to_h) }+ .pluck(*send(:"selected_#{relation_type}_attributes"))+ .map { |p| LoaderStruct.new(send(:"selected_#{relation_type}_attributes").zip(p).to_h) }end# Returns the current ancestors sorted by distance (called generations in the table)diff --git a/app/workers/application_job.rb b/app/workers/application_job.rbindex 579d7df009b..de6bccc0067 100644--- a/app/workers/application_job.rb+++ b/app/workers/application_job.rb@@ -59,9 +59,9 @@ class ApplicationJob < ActiveJob::Basedef self.queue_with_priority(value = :default)if value.is_a?(Symbol)- super priority_number(value)+ super(priority_number(value))else- super value+ super(value)endenddiff --git a/app/workers/concerns/state_machine_job.rb b/app/workers/concerns/state_machine_job.rbindex b47c8fac6fc..65867fc2fb5 100644--- a/app/workers/concerns/state_machine_job.rb+++ b/app/workers/concerns/state_machine_job.rb@@ -35,8 +35,8 @@ module StateMachineJobextend ActiveSupport::Concernincluded do- def perform(state, *args)- results = instance_exec(*args, &states[state][:block])+ def perform(state, *)+ results = instance_exec(*, &states[state][:block])to = states[state][:to]diff --git a/app/workers/cron/clear_old_sessions_job.rb b/app/workers/cron/clear_old_sessions_job.rbindex 5e342e7042f..e53494d626d 100644--- a/app/workers/cron/clear_old_sessions_job.rb+++ b/app/workers/cron/clear_old_sessions_job.rb@@ -34,7 +34,7 @@ module Cronself.cron_expression = '15 1 * * *'def perform- super 'db:sessions:expire', 7+ super('db:sessions:expire', 7)endendenddiff --git a/app/workers/cron/clear_tmp_cache_job.rb b/app/workers/cron/clear_tmp_cache_job.rbindex 9f0840eeec5..8ac9a6c2101 100644--- a/app/workers/cron/clear_tmp_cache_job.rb+++ b/app/workers/cron/clear_tmp_cache_job.rb@@ -34,7 +34,7 @@ module Cronself.cron_expression = '45 2 * * 7'def perform- super 'tmp:cache:clear'+ super('tmp:cache:clear')endendenddiff --git a/app/workers/cron/clear_uploaded_files_job.rb b/app/workers/cron/clear_uploaded_files_job.rbindex c75e0bdb781..458615f98b0 100644--- a/app/workers/cron/clear_uploaded_files_job.rb+++ b/app/workers/cron/clear_uploaded_files_job.rb@@ -34,7 +34,7 @@ module Cronself.cron_expression = '0 23 * * 5'def perform- super 'attachments:clear'+ super('attachments:clear')endendenddiff --git a/app/workers/oauth/cleanup_job.rb b/app/workers/oauth/cleanup_job.rbindex 67217683624..3295cb0e82b 100644--- a/app/workers/oauth/cleanup_job.rb+++ b/app/workers/oauth/cleanup_job.rb@@ -36,7 +36,7 @@ module OAuthqueue_with_priority :lowdef perform- super 'doorkeeper:db:cleanup'+ super('doorkeeper:db:cleanup')endendenddiff --git a/app/workers/scm/create_local_repository_job.rb b/app/workers/scm/create_local_repository_job.rbindex 0ff84a93323..3ccdb62a9a3 100644--- a/app/workers/scm/create_local_repository_job.rb+++ b/app/workers/scm/create_local_repository_job.rb@@ -49,7 +49,7 @@ class SCM::CreateLocalRepositoryJob < ApplicationJobself.class.ensure_not_existing!(repository)# Create the repository locally.- mode = (config[:mode] || default_mode)+ mode = config[:mode] || default_mode# Ensure that chmod receives an octal numberunless mode.is_a? Integerdiff --git a/config.ru b/config.ruindex d66538f6777..cc50ba9210c 100644--- a/config.ru+++ b/config.ru@@ -28,7 +28,7 @@# This file is used by Rack-based servers to start the application.-require ::File.expand_path('config/environment', __dir__)+require File.expand_path('config/environment', __dir__)subdir = OpenProject::Configuration.rails_relative_url_root.presencediff --git a/config/application.rb b/config/application.rbindex dc8bdc92f92..506f69ce468 100644--- a/config/application.rb+++ b/config/application.rb@@ -141,7 +141,7 @@ module OpenProject# config.time_zone = 'Central Time (US & Canada)'# Add locales from crowdin translations to i18n- config.i18n.load_path += Dir[Rails.root.join('config', 'locales', 'crowdin', '*.{rb,yml}').to_s]+ config.i18n.load_path += Dir[Rails.root.join("config/locales/crowdin/*.{rb,yml}").to_s]config.i18n.default_locale = :en# Fall back to default localediff --git a/config/boot.rb b/config/boot.rbindex da121bbf707..6067c79b275 100644--- a/config/boot.rb+++ b/config/boot.rb@@ -36,7 +36,7 @@ endrequire 'bundler/setup' # Set up gems listed in the Gemfile.-env = ENV['RAILS_ENV']+env = ENV.fetch('RAILS_ENV', nil)# Disable deprecation warnings early on (before loading gems), which behaves as RUBYOPT="-w0"# to disable the Ruby warnings in production.# Set OPENPROJECT_PROD_DEPRECATIONS=true if you want to see them for debugging purposesdiff --git a/config/constants/open_project/activity.rb b/config/constants/open_project/activity.rbindex 30a78dd09f9..3d79eff7d60 100644--- a/config/constants/open_project/activity.rb+++ b/config/constants/open_project/activity.rb@@ -41,7 +41,7 @@ module OpenProject@providers ||= Hash.new { |h, k| h[k] = Set.new }end- def map(&_block)+ def map(&)yield selfenddiff --git a/config/constants/open_project/null_db_fallback.rb b/config/constants/open_project/null_db_fallback.rbindex 170849f1e96..37dad4e11e7 100644--- a/config/constants/open_project/null_db_fallback.rb+++ b/config/constants/open_project/null_db_fallback.rb@@ -60,7 +60,7 @@ module OpenProjectenddef database_config- YAML.load_file(File.join(Rails.root, "config", "database.yml"))[Rails.env]+ YAML.load_file(Rails.root.join("config/database.yml").to_s)[Rails.env]endendenddiff --git a/config/constants/settings/definition.rb b/config/constants/settings/definition.rbindex 7c018f92c15..cee3f2cef0a 100644--- a/config/constants/settings/definition.rb+++ b/config/constants/settings/definition.rb@@ -206,13 +206,13 @@ module Settingsdescription: 'The memcache server host and IP',format: :string,default: nil,- writable: false,+ writable: false},cache_redis_url: {description: 'URL to the redis cache server',format: :string,default: nil,- writable: false,+ writable: false},cache_namespace: {format: :string,@@ -896,7 +896,7 @@ module Settings},show_product_version: {description: 'Show product version information in the administration section',- default: true,+ default: true},show_pending_migrations_warning: {description: 'Enable or disable warning bar in case of pending migrations',diff --git a/config/constants/views.rb b/config/constants/views.rbindex b2f32b8c27e..e44ad504f6c 100644--- a/config/constants/views.rb+++ b/config/constants/views.rb@@ -33,7 +33,7 @@ module Constantscontract_strategy: nil)@registered ||= {}- @registered[canonical_type(type)] = { contract_strategy: contract_strategy }+ @registered[canonical_type(type)] = { contract_strategy: }enddef registered_typesdiff --git a/config/environments/development.rb b/config/environments/development.rbindex 955e37fff49..547b9477922 100644--- a/config/environments/development.rb+++ b/config/environments/development.rb@@ -87,4 +87,4 @@ OpenProject::Application.configure doendend-ActiveRecord::Base.logger = ActiveSupport::Logger.new($stdout) unless String(ENV["SILENCE_SQL_LOGS"]).to_bool+ActiveRecord::Base.logger = ActiveSupport::Logger.new($stdout) unless String(ENV.fetch("SILENCE_SQL_LOGS", nil)).to_booldiff --git a/config/initializers/appsignal.rb b/config/initializers/appsignal.rbindex fef458a86fb..1706ad12e2e 100644--- a/config/initializers/appsignal.rb+++ b/config/initializers/appsignal.rb@@ -41,8 +41,8 @@ if OpenProject::Appsignal.enabled?)# Extend the core log delegator- handler = ::OpenProject::Appsignal.method(:exception_handler)- ::OpenProject::Logging::LogDelegator.register(:appsignal, handler)+ handler = OpenProject::Appsignal.method(:exception_handler)+ OpenProject::Logging::LogDelegator.register(:appsignal, handler)Appsignal.startenddiff --git a/config/initializers/delayed_job_config.rb b/config/initializers/delayed_job_config.rbindex c2f89eb5ec9..89c3af7505c 100644--- a/config/initializers/delayed_job_config.rb+++ b/config/initializers/delayed_job_config.rb@@ -36,7 +36,7 @@ Delayed::Worker.delay_jobs = trueRails.application.reloader.to_prepare do# Set default priority (lower = higher priority)# Example ordering, see ApplicationJob.priority_number- Delayed::Worker.default_priority = ::ApplicationJob.priority_number(:default)+ Delayed::Worker.default_priority = ApplicationJob.priority_number(:default)end# Do not retry jobs from delayed_jobdiff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rbindex 910f484973c..7994c3760b3 100644--- a/config/initializers/doorkeeper.rb+++ b/config/initializers/doorkeeper.rb@@ -5,11 +5,7 @@ Doorkeeper.configure do# This block will be called to check whether the resource owner is authenticated or not.resource_owner_authenticator dologged_user = session[:user_id] && User.active.find_by(id: session[:user_id])- if logged_user.present?- logged_user- else- redirect_to(signin_path(back_url: request.fullpath))- end+ logged_user.presence || redirect_to(signin_path(back_url: request.fullpath))end# If you are planning to use Doorkeeper in Rails 5 API-only application, then you mightdiff --git a/config/initializers/log_slow_sql_queries.rb b/config/initializers/log_slow_sql_queries.rbindex 9895ce0bc3e..eadc105cb40 100644--- a/config/initializers/log_slow_sql_queries.rb+++ b/config/initializers/log_slow_sql_queries.rb@@ -17,7 +17,7 @@ OpenProject::Application.configure donext if duration <= slow_sql_thresholdpayload = {- duration: duration,+ duration:,time: start.iso8601,cached: !!data[:cache],sql: data[:sql]@@ -25,7 +25,7 @@ OpenProject::Application.configure dosql_log_string = data[:sql].strip.gsub(/(^(\s+)?$\n)/, "")OpenProject.logger.warn "Encountered slow SQL (#{payload[:duration]} ms): #{sql_log_string}",- payload: payload,+ payload:,# Hash of the query for reference/fingerprintingreference: Digest::SHA1.hexdigest(data[:sql])rescue StandardError => ediff --git a/config/initializers/lograge.rb b/config/initializers/lograge.rbindex bd21de8df7b..e5940305614 100644--- a/config/initializers/lograge.rb+++ b/config/initializers/lograge.rb@@ -8,6 +8,6 @@ Rails.application.configure do# Add custom data to event payloadconfig.lograge.custom_payload do |controller|- ::OpenProject::Logging.extend_payload!({}, { controller: controller })+ OpenProject::Logging.extend_payload!({}, { controller: })endenddiff --git a/config/initializers/menus.rb b/config/initializers/menus.rbindex 9fdae477062..cf85369fd00 100644--- a/config/initializers/menus.rb+++ b/config/initializers/menus.rb@@ -37,7 +37,7 @@ Redmine::MenuManager.map :top_menu do |menu|caption: I18n.t('label_projects_menu'),icon: 'projects',if: Proc.new {- (User.current.logged? || !Setting.login_required?)+ User.current.logged? || !Setting.login_required?}menu.push :activity,@@ -139,7 +139,7 @@ Redmine::MenuManager.map :global_menu do |menu|icon: 'projects',after: :home,if: Proc.new {- (User.current.logged? || !Setting.login_required?)+ User.current.logged? || !Setting.login_required?}menu.push :projects_query_select,diff --git a/config/initializers/plaintext.rb b/config/initializers/plaintext.rbindex 404b3225e93..67f6e611c87 100644--- a/config/initializers/plaintext.rb+++ b/config/initializers/plaintext.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-file_name = File.join([Rails.root.to_s, 'config', 'plaintext.yml'])+file_name = Rails.root.join.to_sif File.file?(file_name)config_file = File.read(file_name)Plaintext::Configuration.load(config_file)diff --git a/config/initializers/rack-cors.rb b/config/initializers/rack-cors.rbindex 52ec0201e45..e657fcaa5a8 100644--- a/config/initializers/rack-cors.rb+++ b/config/initializers/rack-cors.rb@@ -27,17 +27,17 @@#++Rails.application.config.middleware.insert_after Rails::Rack::Logger, Rack::Cors doallow do- origins { |source, _env| ::API::V3::CORS.allowed?(source) }+ origins { |source, _env| API::V3::CORS.allowed?(source) }resource '/api/v3*',headers: :any,methods: :any,credentials: true,- if: proc { ::API::V3::CORS.enabled? }+ if: proc { API::V3::CORS.enabled? }resource '/oauth/*',headers: :any,methods: :any,credentials: true,- if: proc { ::API::V3::CORS.enabled? }+ if: proc { API::V3::CORS.enabled? }endenddiff --git a/config/initializers/rack_timeout.rb b/config/initializers/rack_timeout.rbindex 46cf2aae153..b6bd86e773a 100644--- a/config/initializers/rack_timeout.rb+++ b/config/initializers/rack_timeout.rb@@ -7,10 +7,10 @@ if OpenProject::Configuration.web_workers >= 2Rails.logger.debug { "Enabling Rack::Timeout (service=#{service_timeout}s wait=#{wait_timeout}s)" }Rails.application.config.middleware.insert_before(- ::Rack::Runtime,- ::Rack::Timeout,- service_timeout: service_timeout, # time after which a request being served times out- wait_timeout: wait_timeout, # time after which a request waiting to be served times out+ Rack::Runtime,+ Rack::Timeout,+ service_timeout:, # time after which a request being served times out+ wait_timeout:, # time after which a request waiting to be served times outterm_on_timeout: 1, # shut down worker (gracefully) right away on timeout to be restartedservice_past_wait: true # Treat the service timeout as independent from the wait timeout)@@ -23,7 +23,7 @@ if OpenProject::Configuration.web_workers >= 2details = env[Rack::Timeout::ENV_INFO_KEY]if details.state == :timed_out && details.wait.present?- ::OpenProject.logger.error "Request timed out waiting to be served!"+ OpenProject.logger.error "Request timed out waiting to be served!"endenddiff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rbindex 31761c649fa..af35f8a1b70 100644--- a/config/initializers/session_store.rb+++ b/config/initializers/session_store.rb@@ -44,7 +44,7 @@ Rails.application.reloader.to_prepare do### We use our own decorated session model to note the user_id# for each session.- ActionDispatch::Session::ActiveRecordStore.session_class = ::Sessions::SqlBypass+ ActionDispatch::Session::ActiveRecordStore.session_class = Sessions::SqlBypass# Continue to use marshal serialization to retain symbols and whatnotActiveRecord::SessionStore::Session.serializer = :marshalenddiff --git a/db/migrate/10000000000000_to_v710_aggregated_migrations.rb b/db/migrate/10000000000000_to_v710_aggregated_migrations.rbindex 6bf2667431b..544e6585d42 100644--- a/db/migrate/10000000000000_to_v710_aggregated_migrations.rb+++ b/db/migrate/10000000000000_to_v710_aggregated_migrations.rb@@ -26,8 +26,8 @@# See COPYRIGHT and LICENSE files for more details.#++-Dir["#{Rails.root}/db/migrate/tables/*.rb"].each { |file| require file }-Dir["#{Rails.root}/db/migrate/aggregated/*.rb"].each { |file| require file }+Dir["#{Rails.root.join('db/migrate/tables/*.rb')}"].each { |file| require file }+Dir["#{Rails.root.join('db/migrate/aggregated/*.rb')}"].each { |file| require file }# This migration aggregates a set of former migrationsclass ToV710AggregatedMigrations < ActiveRecord::Migration[5.1]diff --git a/db/migrate/20100528100562_aggregated_global_roles_migrations.rb b/db/migrate/20100528100562_aggregated_global_roles_migrations.rbindex 2f3dcc67bf0..022ab3c1999 100644--- a/db/migrate/20100528100562_aggregated_global_roles_migrations.rb+++ b/db/migrate/20100528100562_aggregated_global_roles_migrations.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require Rails.root.join('db', 'migrate', 'migration_utils', 'migration_squasher').to_s+require Rails.root.join("db/migrate/migration_utils/migration_squasher").to_srequire 'open_project/plugins/migration_mapping'# This migration aggregates the migrations detailed in MIGRATION_FILESclass AggregatedGlobalRolesMigrations < ActiveRecord::Migration[5.0]diff --git a/db/migrate/20180105130053_rebuild_dag.rb b/db/migrate/20180105130053_rebuild_dag.rbindex e9dbfaa0585..c171f29c468 100644--- a/db/migrate/20180105130053_rebuild_dag.rb+++ b/db/migrate/20180105130053_rebuild_dag.rb@@ -25,7 +25,7 @@## See COPYRIGHT and LICENSE files for more details.#++-require_relative './migration_utils/utils'+require_relative 'migration_utils/utils'require_relative 'migration_utils/typed_dag'class RebuildDag < ActiveRecord::Migration[5.0]diff --git a/db/migrate/20190301122554_remove_hierarchy_paths.rb b/db/migrate/20190301122554_remove_hierarchy_paths.rbindex d2476a9f9c9..58a85273784 100644--- a/db/migrate/20190301122554_remove_hierarchy_paths.rb+++ b/db/migrate/20190301122554_remove_hierarchy_paths.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './20180116065518_add_hierarchy_paths'+require_relative '20180116065518_add_hierarchy_paths'class RemoveHierarchyPaths < ActiveRecord::Migration[5.2]def updiff --git a/db/migrate/20190312083304_rename_boards_to_forums.rb b/db/migrate/20190312083304_rename_boards_to_forums.rbindex 365856aac73..046fc6252af 100644--- a/db/migrate/20190312083304_rename_boards_to_forums.rb+++ b/db/migrate/20190312083304_rename_boards_to_forums.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './tables/forums'+require_relative 'tables/forums'class RenameBoardsToForums < ActiveRecord::Migration[5.2]def updiff --git a/db/migrate/20190507132517_add_board_view_to_roles.rb b/db/migrate/20190507132517_add_board_view_to_roles.rbindex e4ca1044a4f..3f7fb964788 100644--- a/db/migrate/20190507132517_add_board_view_to_roles.rb+++ b/db/migrate/20190507132517_add_board_view_to_roles.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require "#{Rails.root}/db/migrate/migration_utils/permission_adder"+require "#{Rails.root.join('db/migrate/migration_utils/permission_adder')}"class AddBoardViewToRoles < ActiveRecord::Migration[5.2]def updiff --git a/db/migrate/20190527095959_set_manage_board_permission.rb b/db/migrate/20190527095959_set_manage_board_permission.rbindex 6059f459b55..49a329fdf63 100644--- a/db/migrate/20190527095959_set_manage_board_permission.rb+++ b/db/migrate/20190527095959_set_manage_board_permission.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require "#{Rails.root}/db/migrate/migration_utils/permission_adder"+require "#{Rails.root.join('db/migrate/migration_utils/permission_adder')}"class SetManageBoardPermission < ActiveRecord::Migration[5.2]def updiff --git a/db/migrate/20190603060951_set_assign_versions_permission.rb b/db/migrate/20190603060951_set_assign_versions_permission.rbindex 0c20eb48c2a..f862f94f7a2 100644--- a/db/migrate/20190603060951_set_assign_versions_permission.rb+++ b/db/migrate/20190603060951_set_assign_versions_permission.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require "#{Rails.root}/db/migrate/migration_utils/permission_adder"+require "#{Rails.root.join('db/migrate/migration_utils/permission_adder')}"class SetAssignVersionsPermission < ActiveRecord::Migration[5.2]def updiff --git a/db/migrate/20190724093332_add_journal_versions_table.rb b/db/migrate/20190724093332_add_journal_versions_table.rbindex 3d0c9daa150..f9dd416c5c9 100644--- a/db/migrate/20190724093332_add_journal_versions_table.rb+++ b/db/migrate/20190724093332_add_journal_versions_table.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './migration_utils/utils'+require_relative 'migration_utils/utils'class AddJournalVersionsTable < ActiveRecord::Migration[5.2]include ::Migration::Utilsdiff --git a/db/migrate/20200522140244_remove_journal_versions_table.rb b/db/migrate/20200522140244_remove_journal_versions_table.rbindex 4686d6ffb06..88e5b5f1cc8 100644--- a/db/migrate/20200522140244_remove_journal_versions_table.rb+++ b/db/migrate/20200522140244_remove_journal_versions_table.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './20190724093332_add_journal_versions_table'+require_relative '20190724093332_add_journal_versions_table'class RemoveJournalVersionsTable < ActiveRecord::Migration[6.0]def updiff --git a/db/migrate/20210615150558_aggregate_journals.rb b/db/migrate/20210615150558_aggregate_journals.rbindex b7f33611d39..7f164a71839 100644--- a/db/migrate/20210615150558_aggregate_journals.rb+++ b/db/migrate/20210615150558_aggregate_journals.rb@@ -26,8 +26,8 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './20200924085508_cleanup_orphaned_journal_data'-require_relative './migration_utils/utils'+require_relative '20200924085508_cleanup_orphaned_journal_data'+require_relative 'migration_utils/utils'class AggregateJournals < ActiveRecord::Migration[6.1]include ::Migration::Utilsdiff --git a/db/migrate/20210726070813_remove_journal_versions.rb b/db/migrate/20210726070813_remove_journal_versions.rbindex dabe1124ae3..96d7a52d2d9 100644--- a/db/migrate/20210726070813_remove_journal_versions.rb+++ b/db/migrate/20210726070813_remove_journal_versions.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './20190724093332_add_journal_versions_table'+require_relative '20190724093332_add_journal_versions_table'# db/migrate/20200522140244_remove_journal_versions_table.rb# incorrectly removes journal_versionsdiff --git a/db/migrate/20210825183540_make_user_preferences_json.rb b/db/migrate/20210825183540_make_user_preferences_json.rbindex 1082dd2e3de..6f30a3b51d5 100644--- a/db/migrate/20210825183540_make_user_preferences_json.rb+++ b/db/migrate/20210825183540_make_user_preferences_json.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './migration_utils/utils'+require_relative 'migration_utils/utils'class MakeUserPreferencesJson < ActiveRecord::Migration[6.1]include ::Migration::Utilsdiff --git a/db/migrate/20210928133538_add_reminder_workdays.rb b/db/migrate/20210928133538_add_reminder_workdays.rbindex 00914b4afb0..2372fce4de0 100644--- a/db/migrate/20210928133538_add_reminder_workdays.rb+++ b/db/migrate/20210928133538_add_reminder_workdays.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './migration_utils/utils'+require_relative 'migration_utils/utils'class AddReminderWorkdays < ActiveRecord::Migration[6.1]include ::Migration::Utilsdiff --git a/db/migrate/20211026061420_add_indexes_for_email_reminder_pause.rb b/db/migrate/20211026061420_add_indexes_for_email_reminder_pause.rbindex 634be8c7806..b4116f669fa 100644--- a/db/migrate/20211026061420_add_indexes_for_email_reminder_pause.rb+++ b/db/migrate/20211026061420_add_indexes_for_email_reminder_pause.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './migration_utils/utils'+require_relative 'migration_utils/utils'class AddIndexesForEmailReminderPause < ActiveRecord::Migration[6.1]include ::Migration::Utilsdiff --git a/db/migrate/20220319211253_add_parent_id_to_wp.rb b/db/migrate/20220319211253_add_parent_id_to_wp.rbindex 7ede7666039..cc235f6d588 100644--- a/db/migrate/20220319211253_add_parent_id_to_wp.rb+++ b/db/migrate/20220319211253_add_parent_id_to_wp.rb@@ -111,7 +111,6 @@ class AddParentIdToWp < ActiveRecord::Migration[6.1]def add_closure_tree_table# Copied from closure tree migration- # rubocop:disable Rails/CreateTableWithTimestampscreate_table :work_package_hierarchies, id: false do |t|t.integer :ancestor_id, null: falset.integer :descendant_id, null: false@@ -125,7 +124,6 @@ class AddParentIdToWp < ActiveRecord::Migration[6.1]add_index :work_package_hierarchies, [:descendant_id],name: "work_package_desc_idx"# End copied from closure tree migration- # rubocop:enable Rails/CreateTableWithTimestampsend# Creates the actual closure tree data.diff --git a/db/migrate/20220818074150_fix_invalid_journals.rb b/db/migrate/20220818074150_fix_invalid_journals.rbindex 0d3023eccc6..9ddb1868833 100644--- a/db/migrate/20220818074150_fix_invalid_journals.rb+++ b/db/migrate/20220818074150_fix_invalid_journals.rb@@ -65,7 +65,6 @@ class FixInvalidJournals < ActiveRecord::Migration[7.0].pluck('DISTINCT(journable_type)').compact.to_h do |journable_type|-relation = Journal.where(journable_type:).where.not(data_type: "Journal::#{journable_type}Journal")diff --git a/db/migrate/20221017073431_remove_orphaned_tokens.rb b/db/migrate/20221017073431_remove_orphaned_tokens.rbindex 03326736293..2b3660562e7 100644--- a/db/migrate/20221017073431_remove_orphaned_tokens.rb+++ b/db/migrate/20221017073431_remove_orphaned_tokens.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative "./migration_utils/column"+require_relative "migration_utils/column"class RemoveOrphanedTokens < ActiveRecord::Migration[7.0]def updiff --git a/db/migrate/20221026132134_bigint_primary_and_foreign_keys.rb b/db/migrate/20221026132134_bigint_primary_and_foreign_keys.rbindex 81fb3e68e2d..c641d892044 100644--- a/db/migrate/20221026132134_bigint_primary_and_foreign_keys.rb+++ b/db/migrate/20221026132134_bigint_primary_and_foreign_keys.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative "./migration_utils/column"+require_relative "migration_utils/column"class BigintPrimaryAndForeignKeys < ActiveRecord::Migration[7.0]KEY_CHANGES = {diff --git a/db/migrate/20230322135932_merge_wiki_content_into_page.rb b/db/migrate/20230322135932_merge_wiki_content_into_page.rbindex 84a68ed5466..d97b2536fab 100644--- a/db/migrate/20230322135932_merge_wiki_content_into_page.rb+++ b/db/migrate/20230322135932_merge_wiki_content_into_page.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './migration_utils/utils'+require_relative 'migration_utils/utils'class MergeWikiContentIntoPage < ActiveRecord::Migration[7.0]include ::Migration::Utilsdiff --git a/db/migrate/migration_utils/utils.rb b/db/migrate/migration_utils/utils.rbindex 2d564e233be..15dba0019d2 100644--- a/db/migrate/migration_utils/utils.rb+++ b/db/migrate/migration_utils/utils.rb@@ -30,9 +30,9 @@ module Migrationmodule UtilsUpdateResult = Struct.new(:row, :updated)- def say_with_time_silently(message, &block)+ def say_with_time_silently(message, &)say_with_time message do- suppress_messages(&block)+ suppress_messages(&)endenddiff --git a/extra/mail_handler/rdm-mailhandler.rb b/extra/mail_handler/rdm-mailhandler.rbindex a670505067d..80e2cf8ff7d 100644--- a/extra/mail_handler/rdm-mailhandler.rb+++ b/extra/mail_handler/rdm-mailhandler.rb@@ -132,7 +132,8 @@ class RedmineMailHandlerwhen '--verbose'self.verbose = truewhen '--version'- puts VERSION; exit+ puts VERSION+ exitwhen '--project', '--status', '--type', '--category', '--priority'issue_attributes[opt.gsub(%r{^--}, '')] = arg.dupwhen '--allow-override'diff --git a/lib/api/errors/bad_request.rb b/lib/api/errors/bad_request.rbindex b3789e35355..b04e0043083 100644--- a/lib/api/errors/bad_request.rb+++ b/lib/api/errors/bad_request.rb@@ -33,7 +33,7 @@ module APIcode 400def initialize(message, **)- super I18n.t('api_v3.errors.code_400', message:)+ super(I18n.t('api_v3.errors.code_400', message:))endendenddiff --git a/lib/api/errors/conflict.rb b/lib/api/errors/conflict.rbindex 93fb2156ebc..5f58a7b32fd 100644--- a/lib/api/errors/conflict.rb+++ b/lib/api/errors/conflict.rb@@ -35,7 +35,7 @@ module APIdef initialize(*args)opts = args.last.is_a?(Hash) ? args.last : {}- super opts[:message] || I18n.t('api_v3.errors.code_409')+ super(opts[:message] || I18n.t('api_v3.errors.code_409'))endendenddiff --git a/lib/api/errors/enterprise_token_missing.rb b/lib/api/errors/enterprise_token_missing.rbindex 2fd326d252a..7ab7ebe7842 100644--- a/lib/api/errors/enterprise_token_missing.rb+++ b/lib/api/errors/enterprise_token_missing.rb@@ -33,7 +33,7 @@ module APIcode 500def initialize- super I18n.t('api_v3.errors.code_500_missing_enterprise_token')+ super(I18n.t('api_v3.errors.code_500_missing_enterprise_token'))endendenddiff --git a/lib/api/errors/error_base.rb b/lib/api/errors/error_base.rbindex f40143b1498..2133855cc9f 100644--- a/lib/api/errors/error_base.rb+++ b/lib/api/errors/error_base.rb@@ -112,7 +112,7 @@ module API@message = message@errors = []- super message:+ super(message:)endendenddiff --git a/lib/api/errors/internal_error.rb b/lib/api/errors/internal_error.rbindex ee5c9988573..e2381715947 100644--- a/lib/api/errors/internal_error.rb+++ b/lib/api/errors/internal_error.rb@@ -39,7 +39,7 @@ module APIerror += " #{error_message}"end- super error+ super(error)endprivatediff --git a/lib/api/errors/invalid_resource_link.rb b/lib/api/errors/invalid_resource_link.rbindex 07cd95b2181..caaa67b4ad3 100644--- a/lib/api/errors/invalid_resource_link.rb+++ b/lib/api/errors/invalid_resource_link.rb@@ -40,7 +40,7 @@ module APIexpected: expected_i18n,actual: actual_link)- super message+ super(message)endendenddiff --git a/lib/api/errors/invalid_signal.rb b/lib/api/errors/invalid_signal.rbindex c0f3936d6f3..2281b1adca4 100644--- a/lib/api/errors/invalid_signal.rb+++ b/lib/api/errors/invalid_signal.rb@@ -36,7 +36,7 @@ module APImessage = I18n.t("api_v3.errors.invalid_signal.#{type}",invalid: Array(invalid).join(', '),supported: Array(supported).join(', '))- super message+ super(message)endendenddiff --git a/lib/api/errors/invalid_user_status_transition.rb b/lib/api/errors/invalid_user_status_transition.rbindex 2a993ca9511..fad5c4e387b 100644--- a/lib/api/errors/invalid_user_status_transition.rb+++ b/lib/api/errors/invalid_user_status_transition.rb@@ -33,7 +33,7 @@ module APIcode 400def initialize(*)- super I18n.t('api_v3.errors.invalid_user_status_transition')+ super(I18n.t('api_v3.errors.invalid_user_status_transition'))endendenddiff --git a/lib/api/errors/multiple_errors.rb b/lib/api/errors/multiple_errors.rbindex 3516b3762ce..9a8870d6aaa 100644--- a/lib/api/errors/multiple_errors.rb+++ b/lib/api/errors/multiple_errors.rb@@ -40,7 +40,7 @@ module APIenddef initialize(errors)- super I18n.t('api_v3.errors.multiple_errors')+ super(I18n.t('api_v3.errors.multiple_errors'))@errors = errorsenddiff --git a/lib/api/errors/not_found.rb b/lib/api/errors/not_found.rbindex 337f496844f..7844de4abbc 100644--- a/lib/api/errors/not_found.rb+++ b/lib/api/errors/not_found.rb@@ -36,7 +36,7 @@ module API# Try to find a localizable error message for# the not found error by checking the "model" property set by rails.model ||= exception&.model&.underscore- super not_found_message(model)+ super(not_found_message(model))endprivatediff --git a/lib/api/errors/not_implemented.rb b/lib/api/errors/not_implemented.rbindex af0ed15a601..01ae439276a 100644--- a/lib/api/errors/not_implemented.rb+++ b/lib/api/errors/not_implemented.rb@@ -33,7 +33,7 @@ module APIcode 501def initialize(error_message = 'Not yet implemented'.freeze, **)- super error_message+ super(error_message)endendenddiff --git a/lib/api/errors/outbound_request_forbidden.rb b/lib/api/errors/outbound_request_forbidden.rbindex 022424af992..1b3cbbffe14 100644--- a/lib/api/errors/outbound_request_forbidden.rb+++ b/lib/api/errors/outbound_request_forbidden.rb@@ -33,7 +33,7 @@ module APIcode 500def initialize- super I18n.t('api_v3.errors.code_500_outbound_request_failure', status_code: 403)+ super(I18n.t('api_v3.errors.code_500_outbound_request_failure', status_code: 403))endendenddiff --git a/lib/api/errors/outbound_request_not_found.rb b/lib/api/errors/outbound_request_not_found.rbindex 368ea861a24..669cbe1272b 100644--- a/lib/api/errors/outbound_request_not_found.rb+++ b/lib/api/errors/outbound_request_not_found.rb@@ -33,7 +33,7 @@ module APIcode 500def initialize- super I18n.t('api_v3.errors.code_500_outbound_request_failure', status_code: 404)+ super(I18n.t('api_v3.errors.code_500_outbound_request_failure', status_code: 404))endendenddiff --git a/lib/api/errors/parse_error.rb b/lib/api/errors/parse_error.rbindex c210e94c019..b2e28671105 100644--- a/lib/api/errors/parse_error.rb+++ b/lib/api/errors/parse_error.rb@@ -33,7 +33,7 @@ module APIcode 400def initialize(_message = nil, details: nil)- super I18n.t('api_v3.errors.invalid_json')+ super(I18n.t('api_v3.errors.invalid_json'))if details@details = { parseError: clean_parse_error(details) }diff --git a/lib/api/errors/property_format_error.rb b/lib/api/errors/property_format_error.rbindex 2b127034525..cbcf8c999de 100644--- a/lib/api/errors/property_format_error.rb+++ b/lib/api/errors/property_format_error.rb@@ -41,7 +41,7 @@ module APIproperty:,expected_format:,actual: actual_value)- super message+ super(message)enddef detailsdiff --git a/lib/api/errors/property_missing_error.rb b/lib/api/errors/property_missing_error.rbindex 3c3a8c3ee9f..3404692b4f0 100644--- a/lib/api/errors/property_missing_error.rb+++ b/lib/api/errors/property_missing_error.rb@@ -38,7 +38,7 @@ module APIself.property = propertymessage = I18n.t('api_v3.errors.missing_property', property:)- super message+ super(message)enddef detailsdiff --git a/lib/api/errors/too_many_requests.rb b/lib/api/errors/too_many_requests.rbindex 7e97ac1db6e..759d7c7d8a4 100644--- a/lib/api/errors/too_many_requests.rb+++ b/lib/api/errors/too_many_requests.rb@@ -35,7 +35,7 @@ module APIdef initialize(*args)opts = args.last.is_a?(Hash) ? args.last : {}- super opts[:message] || I18n.t('api_v3.errors.code_429')+ super(opts[:message] || I18n.t('api_v3.errors.code_429'))endendenddiff --git a/lib/api/errors/unauthenticated.rb b/lib/api/errors/unauthenticated.rbindex 22f8fd9b3d5..b34aa22f31c 100644--- a/lib/api/errors/unauthenticated.rb+++ b/lib/api/errors/unauthenticated.rb@@ -33,7 +33,7 @@ module APIcode 401def initialize(message = I18n.t('api_v3.errors.code_401'))- super message+ super(message)endendenddiff --git a/lib/api/errors/unauthorized.rb b/lib/api/errors/unauthorized.rbindex 0465a7f7ad6..37b6227fd89 100644--- a/lib/api/errors/unauthorized.rb+++ b/lib/api/errors/unauthorized.rb@@ -35,7 +35,7 @@ module APIdef initialize(*args)opts = args.last.is_a?(Hash) ? args.last : {}- super opts[:message] || I18n.t('api_v3.errors.code_403')+ super(opts[:message] || I18n.t('api_v3.errors.code_403'))endendenddiff --git a/lib/api/errors/unsupported_media_type.rb b/lib/api/errors/unsupported_media_type.rbindex 0a77ca5aff5..ab86702659a 100644--- a/lib/api/errors/unsupported_media_type.rb+++ b/lib/api/errors/unsupported_media_type.rb@@ -33,7 +33,7 @@ module APIcode 415def initialize(message)- super message+ super(message)endendenddiff --git a/lib/api/errors/unwritable_property.rb b/lib/api/errors/unwritable_property.rbindex 44c77b6247a..901fb5d1e2f 100644--- a/lib/api/errors/unwritable_property.rb+++ b/lib/api/errors/unwritable_property.rb@@ -33,7 +33,7 @@ module APIcode 422def initialize(property, message)- super message+ super(message)@property = property@details = { attribute: property }diff --git a/lib/api/errors/validation.rb b/lib/api/errors/validation.rbindex 2469b428c73..2f34dd31f37 100644--- a/lib/api/errors/validation.rb+++ b/lib/api/errors/validation.rb@@ -33,7 +33,7 @@ module APIcode 422def initialize(property, full_message)- super full_message+ super(full_message)@property = property@details = { attribute: property }diff --git a/lib/api/open_api.rb b/lib/api/open_api.rbindex 7c9df0926de..2188633861b 100644--- a/lib/api/open_api.rb+++ b/lib/api/open_api.rb@@ -20,7 +20,7 @@ module APIenddef assemble_spec(file_path)- spec = YAML.safe_load File.read(file_path.to_s)+ spec = YAML.safe_load_file(file_path.to_s)substitute_refs(spec, path: file_path.parent, root_path: file_path.parent)rescue Psych::SyntaxError => e@@ -57,7 +57,7 @@ module APIdef substitute_refs_in_hash(spec, path:, root_path:, root_spec: spec)if spec.size == 1 && spec.keys.first == "$ref"ref_path = path.join spec.values.first- ref_value = YAML.safe_load File.read(ref_path.to_s)+ ref_value = YAML.safe_load_file(ref_path.to_s)resolve_refs ref_value, path: ref_path.parent, root_path:, root_spec:elsediff --git a/lib/api/utilities/endpoints/delete.rb b/lib/api/utilities/endpoints/delete.rbindex ec0341832c9..c7eaab693c6 100644--- a/lib/api/utilities/endpoints/delete.rb+++ b/lib/api/utilities/endpoints/delete.rb@@ -34,7 +34,7 @@ module APIdef default_instance_generator(model)->(_params) do- instance_variable_get("@#{model.name.demodulize.underscore}")+ instance_variable_get(:"@#{model.name.demodulize.underscore}")endenddiff --git a/lib/api/utilities/endpoints/modify.rb b/lib/api/utilities/endpoints/modify.rbindex f06e8518ddc..f264d09b3a9 100644--- a/lib/api/utilities/endpoints/modify.rb+++ b/lib/api/utilities/endpoints/modify.rb@@ -32,7 +32,7 @@ module APIclass Modify < Bodieddef default_instance_generator(model)->(_params, _current_user) do- instance_variable_get("@#{model.name.demodulize.underscore}")+ instance_variable_get(:"@#{model.name.demodulize.underscore}")endenddiff --git a/lib/api/utilities/endpoints/show.rb b/lib/api/utilities/endpoints/show.rbindex e52ed985372..9b830eddaee 100644--- a/lib/api/utilities/endpoints/show.rb+++ b/lib/api/utilities/endpoints/show.rb@@ -32,7 +32,7 @@ module APIclass Showdef default_instance_generator(model)->(_params) do- instance_variable_get("@#{model.name.demodulize.underscore}")+ instance_variable_get(:"@#{model.name.demodulize.underscore}")endenddiff --git a/lib/api/utilities/endpoints/update.rb b/lib/api/utilities/endpoints/update.rbindex 6d69604cb6c..64debc9ecfe 100644--- a/lib/api/utilities/endpoints/update.rb+++ b/lib/api/utilities/endpoints/update.rb@@ -32,7 +32,7 @@ module APIclass Update < Modifydef default_instance_generator(model)->(_params) do- instance_variable_get("@#{model.name.demodulize.underscore}")+ instance_variable_get(:"@#{model.name.demodulize.underscore}")endenddiff --git a/lib/api/v3/activities/activity_property_formatters.rb b/lib/api/v3/activities/activity_property_formatters.rbindex 86bc5d3781f..b4912987060 100644--- a/lib/api/v3/activities/activity_property_formatters.rb+++ b/lib/api/v3/activities/activity_property_formatters.rb@@ -52,7 +52,6 @@ module APIjournal.details.filter_map { |d| journal.render_detail(d, html:, activity_page:) }-enddef journal_note(journal)diff --git a/lib/api/v3/utilities/endpoints/update_form.rb b/lib/api/v3/utilities/endpoints/update_form.rbindex 32d142d706e..f34bde232ca 100644--- a/lib/api/v3/utilities/endpoints/update_form.rb+++ b/lib/api/v3/utilities/endpoints/update_form.rb@@ -33,7 +33,7 @@ module APIclass UpdateForm < Formdef default_instance_generator(model)->(_params) do- instance_variable_get("@#{model.name.demodulize.underscore}")+ instance_variable_get(:"@#{model.name.demodulize.underscore}")endenddiff --git a/lib/api/v3/work_packages/eager_loading/base.rb b/lib/api/v3/work_packages/eager_loading/base.rbindex c28b4a220b1..d42bbd9260f 100644--- a/lib/api/v3/work_packages/eager_loading/base.rb+++ b/lib/api/v3/work_packages/eager_loading/base.rb@@ -34,7 +34,7 @@ module APIdef initialize(work_packages, **options)self.work_packages = work_packagesoptions.each do |key, value|- send("#{key}=", value) if respond_to?("#{key}=")+ send(:"#{key}=", value) if respond_to?(:"#{key}=")endenddiff --git a/lib/api/v3/work_packages/work_package_collection_representer.rb b/lib/api/v3/work_packages/work_package_collection_representer.rbindex cd14588f1ce..e318a4e5982 100644--- a/lib/api/v3/work_packages/work_package_collection_representer.rb+++ b/lib/api/v3/work_packages/work_package_collection_representer.rb@@ -75,7 +75,7 @@ module API# and set those to be the represented collection.# A potential ordering is reapplied to the work package collection in ruby.- @represented = ::API::V3::WorkPackages::WorkPackageEagerLoadingWrapper \+ @represented = ::API::V3::WorkPackages::WorkPackageEagerLoadingWrapper.wrap(represented, current_user, timestamps:, query:)enddiff --git a/lib/open_project/journal_formatter/active_status.rb b/lib/open_project/journal_formatter/active_status.rbindex 82a8a10f1a3..2604f0244ae 100644--- a/lib/open_project/journal_formatter/active_status.rb+++ b/lib/open_project/journal_formatter/active_status.rb@@ -31,7 +31,7 @@ class OpenProject::JournalFormatter::ActiveStatus < JournalFormatter::Baselabel_text = label('project')label_text = content_tag(:strong, label_text) if options[:html]- value = \+ value =if values.lastI18n.t('activerecord.attributes.project.active_value.true')elsediff --git a/lib/open_project/journal_formatter/template.rb b/lib/open_project/journal_formatter/template.rbindex fb314539581..e01c33299bf 100644--- a/lib/open_project/journal_formatter/template.rb+++ b/lib/open_project/journal_formatter/template.rb@@ -31,7 +31,7 @@ class OpenProject::JournalFormatter::Template < JournalFormatter::Baselabel_text = label('project')label_text = content_tag(:strong, label_text) if options[:html]- value = \+ value =if values.lastI18n.t('activerecord.attributes.project.templated_value.true')elsediff --git a/lib/open_project/journal_formatter/visibility.rb b/lib/open_project/journal_formatter/visibility.rbindex 07a302655f9..72f215e7bed 100644--- a/lib/open_project/journal_formatter/visibility.rb+++ b/lib/open_project/journal_formatter/visibility.rb@@ -31,7 +31,7 @@ class OpenProject::JournalFormatter::Visibility < JournalFormatter::Baselabel_text = I18n.t('activerecord.attributes.project.public_value.title')label_text = content_tag(:strong, label_text) if options[:html]- value = \+ value =if values.lastI18n.t('activerecord.attributes.project.public_value.true')elsediff --git a/lib/open_project/object_linking.rb b/lib/open_project/object_linking.rbindex 55516ae1923..eae69d26898 100644--- a/lib/open_project/object_linking.rb+++ b/lib/open_project/object_linking.rb@@ -103,7 +103,7 @@ module OpenProjecth(truncate(message.subject, length: 60)),topic_path_or_url(options.delete(:no_root) ? message : message.root,{- r: (message.parent_id && message.id),+ r: message.parent_id && message.id,anchor: (message.parent_id ? "message-#{message.id}" : nil)}.merge(options)),html_optionsdiff --git a/lib/open_project/omni_auth/authorization.rb b/lib/open_project/omni_auth/authorization.rbindex 3e1dc0760b8..2176ab7d915 100644--- a/lib/open_project/omni_auth/authorization.rb+++ b/lib/open_project/omni_auth/authorization.rb@@ -82,10 +82,10 @@ module OpenProjectendend- def self.authorize_user_for_provider(provider, &block)+ def self.authorize_user_for_provider(provider)callback = AuthorizationBlockCallback.new do |dec, auth_hash|if auth_hash.provider.to_sym == provider.to_sym- block.call dec, auth_hash+ yield dec, auth_hashelsedec.approveend@@ -260,9 +260,9 @@ module OpenProject### Passes each element to the given block and returns the# result of the block as soon as it's truthy.- def find_map(&block)+ def find_mapeach do |e|- result = block.call e+ result = yield ereturn result if resultenddiff --git a/lib/open_project/patches.rb b/lib/open_project/patches.rbindex 010bb459c3a..50725fcc882 100644--- a/lib/open_project/patches.rb+++ b/lib/open_project/patches.rb@@ -33,14 +33,14 @@ module OpenProject### Check against a particular gem version# before patching it- def patch_gem_version(gem, version, &block)+ def patch_gem_version(gem, version)found_version = Gem.loaded_specs[gem].versionif found_version > Gem::Version.new(version)raise "OpenProject expects to patch gem '#{gem}' at version #{version} " \"but found version #{found_version}. Please check whether the patch is still valid."end- block.call+ yieldendendenddiff --git a/lib/open_project/patches/mailer_controller_preview.rb b/lib/open_project/patches/mailer_controller_preview.rbindex 2dd4083c530..ce3f75ba5bd 100644--- a/lib/open_project/patches/mailer_controller_preview.rb+++ b/lib/open_project/patches/mailer_controller_preview.rb@@ -35,7 +35,7 @@ module OpenProject::Patches::MailerControllerCspdef extend_content_security_policyappend_content_security_policy_directives(- script_src: %w('unsafe-inline'),+ script_src: %w('unsafe-inline'))endenddiff --git a/lib/open_project/plugins/frontend_linking/generator.rb b/lib/open_project/plugins/frontend_linking/generator.rbindex 967fc0e0217..b46fc63c12e 100644--- a/lib/open_project/plugins/frontend_linking/generator.rb+++ b/lib/open_project/plugins/frontend_linking/generator.rb@@ -59,7 +59,7 @@ module ::OpenProject::Plugins# For that, search all gems with the group :opf_pluginsdef regenerate_angular_linksall_frontend_plugins.tap do |plugins|- target_dir = Rails.root.join('frontend', 'src', 'app', 'features', 'plugins', 'linked')+ target_dir = Rails.root.join("frontend/src/app/features/plugins/linked")puts "Cleaning linked target directory #{target_dir}"# Removing the current linked directory and recreate@@ -103,7 +103,7 @@ module ::OpenProject::Plugins### Regenerate the frontend plugin module orchestrating the linked frontendsdef generate_plugin_module(plugins)- file_register = Rails.root.join('frontend', 'src', 'app', 'features', 'plugins', 'linked-plugins.module.ts')+ file_register = Rails.root.join("frontend/src/app/features/plugins/linked-plugins.module.ts")template_file = File.read(File.expand_path('linked-plugins.module.ts.erb', __dir__))template = ::ERB.new template_file, trim_mode: '-'@@ -116,7 +116,7 @@ module ::OpenProject::Plugins### Regenerate the frontend plugin sass filesdef generate_plugin_sass(plugins)- file_register = Rails.root.join('frontend', 'src', 'app', 'features', 'plugins', 'linked-plugins.styles.sass')+ file_register = Rails.root.join("frontend/src/app/features/plugins/linked-plugins.styles.sass")template_file = File.read(File.expand_path('linked-plugins.styles.sass.erb', __dir__))template = ::ERB.new template_file, trim_mode: '-'diff --git a/lib/open_project/rate_limiting/throttled_api_error.rb b/lib/open_project/rate_limiting/throttled_api_error.rbindex 4c8e4bc05d6..e7e47e0b230 100644--- a/lib/open_project/rate_limiting/throttled_api_error.rb+++ b/lib/open_project/rate_limiting/throttled_api_error.rb@@ -4,7 +4,7 @@ module OpenProject::RateLimitingcode 429def initialize(*)- super 'You have reached the request limit for this resource.'+ super('You have reached the request limit for this resource.')endendenddiff --git a/lib/open_project/scm/adapters.rb b/lib/open_project/scm/adapters.rbindex 53f70b14679..5c0ba13b985 100644--- a/lib/open_project/scm/adapters.rb+++ b/lib/open_project/scm/adapters.rb@@ -71,7 +71,7 @@ module OpenProjectdef initialize(attributes = {})%i[name path kind size].each do |attr|- send("#{attr}=", attributes[attr])+ send(:"#{attr}=", attributes[attr])endself.size = size.to_i if size.present?@@ -105,7 +105,7 @@ module OpenProjectdef initialize(attributes = {})%i[identifier scmid author time paths revision branch].each do |attr|- send("#{attr}=", attributes[attr])+ send(:"#{attr}=", attributes[attr])endself.name = attributes[:name].presence || identifierdiff --git a/lib/open_project/scm/adapters/git.rb b/lib/open_project/scm/adapters/git.rbindex 2f2ca407210..a1bd782506d 100644--- a/lib/open_project/scm/adapters/git.rb+++ b/lib/open_project/scm/adapters/git.rb@@ -57,7 +57,7 @@ module OpenProjectenddef client_version- @client_version ||= (git_binary_version || [])+ @client_version ||= git_binary_version || []enddef scm_version_from_command_line@@ -479,11 +479,11 @@ module OpenProject# Builds the full git arguments from the parameters# and calls the given block with in, out, err, thread# from +Open3#popen3+.- def popen3(args, opt = {}, &block)+ def popen3(args, opt = {})opt = opt.merge(chdir: checkout_path) if checkout?cmd = build_git_cmd(args)super(cmd, opt) do |_stdin, stdout, stderr, wait_thr|- block.call(stdout)+ yield(stdout)process = wait_thr.valueif process.exitstatus != 0diff --git a/lib/open_project/scm/adapters/subversion.rb b/lib/open_project/scm/adapters/subversion.rbindex 9596a98d12e..398d1c36795 100644--- a/lib/open_project/scm/adapters/subversion.rb+++ b/lib/open_project/scm/adapters/subversion.rb@@ -39,11 +39,11 @@ module OpenProjectenddef svnadmin_command- @svnadmin_command ||= (self.class.config[:svnadmin_command] || 'svnadmin')+ @svnadmin_command ||= self.class.config[:svnadmin_command] || 'svnadmin'enddef client_version- @client_version ||= (svn_binary_version || [])+ @client_version ||= svn_binary_version || []enddef svn_binary_version@@ -358,10 +358,10 @@ module OpenProject# Builds the full git arguments from the parameters# and calls the given block with in, out, err, thread# from +Open3#popen3+.- def popen3(args, &block)+ def popen3(args)cmd = build_svn_cmd(args)super(cmd) do |_stdin, stdout, stderr, wait_thr|- block.call(stdout, stderr)+ yield(stdout, stderr)process = wait_thr.valuereturn process.exitstatus == 0diff --git a/lib/open_project/text_formatting/filters/task_list_filter.rb b/lib/open_project/text_formatting/filters/task_list_filter.rbindex bd9a1e61598..8271c7a4ef8 100644--- a/lib/open_project/text_formatting/filters/task_list_filter.rb+++ b/lib/open_project/text_formatting/filters/task_list_filter.rb@@ -57,7 +57,7 @@ module OpenProject::TextFormatting## Returns nothing.def filter!- list_items(doc).reverse.each do |li|+ list_items(doc).reverse_each do |li|next if list_items(li.parent).empty?add_css_class(li.parent, 'op-uc-list_task-list')@@ -68,7 +68,7 @@ module OpenProject::TextFormattingelse[li, li.inner_html]end- if match = (inner.chomp =~ ItemPattern && $1)+ if match = inner.chomp =~ ItemPattern && $1item = TaskList::Item.new(match, inner)# prepend because we're iterating in reversetask_list_items.unshift itemdiff --git a/lib/open_project/text_formatting/formats.rb b/lib/open_project/text_formatting/formats.rbindex 08b4eb9e422..fbfc0481ef1 100644--- a/lib/open_project/text_formatting/formats.rb+++ b/lib/open_project/text_formatting/formats.rb@@ -32,20 +32,20 @@ module OpenProject::TextFormattingattr_reader :plain, :rich%i(plain rich).each do |flavor|- define_method("#{flavor}_format") do+ define_method(:"#{flavor}_format") dosend(flavor).formatend- define_method("#{flavor}_formatter") do+ define_method(:"#{flavor}_formatter") dosend(flavor).formatterend- define_method("#{flavor}_helper") do+ define_method(:"#{flavor}_helper") dosend(flavor).helperend- define_method("register_#{flavor}!") do |klass|- instance_variable_set("@#{flavor}", klass)+ define_method(:"register_#{flavor}!") do |klass|+ instance_variable_set(:"@#{flavor}", klass)endenddiff --git a/lib/open_project/text_formatting/matchers/link_handlers/hash_separator.rb b/lib/open_project/text_formatting/matchers/link_handlers/hash_separator.rbindex 815d44f642e..2e4fc02d2f2 100644--- a/lib/open_project/text_formatting/matchers/link_handlers/hash_separator.rb+++ b/lib/open_project/text_formatting/matchers/link_handlers/hash_separator.rb@@ -47,7 +47,7 @@ module OpenProject::TextFormatting::Matchers# message#1218 -> Link to message with id 1218#def call- send "render_#{matcher.prefix}"+ send :"render_#{matcher.prefix}"enddef valid_prefix?diff --git a/lib/open_project/text_formatting/matchers/resource_links_matcher.rb b/lib/open_project/text_formatting/matchers/resource_links_matcher.rbindex 806d379a472..be45cde2478 100644--- a/lib/open_project/text_formatting/matchers/resource_links_matcher.rb+++ b/lib/open_project/text_formatting/matchers/resource_links_matcher.rb@@ -79,7 +79,7 @@ module OpenProject::TextFormatting([[[:space:]](,\-\[>]|^) # Leading string(!)? # Escaped marker(([a-z0-9\-_]+):)? # Project identifier- (#{allowed_prefixes.join("|")})? # prefix+ (#{allowed_prefixes.join('|')})? # prefix((\#+|r)(\d+) # separator and its identifier|diff --git a/lib/open_project/text_formatting/truncation.rb b/lib/open_project/text_formatting/truncation.rbindex cc8e87ed3f4..d4ce0da5037 100644--- a/lib/open_project/text_formatting/truncation.rb+++ b/lib/open_project/text_formatting/truncation.rb@@ -33,8 +33,8 @@ module OpenProjectinclude ActionView::Helpers::TextHelper# Truncates and returns the string as a single line- def truncate_single_line(string, *args)- truncate(string.to_s, *args).gsub(%r{[\r\n]+}m, ' ').html_safe+ def truncate_single_line(string, *)+ truncate(string.to_s, *).gsub(%r{[\r\n]+}m, ' ').html_safeendendenddiff --git a/lib/redmine/ciphering.rb b/lib/redmine/ciphering.rbindex f9670fc68be..695fe50ee01 100644--- a/lib/redmine/ciphering.rb+++ b/lib/redmine/ciphering.rb@@ -79,7 +79,7 @@ module Redmine!!transaction doall.each do |object|clear = object.send(attribute)- object.send "#{attribute}=", clear+ object.send :"#{attribute}=", clearraise(ActiveRecord::Rollback) unless object.save(validate: false)endenddiff --git a/lib/redmine/menu_manager/menu_item.rb b/lib/redmine/menu_manager/menu_item.rbindex b824a286a27..b194744705d 100644--- a/lib/redmine/menu_manager/menu_item.rb+++ b/lib/redmine/menu_manager/menu_item.rb@@ -72,7 +72,7 @@ class Redmine::MenuManager::MenuItem < Redmine::MenuManager::TreeNode@engine = options[:engine]@allow_deeplink = options[:allow_deeplink]@skip_permissions_check = !!options[:skip_permissions_check]- super @name.to_sym+ super(@name.to_sym)enddef caption(project = nil)diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rbindex b6085df3c8a..4769847a8b6 100644--- a/lib/redmine/plugin.rb+++ b/lib/redmine/plugin.rb@@ -89,7 +89,7 @@ module Redmine # :nodoc:class_eval donames.each do |name|define_method(name) do |*args|- args.empty? ? instance_variable_get("@#{name}") : instance_variable_set("@#{name}", *args)+ args.empty? ? instance_variable_get(:"@#{name}") : instance_variable_set(:"@#{name}", *args)endendenddiff --git a/lib/tabular_form_builder.rb b/lib/tabular_form_builder.rbindex 8fc607b3449..3e5e2d4d6a8 100644--- a/lib/tabular_form_builder.rb+++ b/lib/tabular_form_builder.rb@@ -165,7 +165,7 @@ class TabularFormBuilder < ActionView::Helpers::FormBuildertext = field.to_s + "_#{checked_value}",options = {})- label_for = "#{sanitized_object_name}_#{field}_#{checked_value}".to_sym+ label_for = :"#{sanitized_object_name}_#{field}_#{checked_value}"unchecked_value = options.delete(:unchecked_value) { '' }input_options = options.reverse_merge(multiple: true,diff --git a/lib/tasks/dependencies.rake b/lib/tasks/dependencies.rakeindex 2223b7e8cd9..123bea60e69 100644--- a/lib/tasks/dependencies.rake+++ b/lib/tasks/dependencies.rake@@ -34,12 +34,10 @@ namespace :openproject dotask update: %w[openproject:dependencies:update:gems]namespace :update do- def parse_capture(capture, &block)+ def parse_capture(capture, &)capture.split("\n")- .filter_map do |line|- block.call(line)- end+ .filter_map(&)enddesc 'Update gems to the extend the Gemfile allows in individual commits'diff --git a/lib_static/open_project/authentication.rb b/lib_static/open_project/authentication.rbindex ff50ca8f0cc..b4758ce562f 100644--- a/lib_static/open_project/authentication.rb+++ b/lib_static/open_project/authentication.rb@@ -218,7 +218,6 @@ module OpenProjectdef find_all(identifiers)identifiers.filter_map { |ident| stages.find { |st| st.identifier == ident } }-enddef complete_path(identifier, session:, back_url: nil)diff --git a/lib_static/open_project/authentication/manager.rb b/lib_static/open_project/authentication/manager.rbindex 35c4f6f841f..b9d808e64c4 100644--- a/lib_static/open_project/authentication/manager.rb+++ b/lib_static/open_project/authentication/manager.rb@@ -11,10 +11,10 @@ module OpenProjectblock = lambda { |config|self.class.configure_warden config- configure.call config if configure+ yield config if configure}- super app, options, &block+ super(app, options, &block)endclass << self@@ -59,7 +59,7 @@ module OpenProjectdef update!(opts, &block)self.store = opts[:store] if opts.include? :storeself.realm = opts[:realm] if opts.include? :realm- self.strategies = block.call strategies if block_given?+ self.strategies = yield strategies if blockendenddiff --git a/lib_static/open_project/authentication/strategies/warden/global_basic_auth.rb b/lib_static/open_project/authentication/strategies/warden/global_basic_auth.rbindex c23a7fdf023..9a0916672dd 100644--- a/lib_static/open_project/authentication/strategies/warden/global_basic_auth.rb+++ b/lib_static/open_project/authentication/strategies/warden/global_basic_auth.rb@@ -70,12 +70,10 @@ module OpenProject### Only valid if global basic auth is configured and tried.def valid?- (- OpenProject::Configuration.apiv3_enable_basic_auth? &&- self.class.configuration? &&- super &&- username == self.class.user- )+ OpenProject::Configuration.apiv3_enable_basic_auth? &&+ self.class.configuration? &&+ super &&+ username == self.class.userenddef authenticate_user(username, password)diff --git a/lib_static/open_project/authentication/strategies/warden/user_basic_auth.rb b/lib_static/open_project/authentication/strategies/warden/user_basic_auth.rbindex e1a0577aa0b..93bf7bc3a66 100644--- a/lib_static/open_project/authentication/strategies/warden/user_basic_auth.rb+++ b/lib_static/open_project/authentication/strategies/warden/user_basic_auth.rb@@ -17,11 +17,9 @@ module OpenProjectenddef valid?- (- OpenProject::Configuration.apiv3_enable_basic_auth? &&- super &&- username == self.class.user- )+ OpenProject::Configuration.apiv3_enable_basic_auth? &&+ super &&+ username == self.class.userenddef authenticate_user(_, api_key)diff --git a/lib_static/open_project/configuration.rb b/lib_static/open_project/configuration.rbindex 1664ebdf531..1ef566bbb8f 100644--- a/lib_static/open_project/configuration.rb+++ b/lib_static/open_project/configuration.rb@@ -108,7 +108,7 @@ module OpenProject]end- def method_missing(name, *args, &)+ def method_missing(name, *, &)setting_name = name.to_s.sub(/\?$/, '')definition = Settings::Definition[setting_name]@@ -116,7 +116,7 @@ module OpenProjectif definitiondefine_config_methods(definition)- send(name, *args, &)+ send(name, *, &)elsesuperend@@ -131,7 +131,7 @@ module OpenProjectself[definition.name]end- define_singleton_method "#{definition.name}?" do+ define_singleton_method :"#{definition.name}?" doif definition.format != :booleanActiveSupport::Deprecation.warn "Calling #{self}.#{definition.name}? is deprecated since it is not a boolean", callerenddiff --git a/lib_static/open_project/feature_decisions.rb b/lib_static/open_project/feature_decisions.rbindex 42879e0e129..1a3ca370101 100644--- a/lib_static/open_project/feature_decisions.rb+++ b/lib_static/open_project/feature_decisions.rb@@ -65,7 +65,7 @@ module OpenProjectenddef active- all.filter { |flag_name| send("#{flag_name}_active?") }.map(&:to_s)+ all.filter { |flag_name| send(:"#{flag_name}_active?") }.map(&:to_s)enddef all@@ -73,8 +73,8 @@ module OpenProjectenddef define_flag_methods(flag_name)- define_singleton_method "#{flag_name}_active?" do- Setting.exists?("feature_#{flag_name}_active") && Setting.send("feature_#{flag_name}_active?")+ define_singleton_method :"#{flag_name}_active?" do+ Setting.exists?("feature_#{flag_name}_active") && Setting.send(:"feature_#{flag_name}_active?")endenddiff --git a/lib_static/open_project/notifications.rb b/lib_static/open_project/notifications.rbindex 5ba6949538d..1aa73e1caad 100644--- a/lib_static/open_project/notifications.rb+++ b/lib_static/open_project/notifications.rb@@ -45,7 +45,7 @@ module OpenProject# @raises ArgumentError if no block is given.def subscribe(name, clear_subscriptions: false, &block)# if no block is given, raise an error- raise ArgumentError, 'please provide a block as a callback' unless block_given?+ raise ArgumentError, 'please provide a block as a callback' unless blockif clear_subscriptionssubscriptions[name].each do |sub|@@ -54,7 +54,7 @@ module OpenProjectendsub = ActiveSupport::Notifications.subscribe(name.to_s) do |_, _, _, _, data|- block.call(data.fetch(:payload, data))+ yield(data.fetch(:payload, data))endsubs = clear_subscriptions ? [] : Array(subscriptions[name])diff --git a/lib_static/plugins/acts_as_attachable/lib/acts_as_attachable.rb b/lib_static/plugins/acts_as_attachable/lib/acts_as_attachable.rbindex 5a9e2ba0b61..3998cd92771 100644--- a/lib_static/plugins/acts_as_attachable/lib/acts_as_attachable.rb+++ b/lib_static/plugins/acts_as_attachable/lib/acts_as_attachable.rb@@ -122,11 +122,11 @@ module Redmineenddef view_permission_default- "view_#{name.pluralize.underscore}".to_sym+ :"view_#{name.pluralize.underscore}"enddef edit_permission_default- "edit_#{name.pluralize.underscore}".to_sym+ :"edit_#{name.pluralize.underscore}"enddef attachable_extract_tsv_option(options)diff --git a/lib_static/plugins/acts_as_journalized/lib/journal_formatter.rb b/lib_static/plugins/acts_as_journalized/lib/journal_formatter.rbindex f4b32da88de..c9935fe0db7 100644--- a/lib_static/plugins/acts_as_journalized/lib/journal_formatter.rb+++ b/lib_static/plugins/acts_as_journalized/lib/journal_formatter.rb@@ -49,16 +49,16 @@# It provides the hooks to apply different formatting to the details# of a specific journal.-require_relative './journal_formatter_cache'-require_relative './journal_formatter/base'-require_relative './journal_formatter/attribute'-require_relative './journal_formatter/datetime'-require_relative './journal_formatter/day_count'-require_relative './journal_formatter/decimal'-require_relative './journal_formatter/fraction'-require_relative './journal_formatter/id'-require_relative './journal_formatter/named_association'-require_relative './journal_formatter/plaintext'+require_relative 'journal_formatter_cache'+require_relative 'journal_formatter/base'+require_relative 'journal_formatter/attribute'+require_relative 'journal_formatter/datetime'+require_relative 'journal_formatter/day_count'+require_relative 'journal_formatter/decimal'+require_relative 'journal_formatter/fraction'+require_relative 'journal_formatter/id'+require_relative 'journal_formatter/named_association'+require_relative 'journal_formatter/plaintext'module JournalFormattermattr_accessor :formatters, :registered_fieldsdiff --git a/lib_static/plugins/acts_as_searchable/lib/acts_as_searchable.rb b/lib_static/plugins/acts_as_searchable/lib/acts_as_searchable.rbindex ccb45006f38..24c7bed37ee 100644--- a/lib_static/plugins/acts_as_searchable/lib/acts_as_searchable.rb+++ b/lib_static/plugins/acts_as_searchable/lib/acts_as_searchable.rb@@ -60,7 +60,7 @@ module Redmine# Permission needed to search this modelunless searchable_options.has_key?(:permission)searchable_options[:permission] =- "view_#{name.underscore.pluralize}".to_sym+ :"view_#{name.underscore.pluralize}"end# Should we search custom fields on this model ?diff --git a/lib_static/plugins/acts_as_watchable/lib/acts_as_watchable.rb b/lib_static/plugins/acts_as_watchable/lib/acts_as_watchable.rbindex f4b9ab031b9..efa6d55a823 100644--- a/lib_static/plugins/acts_as_watchable/lib/acts_as_watchable.rb+++ b/lib_static/plugins/acts_as_watchable/lib/acts_as_watchable.rb@@ -163,7 +163,7 @@ module Redminemodule ClassMethodsdef acts_as_watchable_permission- acts_as_watchable_options[:permission] || "view_#{name.underscore.pluralize}".to_sym+ acts_as_watchable_options[:permission] || :"view_#{name.underscore.pluralize}"endendenddiff --git a/lib_static/redmine/i18n.rb b/lib_static/redmine/i18n.rbindex 7daaa110742..354dc007c44 100644--- a/lib_static/redmine/i18n.rb+++ b/lib_static/redmine/i18n.rb@@ -50,7 +50,7 @@ module Redmineenddef l_or_humanize(s, options = {})- k = "#{options[:prefix]}#{s}".to_sym+ k = :"#{options[:prefix]}#{s}"::I18n.t(k, default: s.to_s.humanize)enddiff --git a/lookbook/previews/users/avatar_component_preview.rb b/lookbook/previews/users/avatar_component_preview.rbindex c951ff85580..2ebeccc893d 100644--- a/lookbook/previews/users/avatar_component_preview.rb+++ b/lookbook/previews/users/avatar_component_preview.rb@@ -3,7 +3,6 @@module Users# @logical_path OpenProject/Usersclass AvatarComponentPreview < Lookbook::Preview-# Renders a user avatar using the OpenProject opce-principal web component# @param size select { choices: [default, medium, mini] }# @param link togglediff --git a/modules/auth_plugins/spec/features/auth_provider_spec.rb b/modules/auth_plugins/spec/features/auth_provider_spec.rbindex e2ae489d61a..d841c69eda7 100644--- a/modules/auth_plugins/spec/features/auth_provider_spec.rb+++ b/modules/auth_plugins/spec/features/auth_provider_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'rendering the login buttons', js: true do+RSpec.describe 'rendering the login buttons', :js dolet(:providers) do[{ name: 'mock_auth' }diff --git a/modules/auth_saml/lib/open_project/auth_saml/engine.rb b/modules/auth_saml/lib/open_project/auth_saml/engine.rbindex 895fb5efbc6..0222a4ab726 100644--- a/modules/auth_saml/lib/open_project/auth_saml/engine.rb+++ b/modules/auth_saml/lib/open_project/auth_saml/engine.rb@@ -34,7 +34,7 @@ module OpenProjectenddef self.settings_from_yaml- if (settings = Rails.root.join('config', 'plugins', 'auth_saml', 'settings.yml')).exist?+ if (settings = Rails.root.join("config/plugins/auth_saml/settings.yml")).exist?Rails.logger.info("[auth_saml] Registering saml integration from settings file")YAML::load(File.open(settings)).symbolize_keysdiff --git a/modules/avatars/app/helpers/avatar_helper.rb b/modules/avatars/app/helpers/avatar_helper.rbindex 75f966bd536..6f0e192c1d5 100644--- a/modules/avatars/app/helpers/avatar_helper.rb+++ b/modules/avatars/app/helpers/avatar_helper.rb@@ -45,8 +45,8 @@ module AvatarHelper# Returns the avatar image tag for the given +user+ if avatars are enabled# +user+ can be a User or a string that will be scanned for an email address (eg. 'joe <[email protected]>')- def avatar(principal, size: 'default', hide_name: true, name_classes: '', **options)- build_principal_avatar_tag principal, size:, hide_name:, name_classes:, **options+ def avatar(principal, size: 'default', hide_name: true, name_classes: '', **)+ build_principal_avatar_tag(principal, size:, hide_name:, name_classes:, **)rescue StandardError => eRails.logger.error "Failed to create avatar for #{principal}: #{e}"''.html_safe@@ -89,8 +89,8 @@ module AvatarHelpergravatar_image_url(mail, opts)end- def build_principal_avatar_tag(user, **options)- tag_options = merge_default_avatar_options(user, **options)+ def build_principal_avatar_tag(user, **)+ tag_options = merge_default_avatar_options(user, **)principal_type = API::V3::Principals::PrincipalType.for(user)principal = {diff --git a/modules/avatars/spec/features/my_avatar_spec.rb b/modules/avatars/spec/features/my_avatar_spec.rbindex d8d204709e2..ebd46183184 100644--- a/modules/avatars/spec/features/my_avatar_spec.rb+++ b/modules/avatars/spec/features/my_avatar_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'-require_relative './shared_avatar_examples'+require_relative 'shared_avatar_examples'-RSpec.describe 'My avatar management', js: true do+RSpec.describe 'My avatar management', :js doinclude Rails.application.routes.url_helperslet(:user) { create(:user) }@@ -26,7 +26,7 @@ RSpec.describe 'My avatar management', js: true doexpect(page).to have_text '[Error 404]'visit my_account_path- expect(page).not_to have_selector '.avatar-menu-item'+ expect(page).to have_no_css '.avatar-menu-item'endendenddiff --git a/modules/avatars/spec/features/shared_avatar_examples.rb b/modules/avatars/spec/features/shared_avatar_examples.rbindex a3aabbb92e5..5fccae30fa8 100644--- a/modules/avatars/spec/features/shared_avatar_examples.rb+++ b/modules/avatars/spec/features/shared_avatar_examples.rb@@ -24,12 +24,12 @@ RSpec.shared_examples 'avatar management' doit 'shows the gravatar avatar' dovisit avatar_management_path- expect(page).to have_selector('.form--fieldset-legend', text: 'GRAVATAR')- expect(page).to have_selector('.avatars--current-gravatar')+ expect(page).to have_css('.form--fieldset-legend', text: 'GRAVATAR')+ expect(page).to have_css('.avatars--current-gravatar')# Local not rendered- expect(page).not_to have_selector('.form--fieldset-legend', text: 'CUSTOM AVATAR')- expect(page).not_to have_selector('.avatars--current-local-avatar', text: 'none')+ expect(page).to have_no_css('.form--fieldset-legend', text: 'CUSTOM AVATAR')+ expect(page).to have_no_css('.avatars--current-local-avatar', text: 'none')endend@@ -38,36 +38,36 @@ RSpec.shared_examples 'avatar management' doit 'can upload a new image' dovisit avatar_management_path- expect(page).to have_selector('.form--fieldset-legend', text: 'CUSTOM AVATAR')- expect(page).to have_selector('.avatars--current-local-avatar', text: 'none')+ expect(page).to have_css('.form--fieldset-legend', text: 'CUSTOM AVATAR')+ expect(page).to have_css('.avatars--current-local-avatar', text: 'none')# Gravatars not rendered- expect(page).not_to have_selector('.form--fieldset-legend', text: 'GRAVATAR')+ expect(page).to have_no_css('.form--fieldset-legend', text: 'GRAVATAR')# Attach a new invalid imagefind_by_id('avatar_file_input').set UploadedFile.load_from(File.join(image_base_path, 'invalid.txt')).path# Expect error- expect(page).to have_selector('.form--label.-error')- expect(page).to have_selector('.avatars--error-pane', text: 'Allowed formats are jpg, png, gif')+ expect(page).to have_css('.form--label.-error')+ expect(page).to have_css('.avatars--error-pane', text: 'Allowed formats are jpg, png, gif')# Attach new imagevisit avatar_management_path- expect(page).to have_selector('.avatars--current-local-avatar', text: 'none')+ expect(page).to have_css('.avatars--current-local-avatar', text: 'none')find_by_id('avatar_file_input').set UploadedFile.load_from(File.join(image_base_path, 'too_big.jpg')).path# Expect not error, since ng-file-upload resizes the image- expect(page).not_to have_selector('.form--label.-error')- expect(page).not_to have_selector('.avatars--error-pane span')+ expect(page).to have_no_css('.form--label.-error')+ expect(page).to have_no_css('.avatars--error-pane span')# Expect preview- expect(page).to have_selector('.preview img')+ expect(page).to have_css('.preview img')# Click buttonclick_on 'Update'# Expect avatar rendered- expect(page).to have_selector('.form--fieldset-legend', text: 'CUSTOM AVATAR')+ expect(page).to have_css('.form--fieldset-legend', text: 'CUSTOM AVATAR')avatar_tag = find('.avatars--current-local-avatar img')expect(avatar_tag[:src]).to include user_avatar_path(target_user)@@ -82,7 +82,7 @@ RSpec.shared_examples 'avatar management' dofind('.avatars--local-avatar-delete-link').clickend- expect(page).to have_selector('.avatars--current-local-avatar', text: 'none', wait: 20)+ expect(page).to have_css('.avatars--current-local-avatar', text: 'none', wait: 20)endend@@ -94,12 +94,12 @@ RSpec.shared_examples 'avatar management' dovisit avatar_management_path# Gravatar- expect(page).to have_selector('.form--fieldset-legend', text: 'GRAVATAR')- expect(page).to have_selector('.avatars--current-gravatar')+ expect(page).to have_css('.form--fieldset-legend', text: 'GRAVATAR')+ expect(page).to have_css('.avatars--current-gravatar')# Local- expect(page).to have_selector('.form--fieldset-legend', text: 'CUSTOM AVATAR')- expect(page).to have_selector('.avatars--current-local-avatar', text: 'none')+ expect(page).to have_css('.form--fieldset-legend', text: 'CUSTOM AVATAR')+ expect(page).to have_css('.avatars--current-local-avatar', text: 'none')endendenddiff --git a/modules/avatars/spec/features/user_avatar_spec.rb b/modules/avatars/spec/features/user_avatar_spec.rbindex fe84abfe520..4f8ba9fbcfb 100644--- a/modules/avatars/spec/features/user_avatar_spec.rb+++ b/modules/avatars/spec/features/user_avatar_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'-require_relative './shared_avatar_examples'+require_relative 'shared_avatar_examples'-RSpec.describe 'User avatar management', js: true do+RSpec.describe 'User avatar management', :js doinclude Rails.application.routes.url_helperslet(:user) { create(:admin) }@@ -48,7 +48,7 @@ RSpec.describe 'User avatar management', js: true doit 'does not render the user edit tab' dovisit edit_user_path(user)- expect(page).not_to have_selector '#tab-avatar'+ expect(page).to have_no_css '#tab-avatar'endendenddiff --git a/modules/avatars/spec/shared_examples.rb b/modules/avatars/spec/shared_examples.rbindex 1f69d9255f3..7b90b310649 100644--- a/modules/avatars/spec/shared_examples.rb+++ b/modules/avatars/spec/shared_examples.rb@@ -89,6 +89,7 @@ RSpec.shared_examples_for "an action requiring admin" doendendend+RSpec.shared_context "there are users with and without avatars" dolet(:base_path) { File.expand_path 'fixtures', __dir__ }let(:user_without_avatar) { create(:user) }@@ -117,6 +118,7 @@ RSpec.shared_context "there are users with and without avatars" dotestfileendend+RSpec.shared_examples_for "an action with an invalid user" doit dodo_action@@ -131,6 +133,7 @@ RSpec.shared_context "an action with stubbed User.find" doallow(User).to receive(:find) { |id, _args| id.to_s == "0" ? nil : user }endend+RSpec.shared_examples_for "an action that deletes the user's avatar" doit doexpect_any_instance_of(Attachment).to receive(:destroy).and_call_originaldiff --git a/modules/backlogs/app/controllers/version_settings_controller.rb b/modules/backlogs/app/controllers/version_settings_controller.rbindex efb43a7656e..57e3a48de61 100644--- a/modules/backlogs/app/controllers/version_settings_controller.rb+++ b/modules/backlogs/app/controllers/version_settings_controller.rb@@ -36,6 +36,6 @@ class VersionSettingsController < RbApplicationControllerdef authorize# Everyone with the right to edit versions has the right to edit version# settings- super 'versions', 'edit'+ super('versions', 'edit')endenddiff --git a/modules/backlogs/app/helpers/rb_common_helper.rb b/modules/backlogs/app/helpers/rb_common_helper.rbindex 41254afc005..45e770190f7 100644--- a/modules/backlogs/app/helpers/rb_common_helper.rb+++ b/modules/backlogs/app/helpers/rb_common_helper.rb@@ -95,7 +95,7 @@ module RbCommonHelperdef background_color_hex(task)background_color = get_backlogs_preference(task.assigned_to, :task_color)- background_color_hex = background_color.sub(/\#/, '0x').hex+ background_color_hex = background_color.sub("#", '0x').hexenddef id_or_empty(item)diff --git a/modules/backlogs/app/models/burndown.rb b/modules/backlogs/app/models/burndown.rbindex b0e393c93b9..e33b7af1c7e 100644--- a/modules/backlogs/app/models/burndown.rb+++ b/modules/backlogs/app/models/burndown.rb@@ -86,7 +86,7 @@ class Burndown@available_series ||= {}s = OpenProject::Backlogs::Burndown::Series.new(data, name, units)@available_series[name] = s- instance_variable_set("@#{name}", s)+ instance_variable_set(:"@#{name}", s)enddef determine_maxdiff --git a/modules/backlogs/db/migrate/20180323151208_to_v710_aggregated_backlogs_migrations.rb b/modules/backlogs/db/migrate/20180323151208_to_v710_aggregated_backlogs_migrations.rbindex c8a735b3b16..6da8c2cfc3d 100644--- a/modules/backlogs/db/migrate/20180323151208_to_v710_aggregated_backlogs_migrations.rb+++ b/modules/backlogs/db/migrate/20180323151208_to_v710_aggregated_backlogs_migrations.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require Rails.root.join("db", "migrate", "migration_utils", "migration_squasher").to_s+require Rails.root.join("db/migrate/migration_utils/migration_squasher").to_s# This migration aggregates the migrations detailed in MIGRATION_FILESclass ToV710AggregatedBacklogsMigrations < ActiveRecord::Migration[5.1]MIGRATION_FILES = <<-MIGRATIONSdiff --git a/modules/backlogs/lib/open_project/backlogs/burndown/series_raw_data.rb b/modules/backlogs/lib/open_project/backlogs/burndown/series_raw_data.rbindex 7f9ff584952..53139ab9b87 100644--- a/modules/backlogs/lib/open_project/backlogs/burndown/series_raw_data.rb+++ b/modules/backlogs/lib/open_project/backlogs/burndown/series_raw_data.rb@@ -42,7 +42,7 @@ module OpenProject::Backlogs::Burndownenddef unit_for(name)- return :points if @collect[:points].include? name+ :points if @collect[:points].include? nameenddef collect_data@@ -50,7 +50,7 @@ module OpenProject::Backlogs::Burndowndata_for_dates(collected_days).each do |day_data|date = day_data['date']- date = date.is_a?(Date) ? date : Date.parse(date)+ date = Date.parse(date) unless date.is_a?(Date)day_data.each do |key, value|next if key == 'date'diff --git a/modules/backlogs/lib/open_project/backlogs/patches/project_seeder_patch.rb b/modules/backlogs/lib/open_project/backlogs/patches/project_seeder_patch.rbindex 7b733df1aa6..34a33c6dc2d 100644--- a/modules/backlogs/lib/open_project/backlogs/patches/project_seeder_patch.rb+++ b/modules/backlogs/lib/open_project/backlogs/patches/project_seeder_patch.rb@@ -40,7 +40,6 @@ module OpenProject::Backlogs::Patches::ProjectSeederPatchversions = version_data.filter_map { |data| Version.find_by(name: data['name']) }-versions.each do |version|display = version_settings_display_map[version.name] || VersionSetting::DISPLAY_NONEdiff --git a/modules/backlogs/spec/contracts/work_packages/base_contract_spec.rb b/modules/backlogs/spec/contracts/work_packages/base_contract_spec.rbindex 0e06ab2b58e..2e0b6ba5218 100644--- a/modules/backlogs/spec/contracts/work_packages/base_contract_spec.rb+++ b/modules/backlogs/spec/contracts/work_packages/base_contract_spec.rb@@ -177,7 +177,7 @@ RSpec.describe WorkPackages::BaseContract, type: :model doit 'is invalid and notes the error' doexpect(subject).to be_falseyexpect(instance.errors.symbols_for(:version_id))- .to match_array([:task_version_must_be_the_same_as_story_version])+ .to contain_exactly(:task_version_must_be_the_same_as_story_version)endenddiff --git a/modules/backlogs/spec/controllers/versions_controller_spec.rb b/modules/backlogs/spec/controllers/versions_controller_spec.rbindex 41783f5380f..d3b21652a47 100644--- a/modules/backlogs/spec/controllers/versions_controller_spec.rb+++ b/modules/backlogs/spec/controllers/versions_controller_spec.rb@@ -57,9 +57,6 @@ RSpec.describe VersionsController do@params = {}@params[:id] = version.id@params[:version] = { name: @newVersionName }- end-- before dologin_as current_userenddiff --git a/modules/backlogs/spec/factories/impediment_factory.rb b/modules/backlogs/spec/factories/impediment_factory.rbindex b44a1704589..56bdcd3d7fc 100644--- a/modules/backlogs/spec/factories/impediment_factory.rb+++ b/modules/backlogs/spec/factories/impediment_factory.rb@@ -31,7 +31,7 @@ FactoryBot.define doassociation :type, factory: :type_tasksubject { 'Impeding progress' }description { 'Unable to print recipes' }- association :priority, factory: :priority+ association :priorityassociation :author, factory: :userendenddiff --git a/modules/backlogs/spec/factories/task_factory.rb b/modules/backlogs/spec/factories/task_factory.rbindex c119474e80c..99056543ee5 100644--- a/modules/backlogs/spec/factories/task_factory.rb+++ b/modules/backlogs/spec/factories/task_factory.rb@@ -31,7 +31,7 @@ FactoryBot.define doassociation :type, factory: :type_tasksubject { 'Printing Recipes' }description { 'Just printing recipes' }- association :priority, factory: :priority+ association :priorityassociation :author, factory: :userendenddiff --git a/modules/backlogs/spec/features/backlogs/create_story_spec.rb b/modules/backlogs/spec/features/backlogs/create_story_spec.rbindex 239f8a46eaf..0449829b25e 100644--- a/modules/backlogs/spec/features/backlogs/create_story_spec.rb+++ b/modules/backlogs/spec/features/backlogs/create_story_spec.rb@@ -112,7 +112,7 @@ RSpec.describe 'Backlogs', :js, :with_cuprite do# inactive types should not be selectable# but the user can choose from the active typesexpect(page)- .not_to have_css('option', text: inactive_story_type.name)+ .to have_no_css('option', text: inactive_story_type.name)select story_type2.name, from: 'type'@@ -133,7 +133,7 @@ RSpec.describe 'Backlogs', :js, :with_cuprite dopage.driver.refreshexpect(page)- .not_to have_content 'Another story'+ .to have_no_content 'Another story'expect(page).to have_css '.story:nth-of-type(1)', text: 'The new story'diff --git a/modules/backlogs/spec/features/backlogs_in_backlog_view_spec.rb b/modules/backlogs/spec/features/backlogs_in_backlog_view_spec.rbindex f54523e18eb..bca7a75a26a 100644--- a/modules/backlogs/spec/features/backlogs_in_backlog_view_spec.rb+++ b/modules/backlogs/spec/features/backlogs_in_backlog_view_spec.rb@@ -29,8 +29,7 @@require 'spec_helper'require_relative '../support/pages/backlogs'-RSpec.describe 'Backlogs in backlog view',- js: true,+RSpec.describe 'Backlogs in backlog view', :js,with_cuprite: false dolet!(:project) docreate(:project,@@ -234,7 +233,7 @@ RSpec.describe 'Backlogs in backlog view',# the disabled backlog/sprint is no longer visibleexpect(page)- .not_to have_content(backlog.name)+ .to have_no_content(backlog.name)# The others are unchangedbacklogs_page@@ -256,13 +255,13 @@ RSpec.describe 'Backlogs in backlog view',# the disabled backlog/sprint is no longer visibleexpect(page)- .not_to have_content(other_project_sprint.name)+ .to have_no_content(other_project_sprint.name)# The others are unchangedbacklogs_page.expect_backlog(sprint)expect(page)- .not_to have_content(backlog.name)+ .to have_no_content(backlog.name)endenddiff --git a/modules/backlogs/spec/features/empty_backlogs_spec.rb b/modules/backlogs/spec/features/empty_backlogs_spec.rbindex f7b0960aa89..ec3124e0af8 100644--- a/modules/backlogs/spec/features/empty_backlogs_spec.rb+++ b/modules/backlogs/spec/features/empty_backlogs_spec.rb@@ -63,7 +63,7 @@ RSpec.describe 'Empty backlogs project',it 'only shows a no results box' doexpect(page).to have_css('.generic-table--no-results-container', text: I18n.t(:backlogs_empty_title))- expect(page).not_to have_css('.generic-table--no-results-description')+ expect(page).to have_no_css('.generic-table--no-results-description')endendenddiff --git a/modules/backlogs/spec/features/impediments_spec.rb b/modules/backlogs/spec/features/impediments_spec.rbindex d698a644b41..b39a86c14d6 100644--- a/modules/backlogs/spec/features/impediments_spec.rb+++ b/modules/backlogs/spec/features/impediments_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Impediments on taskboard',- js: true,+RSpec.describe 'Impediments on taskboard', :js,with_cuprite: false dolet!(:project) docreate(:project,@@ -121,9 +120,9 @@ RSpec.describe 'Impediments on taskboard',# Saves successfullyexpect(page)- .to have_selector('div.impediment', text: 'New impediment')+ .to have_css('div.impediment', text: 'New impediment')expect(page)- .not_to have_selector('div.impediment.error', text: 'New impediment')+ .to have_no_css('div.impediment.error', text: 'New impediment')# Attempt to create a new impediment with the id of a story from another sprintfind('#impediments .add_new').click@@ -134,12 +133,12 @@ RSpec.describe 'Impediments on taskboard',# Saves unsuccessfullyexpect(page)- .to have_selector('div.impediment', text: 'Other sprint impediment')+ .to have_css('div.impediment', text: 'Other sprint impediment')expect(page)- .to have_selector('div.impediment.error', text: 'Other sprint impediment')+ .to have_css('div.impediment.error', text: 'Other sprint impediment')expect(page)- .to have_selector('#msgBox',- text: "IDs of blocked work packages can only contain IDs of work packages in the current sprint.")+ .to have_css('#msgBox',+ text: "IDs of blocked work packages can only contain IDs of work packages in the current sprint.")click_on 'OK'@@ -152,12 +151,12 @@ RSpec.describe 'Impediments on taskboard',# Saves unsuccessfullyexpect(page)- .to have_selector('div.impediment', text: 'Invalid id impediment')+ .to have_css('div.impediment', text: 'Invalid id impediment')expect(page)- .to have_selector('div.impediment.error', text: 'Invalid id impediment')+ .to have_css('div.impediment.error', text: 'Invalid id impediment')expect(page)- .to have_selector('#msgBox',- text: "IDs of blocked work packages can only contain IDs of work packages in the current sprint.")+ .to have_css('#msgBox',+ text: "IDs of blocked work packages can only contain IDs of work packages in the current sprint.")click_on 'OK'# Attempt to create a new impediment without specifying the blocked story/task@@ -168,11 +167,11 @@ RSpec.describe 'Impediments on taskboard',# Saves unsuccessfullyexpect(page)- .to have_selector('div.impediment', text: 'Unblocking impediment')+ .to have_css('div.impediment', text: 'Unblocking impediment')expect(page)- .to have_selector('div.impediment.error', text: 'Unblocking impediment')+ .to have_css('div.impediment.error', text: 'Unblocking impediment')expect(page)- .to have_selector('#msgBox', text: "IDs of blocked work packages must contain the ID of at least one ticket")+ .to have_css('#msgBox', text: "IDs of blocked work packages must contain the ID of at least one ticket")click_on 'OK'# Updating an impediment@@ -184,8 +183,8 @@ RSpec.describe 'Impediments on taskboard',# Saves successfullyexpect(page)- .to have_selector('div.impediment', text: 'Updated impediment')+ .to have_css('div.impediment', text: 'Updated impediment')expect(page)- .not_to have_selector('div.impediment.error', text: 'Updated impediment')+ .to have_no_css('div.impediment.error', text: 'Updated impediment')endenddiff --git a/modules/backlogs/spec/features/stories_in_backlog_spec.rb b/modules/backlogs/spec/features/stories_in_backlog_spec.rbindex 64953a04089..8cc3d8f1b05 100644--- a/modules/backlogs/spec/features/stories_in_backlog_spec.rb+++ b/modules/backlogs/spec/features/stories_in_backlog_spec.rb@@ -29,8 +29,7 @@require 'spec_helper'require_relative '../support/pages/backlogs'-RSpec.describe 'Stories in backlog',- js: true,+RSpec.describe 'Stories in backlog', :js,with_cuprite: false dolet!(:project) docreate(:project,@@ -191,7 +190,7 @@ RSpec.describe 'Stories in backlog',# All positions will be unique in the sprintexpect(Story.where(version: sprint, type: story, project:).pluck(:position))- .to match_array([1, 2, 3])+ .to contain_exactly(1, 2, 3)backlogs_page.expect_stories_in_order(sprint, new_story, sprint_story1, sprint_story2)@@ -229,7 +228,7 @@ RSpec.describe 'Stories in backlog',.expect_stories_in_order(sprint, sprint_story1, new_story, sprint_story2)expect(Story.where(version: sprint, type: story, project:).pluck(:position))- .to match_array([1, 2, 3])+ .to contain_exactly(1, 2, 3)# Moving a story to bottombacklogs_page@@ -241,7 +240,7 @@ RSpec.describe 'Stories in backlog',.expect_stories_in_order(sprint, new_story, sprint_story2, sprint_story1)expect(Story.where(version: sprint, type: story, project:).pluck(:position))- .to match_array([1, 2, 3])+ .to contain_exactly(1, 2, 3)# Moving a story to from the backlog to the sprint (3rd position)@@ -255,7 +254,7 @@ RSpec.describe 'Stories in backlog',.expect_stories_in_order(sprint, new_story, sprint_story2, backlog_story1, sprint_story1)expect(Story.where(version: sprint, type: story, project:).pluck(:position))- .to match_array([1, 2, 3, 4])+ .to contain_exactly(1, 2, 3, 4)# Available statuses when editingdiff --git a/modules/backlogs/spec/features/tasks_on_taskboard_spec.rb b/modules/backlogs/spec/features/tasks_on_taskboard_spec.rbindex ee9d1f843c2..3965468c0f5 100644--- a/modules/backlogs/spec/features/tasks_on_taskboard_spec.rb+++ b/modules/backlogs/spec/features/tasks_on_taskboard_spec.rb@@ -29,8 +29,7 @@require 'spec_helper'require_relative '../support/pages/taskboard'-RSpec.describe 'Tasks on taskboard',- js: true,+RSpec.describe 'Tasks on taskboard', :js,with_cuprite: false dolet!(:project) docreate(:project,@@ -235,8 +234,8 @@ RSpec.describe 'Tasks on taskboard',# There is a button to the burndown chartexpect(page)- .to have_selector("a[href='#{backlogs_project_sprint_burndown_chart_path(project, sprint)}']",- text: 'Burndown Chart')+ .to have_css("a[href='#{backlogs_project_sprint_burndown_chart_path(project, sprint)}']",+ text: 'Burndown Chart')# Tasks can get a color per assigned uservisit my_settings_pathdiff --git a/modules/backlogs/spec/features/work_packages/filter_spec.rb b/modules/backlogs/spec/features/work_packages/filter_spec.rbindex 062380cff03..364659094f9 100644--- a/modules/backlogs/spec/features/work_packages/filter_spec.rb+++ b/modules/backlogs/spec/features/work_packages/filter_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Filter by backlog type', js: true do+RSpec.describe 'Filter by backlog type', :js dolet(:story_type) dotype = create(:type_feature)project.types << typediff --git a/modules/backlogs/spec/models/sprint_spec.rb b/modules/backlogs/spec/models/sprint_spec.rbindex bc9626979a0..438ef995829 100644--- a/modules/backlogs/spec/models/sprint_spec.rb+++ b/modules/backlogs/spec/models/sprint_spec.rb@@ -43,7 +43,7 @@ RSpec.describe Sprint doendit {- expect(Sprint.displayed_left(project)).to match_array [sprint]+ expect(Sprint.displayed_left(project)).to contain_exactly(sprint)}end@@ -58,7 +58,7 @@ RSpec.describe Sprint dosprint.saveend- it { expect(Sprint.displayed_left(project)).to match_array [sprint] }+ it { expect(Sprint.displayed_left(project)).to contain_exactly(sprint) }enddescribe 'WITH no version setting defined' do@@ -67,7 +67,7 @@ RSpec.describe Sprint dosprint.save!end- it { expect(Sprint.displayed_left(project)).to match_array [sprint] }+ it { expect(Sprint.displayed_left(project)).to contain_exactly(sprint) }endcontext 'WITH a shared version from another project' do@@ -93,7 +93,7 @@ RSpec.describe Sprint dodescribe 'WITH no version settings' doit "includes the shared version by default" do- expect(displayed).to match_array [version]+ expect(displayed).to contain_exactly(version)endend@@ -103,7 +103,7 @@ RSpec.describe Sprint doendit "includes the shared version" do- expect(displayed).to match_array [version]+ expect(displayed).to contain_exactly(version)endend@@ -113,7 +113,7 @@ RSpec.describe Sprint doendit "includes the shared version" do- expect(displayed).to match_array []+ expect(displayed).to be_emptyendend@@ -123,7 +123,7 @@ RSpec.describe Sprint doendit "includes the shared version" do- expect(displayed).to match_array [version]+ expect(displayed).to contain_exactly(version)endend@@ -133,7 +133,7 @@ RSpec.describe Sprint doendit "does not include the shared version" do- expect(displayed).to match_array []+ expect(displayed).to be_emptyendend@@ -144,7 +144,7 @@ RSpec.describe Sprint doendit "includes the shared version" do- expect(displayed).to match_array [version]+ expect(displayed).to contain_exactly(version)endend@@ -155,7 +155,7 @@ RSpec.describe Sprint doendit "does not include the shared version" do- expect(displayed).to match_array []+ expect(displayed).to be_emptyendend@@ -166,7 +166,7 @@ RSpec.describe Sprint doendit "includes the shared version" do- expect(displayed).to match_array [version]+ expect(displayed).to contain_exactly(version)endend@@ -177,7 +177,7 @@ RSpec.describe Sprint doendit "does not include the shared version" do- expect(displayed).to match_array []+ expect(displayed).to be_emptyendendend@@ -190,7 +190,7 @@ RSpec.describe Sprint dosprint.save!end- it { expect(Sprint.displayed_right(project)).to match_array [sprint] }+ it { expect(Sprint.displayed_right(project)).to contain_exactly(sprint) }enddescribe '#order_by_date' dodiff --git a/modules/backlogs/spec/models/story_spec.rb b/modules/backlogs/spec/models/story_spec.rbindex a3dc518d572..9dfdcf89202 100644--- a/modules/backlogs/spec/models/story_spec.rb+++ b/modules/backlogs/spec/models/story_spec.rb@@ -89,7 +89,7 @@ RSpec.describe Story dostory1end- it { expect(Story.backlogs(project, [version.id])[version.id]).to match_array([story1]) }+ it { expect(Story.backlogs(project, [version.id])[version.id]).to contain_exactly(story1) }enddescribe "WITH two sprints@@ -103,8 +103,8 @@ RSpec.describe Story dostory2.save!end- it { expect(Story.backlogs(project, [version.id, version2.id])[version.id]).to match_array([story1]) }- it { expect(Story.backlogs(project, [version.id, version2.id])[version2.id]).to match_array([story2]) }+ it { expect(Story.backlogs(project, [version.id, version2.id])[version.id]).to contain_exactly(story1) }+ it { expect(Story.backlogs(project, [version.id, version2.id])[version2.id]).to contain_exactly(story2) }enddescribe "WITH two sprints@@ -119,7 +119,7 @@ RSpec.describe Story dostory2.save!end- it { expect(Story.backlogs(project, [version.id])[version.id]).to match_array([story1]) }+ it { expect(Story.backlogs(project, [version.id])[version.id]).to contain_exactly(story1) }it { expect(Story.backlogs(project, [version.id])[version2.id]).to be_empty }end@@ -141,7 +141,7 @@ RSpec.describe Story dostory2.save!end- it { expect(Story.backlogs(project, [version.id, version2.id])[version.id]).to match_array([story1]) }+ it { expect(Story.backlogs(project, [version.id, version2.id])[version.id]).to contain_exactly(story1) }it { expect(Story.backlogs(project, [version.id, version2.id])[version2.id]).to be_empty }end@@ -158,7 +158,7 @@ RSpec.describe Story dostory2.save!end- it { expect(Story.backlogs(project, [version.id])[version.id]).to match_array([story1]) }+ it { expect(Story.backlogs(project, [version.id])[version.id]).to contain_exactly(story1) }enddescribe "WITH one sprint@@ -170,7 +170,7 @@ RSpec.describe Story dostory1.saveend- it { expect(Story.backlogs(project, [version.id])[version.id]).to match_array([story1, story2]) }+ it { expect(Story.backlogs(project, [version.id])[version.id]).to contain_exactly(story1, story2) }enddescribe "WITH one sprint@@ -182,7 +182,7 @@ RSpec.describe Story dotask.saveend- it { expect(Story.backlogs(project, [version.id])[version.id]).to match_array([story1]) }+ it { expect(Story.backlogs(project, [version.id])[version.id]).to contain_exactly(story1) }enddescribe "WITH one sprint@@ -193,7 +193,7 @@ RSpec.describe Story dostory1end- it { expect(Story.backlogs(project, [version.id])[version.id]).to match_array([story1]) }+ it { expect(Story.backlogs(project, [version.id])[version.id]).to contain_exactly(story1) }endendenddiff --git a/modules/backlogs/spec/models/work_package_spec.rb b/modules/backlogs/spec/models/work_package_spec.rbindex 0d1949a0b47..948bf9b8e25 100644--- a/modules/backlogs/spec/models/work_package_spec.rb+++ b/modules/backlogs/spec/models/work_package_spec.rb@@ -33,7 +33,7 @@ RSpec.describe WorkPackage doit 'returns all the ids of types that are configures to be considered backlogs types' doallow(Setting).to receive(:plugin_openproject_backlogs).and_return({ 'story_types' => [1], 'task_type' => 2 })- expect(described_class.backlogs_types).to match_array([1, 2])+ expect(described_class.backlogs_types).to contain_exactly(1, 2)endit 'returns an empty array if nothing is defined' do@@ -44,10 +44,10 @@ RSpec.describe WorkPackage doit 'reflects changes to the configuration' doallow(Setting).to receive(:plugin_openproject_backlogs).and_return({ 'story_types' => [1], 'task_type' => 2 })- expect(described_class.backlogs_types).to match_array([1, 2])+ expect(described_class.backlogs_types).to contain_exactly(1, 2)allow(Setting).to receive(:plugin_openproject_backlogs).and_return({ 'story_types' => [3], 'task_type' => 4 })- expect(described_class.backlogs_types).to match_array([3, 4])+ expect(described_class.backlogs_types).to contain_exactly(3, 4)endenddiff --git a/modules/backlogs/spec/support/pages/backlogs.rb b/modules/backlogs/spec/support/pages/backlogs.rbindex 8ba79b0f24b..68e1d8e9e7c 100644--- a/modules/backlogs/spec/support/pages/backlogs.rb+++ b/modules/backlogs/spec/support/pages/backlogs.rb@@ -96,7 +96,7 @@ module Pagesfind('input[name=subject]').native.send_key :returnexpect(page)- .not_to have_selector('input[name=subject]')+ .to have_no_css('input[name=subject]')endif story@@ -111,7 +111,7 @@ module Pagesfind('input[name=name]').native.send_key :returnexpect(page)- .to have_selector('.start_date.editable')+ .to have_css('.start_date.editable')endend@@ -161,12 +161,12 @@ module Pagesdef expect_sprint(sprint)expect(page)- .to have_selector("#sprint_backlogs_container #{backlog_selector(sprint)}")+ .to have_css("#sprint_backlogs_container #{backlog_selector(sprint)}")enddef expect_backlog(sprint)expect(page)- .to have_selector("#owner_backlogs_container #{backlog_selector(sprint)}")+ .to have_css("#owner_backlogs_container #{backlog_selector(sprint)}")enddef expect_story_in_sprint(story, sprint)@@ -179,7 +179,7 @@ module Pagesdef expect_story_not_in_sprint(story, sprint)within_backlog(sprint) doexpect(page)- .not_to have_selector(story_selector(story).to_s)+ .to have_no_selector(story_selector(story).to_s)endend@@ -189,13 +189,13 @@ module Pagescase keywhen :subjectexpect(page)- .to have_selector('div.subject', text: value)+ .to have_css('div.subject', text: value)when :statusexpect(page)- .to have_selector('div.status_id', text: value)+ .to have_css('div.status_id', text: value)when :typeexpect(page)- .to have_selector('div.type_id', text: value)+ .to have_css('div.type_id', text: value)elseraise NotImplementedErrorend@@ -239,7 +239,7 @@ module Pagesfind('.header .menu-trigger').clickexpect(page)- .to have_selector('.header .backlog-menu .item', text: item_name)+ .to have_css('.header .backlog-menu .item', text: item_name)# Close it again for next testfind('.header .menu-trigger').clickdiff --git a/modules/backlogs/spec/support/pages/taskboard.rb b/modules/backlogs/spec/support/pages/taskboard.rbindex f1a9ddffee5..6c23d3b4896 100644--- a/modules/backlogs/spec/support/pages/taskboard.rb+++ b/modules/backlogs/spec/support/pages/taskboard.rb@@ -45,13 +45,13 @@ module Pagesdef expect_task(task)expect(page)- .to have_selector("#work_package_#{task.id}")+ .to have_css("#work_package_#{task.id}")enddef expect_task_in_story_column(task, story, column)within ".story_#{story.id} td:nth-of-type(#{column + 2})" doexpect(page)- .to have_selector("#work_package_#{task.id}")+ .to have_css("#work_package_#{task.id}")endend@@ -62,7 +62,7 @@ module Pagesdef expect_color_for_task(hex_color, task)expect(page)- .to have_selector("#work_package_#{task.id}[style='background-color:#{hex_color};']")+ .to have_css("#work_package_#{task.id}[style='background-color:#{hex_color};']")enddef add_task(story, attributes)@@ -70,8 +70,8 @@ module Pageschange_attributes_in_modal(attributes)- expect(page).not_to have_selector('.ui-dialog')- expect(page).not_to have_selector('#work_package_')+ expect(page).to have_no_css('.ui-dialog')+ expect(page).to have_no_css('#work_package_')enddef update_task(task, attributes)@@ -79,7 +79,7 @@ module Pageschange_attributes_in_modal(attributes)- expect(page).not_to have_selector('.ui-dialog')+ expect(page).to have_no_css('.ui-dialog')sleep(0.5)enddiff --git a/modules/backlogs/spec/views/rb_taskboards/show_spec.rb b/modules/backlogs/spec/views/rb_taskboards/show_spec.rbindex 94473509a94..434f3f11ef4 100644--- a/modules/backlogs/spec/views/rb_taskboards/show_spec.rb+++ b/modules/backlogs/spec/views/rb_taskboards/show_spec.rb@@ -104,7 +104,7 @@ RSpec.describe 'rb_taskboards/show' dorenderstories.each do |story|- expect(rendered).to have_selector("#story_#{story.id} .id", text: story.id.to_s)+ expect(rendered).to have_css("#story_#{story.id} .id", text: story.id.to_s)endend@@ -112,7 +112,7 @@ RSpec.describe 'rb_taskboards/show' dorenderstories.each do |story|- expect(rendered).to have_selector("#story_#{story.id} .subject", text: story.subject)+ expect(rendered).to have_css("#story_#{story.id} .subject", text: story.subject)endend@@ -120,7 +120,7 @@ RSpec.describe 'rb_taskboards/show' dorenderstories.each do |story|- expect(rendered).to have_selector("#story_#{story.id} .status", text: story.status.name)+ expect(rendered).to have_css("#story_#{story.id} .status", text: story.status.name)endend@@ -132,7 +132,7 @@ RSpec.describe 'rb_taskboards/show' dostories.each do |story|expected_text = story.assigned_to ? story.assigned_to.name : 'Unassigned'- expect(rendered).to have_selector("#story_#{story.id} .assigned_to_id", text: expected_text)+ expect(rendered).to have_css("#story_#{story.id} .assigned_to_id", text: expected_text)endendend@@ -160,7 +160,7 @@ RSpec.describe 'rb_taskboards/show' dostories.each do |story|assert_select "tr.story_#{story.id} td.add_new" do |td|expect(td.count).to eq 1- expect(td.first).not_to have_content '+'+ expect(td.first).to have_no_content '+'expect(td.first[:class]).not_to include 'clickable'endend@@ -188,7 +188,7 @@ RSpec.describe 'rb_taskboards/show' dostories.each do |_story|assert_select '#impediments td.add_new' do |td|expect(td.count).to eq 1- expect(td.first).not_to have_content '+'+ expect(td.first).to have_no_content '+'expect(td.first[:class]).not_to include 'clickable'endend@@ -204,7 +204,7 @@ RSpec.describe 'rb_taskboards/show' doassert_select '.model.work_package.task' do |task|expect(task.count).to eq 1- expect(task.first).not_to have_css '.task.prevent_edit'+ expect(task.first).to have_no_css '.task.prevent_edit'endend@@ -230,7 +230,7 @@ RSpec.describe 'rb_taskboards/show' doassert_select '.model.work_package.impediment' do |impediment|expect(impediment.count).to eq 3 # 2 additional for the task and the invisible form- expect(impediment.first).not_to have_css '.impediment.prevent_edit'+ expect(impediment.first).to have_no_css '.impediment.prevent_edit'endenddiff --git a/modules/bim/app/models/bim/ifc_models/ifc_model.rb b/modules/bim/app/models/bim/ifc_models/ifc_model.rbindex c72073e8c27..6669205c231 100644--- a/modules/bim/app/models/bim/ifc_models/ifc_model.rb+++ b/modules/bim/app/models/bim/ifc_models/ifc_model.rb@@ -21,11 +21,11 @@ module Bimscope :defaults, -> { where(is_default: true) }%i(ifc xkt).each do |name|- define_method "#{name}_attachment" do+ define_method :"#{name}_attachment" doget_attached_type(name)end- define_method "#{name}_attachment=" do |file|+ define_method :"#{name}_attachment=" do |file|if name == :ifc# Also delete xktdelete_attachment :xktdiff --git a/modules/bim/app/services/bim/bcf/comments/create_service.rb b/modules/bim/app/services/bim/bcf/comments/create_service.rbindex 9cfdc293081..b0937bb38ff 100644--- a/modules/bim/app/services/bim/bcf/comments/create_service.rb+++ b/modules/bim/app/services/bim/bcf/comments/create_service.rb@@ -39,7 +39,7 @@ module Bim::Bcfinput = { journal: journal_call.result }.merge(params).slice(*::Bim::Bcf::Comment::CREATE_ATTRIBUTES)- super input, service_result+ super(input, service_result)enddef create_journal(work_package, comment)diff --git a/modules/bim/app/services/bim/bcf/comments/update_service.rb b/modules/bim/app/services/bim/bcf/comments/update_service.rbindex d9f9157d84d..89247ca2eff 100644--- a/modules/bim/app/services/bim/bcf/comments/update_service.rb+++ b/modules/bim/app/services/bim/bcf/comments/update_service.rb@@ -35,7 +35,7 @@ module Bim::Bcfjournal_call = update_journal(params[:original_comment].journal, params[:comment])return journal_call if journal_call.failure?- super params.slice(*::Bim::Bcf::Comment::UPDATE_ATTRIBUTES), service_result+ super(params.slice(*::Bim::Bcf::Comment::UPDATE_ATTRIBUTES), service_result)enddef update_journal(journal, comment)diff --git a/modules/bim/app/services/bim/bcf/issues/create_service.rb b/modules/bim/app/services/bim/bcf/issues/create_service.rbindex ca3d5dd99d2..160c3a35757 100644--- a/modules/bim/app/services/bim/bcf/issues/create_service.rb+++ b/modules/bim/app/services/bim/bcf/issues/create_service.rb@@ -35,7 +35,7 @@ module Bim::Bcfwp_call = get_work_package paramsreturn wp_call if wp_call.failure?- super issue_params(work_package: wp_call.result, params:), service_result+ super(issue_params(work_package: wp_call.result, params:), service_result)enddef issue_params(work_package:, params:)diff --git a/modules/bim/app/services/bim/ifc_models/create_service.rb b/modules/bim/app/services/bim/ifc_models/create_service.rbindex 79380cec8c5..7e8ae367447 100644--- a/modules/bim/app/services/bim/ifc_models/create_service.rb+++ b/modules/bim/app/services/bim/ifc_models/create_service.rb@@ -24,7 +24,7 @@# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.## See COPYRIGHT and LICENSE files for more details.-#++# +module Bimmodule IfcModelsdiff --git a/modules/bim/app/services/bim/ifc_models/update_service.rb b/modules/bim/app/services/bim/ifc_models/update_service.rbindex eae54743d67..151c0b84eeb 100644--- a/modules/bim/app/services/bim/ifc_models/update_service.rb+++ b/modules/bim/app/services/bim/ifc_models/update_service.rb@@ -24,7 +24,7 @@# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.## See COPYRIGHT and LICENSE files for more details.-#++# +module Bimmodule IfcModelsdiff --git a/modules/bim/app/services/bim/ifc_models/view_converter_service.rb b/modules/bim/app/services/bim/ifc_models/view_converter_service.rbindex 617712dfb29..a632ac0ce09 100644--- a/modules/bim/app/services/bim/ifc_models/view_converter_service.rb+++ b/modules/bim/app/services/bim/ifc_models/view_converter_service.rb@@ -24,7 +24,7 @@# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.## See COPYRIGHT and LICENSE files for more details.-#++# +require 'open3'module Bimdiff --git a/modules/bim/db/migrate/20201105154216_seed_custom_style_with_bim_theme.rb b/modules/bim/db/migrate/20201105154216_seed_custom_style_with_bim_theme.rbindex b930be48d7e..a116bee6acb 100644--- a/modules/bim/db/migrate/20201105154216_seed_custom_style_with_bim_theme.rb+++ b/modules/bim/db/migrate/20201105154216_seed_custom_style_with_bim_theme.rb@@ -72,7 +72,7 @@ class SeedCustomStyleWithBimTheme < ActiveRecord::Migration[6.0]enddef set_custom_style- custom_style = (CustomStyle.current || CustomStyle.create!)+ custom_style = CustomStyle.current || CustomStyle.create!custom_style.attributes = { theme: theme[:theme], theme_logo: theme[:logo] }custom_style.save!custom_stylediff --git a/modules/bim/lib/open_project/bim/bcf_json/viewpoint_reader.rb b/modules/bim/lib/open_project/bim/bcf_json/viewpoint_reader.rbindex dd764808163..36e7240f16f 100644--- a/modules/bim/lib/open_project/bim/bcf_json/viewpoint_reader.rb+++ b/modules/bim/lib/open_project/bim/bcf_json/viewpoint_reader.rb@@ -5,7 +5,7 @@ require 'bigdecimal'module OpenProject::Bimmodule BcfJsonclass ViewpointReader- ROOT_NODE ||= 'VisualizationInfo'.freeze+ ROOT_NODE ||= 'VisualizationInfo'attr_reader :uuid, :xmldiff --git a/modules/bim/lib/open_project/bim/bcf_xml.rb b/modules/bim/lib/open_project/bim/bcf_xml.rbindex e482478d12d..2819f10f9fa 100644--- a/modules/bim/lib/open_project/bim/bcf_xml.rb+++ b/modules/bim/lib/open_project/bim/bcf_xml.rb@@ -1,5 +1,5 @@module OpenProject::Bimmodule Bcf- require_relative './bcf_xml/importer'+ require_relative 'bcf_xml/importer'endenddiff --git a/modules/bim/lib/open_project/bim/bcf_xml/issue_writer.rb b/modules/bim/lib/open_project/bim/bcf_xml/issue_writer.rbindex 1e6dd688960..f29441b67cc 100644--- a/modules/bim/lib/open_project/bim/bcf_xml/issue_writer.rb+++ b/modules/bim/lib/open_project/bim/bcf_xml/issue_writer.rb@@ -101,7 +101,7 @@ module OpenProject::Bim::BcfXml.select(&:element?).group_by(&:name)- sequence.reverse.each do |name|+ sequence.reverse_each do |name|if children_with_name = children_by_name[name]children_with_name.each do |child|parent_node.delete childdiff --git a/modules/bim/lib/open_project/bim/bcf_xml/viewpoint_writer.rb b/modules/bim/lib/open_project/bim/bcf_xml/viewpoint_writer.rbindex ee245d179ca..5b7c4abc963 100644--- a/modules/bim/lib/open_project/bim/bcf_xml/viewpoint_writer.rb+++ b/modules/bim/lib/open_project/bim/bcf_xml/viewpoint_writer.rb@@ -42,8 +42,8 @@ module OpenProject::Bim::BcfXml{ Guid: viewpoint.uuid }end- def dig_json(*args)- viewpoint.json_viewpoint.dig(*args)+ def dig_json(*)+ viewpoint.json_viewpoint.dig(*)enddef components(xml)@@ -165,7 +165,7 @@ module OpenProject::Bim::BcfXmlhash.transform_keys do |key|# `camelize` uses the inflections of ActiveSupport. There we defined inflections for `IFC`. However, here we# don't want that applied here. `ifc_foo` shall be converted to `IfcFoo` and not to `IFCFoo`.- key.camelize.gsub(/IFC/, 'Ifc')+ key.camelize.gsub("IFC", 'Ifc')endenddiff --git a/modules/bim/lib/open_project/bim/hooks.rb b/modules/bim/lib/open_project/bim/hooks.rbindex e57664b48a6..5f01bbb2247 100644--- a/modules/bim/lib/open_project/bim/hooks.rb+++ b/modules/bim/lib/open_project/bim/hooks.rb@@ -24,7 +24,7 @@# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.## See COPYRIGHT and LICENSE files for more details.-#++# +module OpenProject::Bim::Hooksclass Hook < OpenProject::Hook::Listenerdiff --git a/modules/bim/spec/bcf/bcf_xml/importer_spec.rb b/modules/bim/spec/bcf/bcf_xml/importer_spec.rbindex 68d84e7be91..3b83d63d360 100644--- a/modules/bim/spec/bcf/bcf_xml/importer_spec.rb+++ b/modules/bim/spec/bcf/bcf_xml/importer_spec.rb@@ -32,7 +32,7 @@ RSpec.describe OpenProject::Bim::BcfXml::Importer dolet(:filename) { 'MaximumInformation.bcf' }let(:file) doRack::Test::UploadedFile.new(- File.join(Rails.root, "modules/bim/spec/fixtures/files/#{filename}"),+ Rails.root.join("modules/bim/spec/fixtures/files/#{filename}").to_s,'application/octet-stream')end@@ -95,8 +95,8 @@ RSpec.describe OpenProject::Bim::BcfXml::Importer doit 'creates 2 work packages' dosubject.import!- expect(Bim::Bcf::Issue.count).to be_eql 2- expect(WorkPackage.count).to be_eql 2+ expect(Bim::Bcf::Issue.count).to eql 2+ expect(WorkPackage.count).to eql 2endenddiff --git a/modules/bim/spec/bcf/bcf_xml/issue_writer_spec.rb b/modules/bim/spec/bcf/bcf_xml/issue_writer_spec.rbindex e2267f92705..9cf3f54c007 100644--- a/modules/bim/spec/bcf/bcf_xml/issue_writer_spec.rb+++ b/modules/bim/spec/bcf/bcf_xml/issue_writer_spec.rb@@ -120,25 +120,25 @@ RSpec.describe OpenProject::Bim::BcfXml::IssueWriter doexpect(subject.at('Markup')).to be_presentexpect(subject.at('Topic')).to be_present- expect(subject.at('Topic/@Guid').content).to be_eql bcf_issue.uuid- expect(subject.at('Topic/@TopicStatus').content).to be_eql work_package.status.name- expect(subject.at('Topic/@TopicType').content).to be_eql 'Issue'-- expect(subject.at('Topic/Title').content).to be_eql work_package.subject- expect(subject.at('Topic/CreationDate').content).to be_eql work_package.created_at.iso8601- expect(subject.at('Topic/ModifiedDate').content).to be_eql work_package.updated_at.iso8601- expect(subject.at('Topic/Description').content).to be_eql work_package.description- expect(subject.at('Topic/CreationAuthor').content).to be_eql work_package.author.mail- expect(subject.at('Topic/ReferenceLink').content).to be_eql url_helpers.work_package_url(work_package)- expect(subject.at('Topic/Priority').content).to be_eql work_package.priority.name- expect(subject.at('Topic/ModifiedAuthor').content).to be_eql work_package.journals.last.user.mail- expect(subject.at('Topic/AssignedTo').content).to be_eql work_package.assigned_to.mail- expect(subject.at('Topic/DueDate').content).to be_eql work_package.due_date.to_datetime.iso8601+ expect(subject.at('Topic/@Guid').content).to eql bcf_issue.uuid+ expect(subject.at('Topic/@TopicStatus').content).to eql work_package.status.name+ expect(subject.at('Topic/@TopicType').content).to eql 'Issue'++ expect(subject.at('Topic/Title').content).to eql work_package.subject+ expect(subject.at('Topic/CreationDate').content).to eql work_package.created_at.iso8601+ expect(subject.at('Topic/ModifiedDate').content).to eql work_package.updated_at.iso8601+ expect(subject.at('Topic/Description').content).to eql work_package.description+ expect(subject.at('Topic/CreationAuthor').content).to eql work_package.author.mail+ expect(subject.at('Topic/ReferenceLink').content).to eql url_helpers.work_package_url(work_package)+ expect(subject.at('Topic/Priority').content).to eql work_package.priority.name+ expect(subject.at('Topic/ModifiedAuthor').content).to eql work_package.journals.last.user.mail+ expect(subject.at('Topic/AssignedTo').content).to eql work_package.assigned_to.mail+ expect(subject.at('Topic/DueDate').content).to eql work_package.due_date.to_datetime.iso8601endenddef valid_markup?(doc)- schema = Nokogiri::XML::Schema(File.read(File.join(Rails.root, 'modules/bim/spec/bcf/bcf_xml/markup.xsd')))+ schema = Nokogiri::XML::Schema(File.read(Rails.root.join("modules/bim/spec/bcf/bcf_xml/markup.xsd").to_s))errors = schema.validate(doc)if errors.empty?true@@ -166,8 +166,8 @@ RSpec.describe OpenProject::Bim::BcfXml::IssueWriter doit_behaves_like 'valid markup'it "maintains existing nodes and attributes untouched" do- expect(subject.at('Index').content).to be_eql "0"- expect(subject.at('BimSnippet')['SnippetType']).to be_eql "JSON"+ expect(subject.at('Index').content).to eql "0"+ expect(subject.at('BimSnippet')['SnippetType']).to eql "JSON"endit 'exports all BCF comments' dodiff --git a/modules/bim/spec/bcf/bcf_xml/markup_extractor_spec.rb b/modules/bim/spec/bcf/bcf_xml/markup_extractor_spec.rbindex 77e5bf1a5f4..110f71ce864 100644--- a/modules/bim/spec/bcf/bcf_xml/markup_extractor_spec.rb+++ b/modules/bim/spec/bcf/bcf_xml/markup_extractor_spec.rb@@ -32,7 +32,7 @@ RSpec.describe OpenProject::Bim::BcfXml::MarkupExtractor dolet(:filename) { 'MaximumInformation.bcf' }let(:file) doRack::Test::UploadedFile.new(- File.join(Rails.root, "modules/bim/spec/fixtures/files/#{filename}"),+ Rails.root.join("modules/bim/spec/fixtures/files/#{filename}").to_s,'application/octet-stream')end@@ -51,35 +51,35 @@ RSpec.describe OpenProject::Bim::BcfXml::MarkupExtractor doendit '#uuid' do- expect(subject.uuid).to be_eql '63E78882-7C6A-4BF7-8982-FC478AFB9C97'+ expect(subject.uuid).to eql '63E78882-7C6A-4BF7-8982-FC478AFB9C97'endit '#title' do- expect(subject.title).to be_eql 'Maximum Content'+ expect(subject.title).to eql 'Maximum Content'endit '#priority' do- expect(subject.priority).to be_eql 'High'+ expect(subject.priority).to eql 'High'endit '#status' do- expect(subject.status).to be_eql 'Open'+ expect(subject.status).to eql 'Open'endit '#description' do- expect(subject.description).to be_eql 'This is a topic with all information present.'+ expect(subject.description).to eql 'This is a topic with all information present.'endit '#author' do- expect(subject.author).to be_eql '[email protected]'+ expect(subject.author).to eql '[email protected]'endit '#modified_author' do- expect(subject.modified_author).to be_eql '[email protected]'+ expect(subject.modified_author).to eql '[email protected]'endit '#assignee' do- expect(subject.assignee).to be_eql '[email protected]'+ expect(subject.assignee).to eql '[email protected]'endit '#due_date' dodiff --git a/modules/bim/spec/contracts/bcf/issues/create_contract_spec.rb b/modules/bim/spec/contracts/bcf/issues/create_contract_spec.rbindex a63081a665a..4b5a1690a24 100644--- a/modules/bim/spec/contracts/bcf/issues/create_contract_spec.rb+++ b/modules/bim/spec/contracts/bcf/issues/create_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_contract_examples'+require_relative 'shared_contract_examples'RSpec.describe Bim::Bcf::Issues::CreateContract doit_behaves_like 'issues contract' dodiff --git a/modules/bim/spec/contracts/bcf/issues/update_contract_spec.rb b/modules/bim/spec/contracts/bcf/issues/update_contract_spec.rbindex 347b80fdaca..a17020e2850 100644--- a/modules/bim/spec/contracts/bcf/issues/update_contract_spec.rb+++ b/modules/bim/spec/contracts/bcf/issues/update_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_contract_examples'+require_relative 'shared_contract_examples'RSpec.describe Bim::Bcf::Issues::UpdateContract doit_behaves_like 'issues contract' dodiff --git a/modules/bim/spec/contracts/ifc_models/create_contract_spec.rb b/modules/bim/spec/contracts/ifc_models/create_contract_spec.rbindex 895ad05c7f8..7484466bcb4 100644--- a/modules/bim/spec/contracts/ifc_models/create_contract_spec.rb+++ b/modules/bim/spec/contracts/ifc_models/create_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_contract_examples'+require_relative 'shared_contract_examples'RSpec.describe Bim::IfcModels::CreateContract doit_behaves_like 'ifc model contract' dodiff --git a/modules/bim/spec/contracts/ifc_models/update_contract_spec.rb b/modules/bim/spec/contracts/ifc_models/update_contract_spec.rbindex 3ef87109129..422c0bae85a 100644--- a/modules/bim/spec/contracts/ifc_models/update_contract_spec.rb+++ b/modules/bim/spec/contracts/ifc_models/update_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_contract_examples'+require_relative 'shared_contract_examples'RSpec.describe Bim::IfcModels::UpdateContract doit_behaves_like 'ifc model contract' dodiff --git a/modules/bim/spec/controllers/issues_controller_spec.rb b/modules/bim/spec/controllers/issues_controller_spec.rbindex 5b6daf669be..f80460faac8 100644--- a/modules/bim/spec/controllers/issues_controller_spec.rb+++ b/modules/bim/spec/controllers/issues_controller_spec.rb@@ -70,7 +70,7 @@ RSpec.describe Bim::Bcf::IssuesController docontext 'not member of project' dolet(:bcf_manager_member) {}- it 'will return "not authorized"' do+ it 'returns "not authorized"' doexpect(response).not_to be_successfulendend@@ -83,7 +83,7 @@ RSpec.describe Bim::Bcf::IssuesController doroles: [collaborator_role])end- it 'will return "not authorized"' do+ it 'returns "not authorized"' doexpect(response).not_to be_successfulendend@@ -105,7 +105,7 @@ RSpec.describe Bim::Bcf::IssuesController dolet(:filename) { 'MaximumInformation.bcf' }let(:file) doRack::Test::UploadedFile.new(- File.join(Rails.root, "modules/bim/spec/fixtures/files/#{filename}"),+ Rails.root.join("modules/bim/spec/fixtures/files/#{filename}").to_s,'application/zip')end@@ -137,7 +137,7 @@ RSpec.describe Bim::Bcf::IssuesController dolet(:filename) { 'MaximumInformation.bcf' }let(:file) doRack::Test::UploadedFile.new(- File.join(Rails.root, "modules/bim/spec/fixtures/files/#{filename}"),+ Rails.root.join("modules/bim/spec/fixtures/files/#{filename}").to_s,'application/octet-stream')end@@ -165,7 +165,7 @@ RSpec.describe Bim::Bcf::IssuesController dolet(:filename) { 'MaximumInformation.bcf' }let(:file) doRack::Test::UploadedFile.new(- File.join(Rails.root, "modules/bim/spec/fixtures/files/#{filename}"),+ Rails.root.join("modules/bim/spec/fixtures/files/#{filename}").to_s,'application/octet-stream')enddiff --git a/modules/bim/spec/factories/ifc_model_factory.rb b/modules/bim/spec/factories/ifc_model_factory.rbindex 3e58ac4dc7d..cdb4f9a6c88 100644--- a/modules/bim/spec/factories/ifc_model_factory.rb+++ b/modules/bim/spec/factories/ifc_model_factory.rb@@ -35,7 +35,7 @@ FactoryBot.define dotransient doifc_attachment doRack::Test::UploadedFile.new(- File.join(Rails.root, "modules/bim/spec/fixtures/files/minimal.ifc"),+ Rails.root.join("modules/bim/spec/fixtures/files/minimal.ifc").to_s,'application/binary')end@@ -55,7 +55,7 @@ FactoryBot.define dotransient doxkt_attachment doRack::Test::UploadedFile.new(- File.join(Rails.root, "modules/bim/spec/fixtures/files/minimal.xkt"),+ Rails.root.join("modules/bim/spec/fixtures/files/minimal.xkt").to_s,'application/binary')enddiff --git a/modules/bim/spec/features/bcf/api_authorization_spec.rb b/modules/bim/spec/features/bcf/api_authorization_spec.rbindex d55a03964b0..eeb822dcb72 100644--- a/modules/bim/spec/features/bcf/api_authorization_spec.rb+++ b/modules/bim/spec/features/bcf/api_authorization_spec.rb@@ -118,7 +118,7 @@ RSpec.describe 'authorization for BCF api', :js, with_config: { edition: 'bim' }visit my_account_pathclick_on 'Access token'- expect(page).to have_selector("#oauth-application-grant-#{app.id}", text: app.name)+ expect(page).to have_css("#oauth-application-grant-#{app.id}", text: app.name)expect(page).to have_css('td', text: app.name)# While being logged in, the api can be accessed with the sessiondiff --git a/modules/bim/spec/features/bcf/bcf_snapshot_column_spec.rb b/modules/bim/spec/features/bcf/bcf_snapshot_column_spec.rbindex 52ecea4b7d4..02a41b1a13b 100644--- a/modules/bim/spec/features/bcf/bcf_snapshot_column_spec.rb+++ b/modules/bim/spec/features/bcf/bcf_snapshot_column_spec.rb@@ -1,7 +1,6 @@require 'spec_helper'-RSpec.describe 'BCF snapshot column',- js: true,+RSpec.describe 'BCF snapshot column', :js,with_config: { edition: 'bim' } dolet(:project) { create(:project, enabled_module_names: %w[bim work_package_tracking]) }let(:wp_table) { Pages::WorkPackagesTable.new(project) }@@ -32,7 +31,7 @@ RSpec.describe 'BCF snapshot column',page.within(".wp-row-#{work_package.id} td.bcfThumbnail") doimage_path = "/api/bcf/2.1/projects/#{project.identifier}/topics/#{bcf_issue.uuid}/viewpoints/#{bcf_issue.viewpoints.first.uuid}/snapshot"- expect(page).to have_selector("img[src=\"#{image_path}\"]")+ expect(page).to have_css("img[src=\"#{image_path}\"]")endendenddiff --git a/modules/bim/spec/features/bcf/export_spec.rb b/modules/bim/spec/features/bcf/export_spec.rbindex e2dec51b011..a18724bd9af 100644--- a/modules/bim/spec/features/bcf/export_spec.rb+++ b/modules/bim/spec/features/bcf/export_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'require_relative '../../support/pages/ifc_models/show_default'-RSpec.describe 'bcf export',- js: true,+RSpec.describe 'bcf export', :js,with_config: { edition: 'bim' } dolet(:status) { create(:status, name: 'New', is_default: true) }let(:closed_status) { create(:closed_status, name: 'Closed') }diff --git a/modules/bim/spec/features/bcf_view_management_spec.rb b/modules/bim/spec/features/bcf_view_management_spec.rbindex 4e21547765a..d153b63df10 100644--- a/modules/bim/spec/features/bcf_view_management_spec.rb+++ b/modules/bim/spec/features/bcf_view_management_spec.rb@@ -31,8 +31,7 @@ require 'spec_helper'require_relative '../support/pages/ifc_models/show_default'require_relative '../../../../spec/features/views/shared_examples'-RSpec.describe 'bcf view management',- js: true, with_config: { edition: 'bim' } do+RSpec.describe 'bcf view management', :js, with_config: { edition: 'bim' } dolet(:project) { create(:project, enabled_module_names: %i[bim work_package_tracking]) }let(:bcf_page) { Pages::IfcModels::ShowDefault.new(project) }let(:role) dodiff --git a/modules/bim/spec/features/bim_filter_spec.rb b/modules/bim/spec/features/bim_filter_spec.rbindex eff44117660..78fcde873f7 100644--- a/modules/bim/spec/features/bim_filter_spec.rb+++ b/modules/bim/spec/features/bim_filter_spec.rb@@ -31,8 +31,7 @@ require 'spec_helper'require_relative '../support/pages/ifc_models/show'require_relative '../support/pages/ifc_models/show_default'-RSpec.describe 'BIM filter spec',- js: true, with_config: { edition: 'bim' } do+RSpec.describe 'BIM filter spec', :js, with_config: { edition: 'bim' } dolet(:project) { create(:project, enabled_module_names: %w(bim work_package_tracking)) }let(:open_status) { create(:status, is_closed: false) }let(:closed_status) { create(:status, is_closed: true) }diff --git a/modules/bim/spec/features/bim_navigation_spec.rb b/modules/bim/spec/features/bim_navigation_spec.rbindex 6e379f0546f..8c519796f9c 100644--- a/modules/bim/spec/features/bim_navigation_spec.rb+++ b/modules/bim/spec/features/bim_navigation_spec.rb@@ -28,8 +28,7 @@require_relative '../spec_helper'-RSpec.describe 'BIM navigation spec',- js: true, with_config: { edition: 'bim' } do+RSpec.describe 'BIM navigation spec', :js, with_config: { edition: 'bim' } dolet(:project) { create(:project, enabled_module_names: %i[bim work_package_tracking]) }let!(:work_package) { create(:work_package, project:) }let(:role) dodiff --git a/modules/bim/spec/features/ifc_models/direct_ifc_upload_spec.rb b/modules/bim/spec/features/ifc_models/direct_ifc_upload_spec.rbindex fa7e612fd1c..e8f9acd7de3 100644--- a/modules/bim/spec/features/ifc_models/direct_ifc_upload_spec.rb+++ b/modules/bim/spec/features/ifc_models/direct_ifc_upload_spec.rb@@ -27,9 +27,9 @@#++require 'spec_helper'-require_relative './ifc_upload_shared_examples'+require_relative 'ifc_upload_shared_examples'-RSpec.describe 'direct IFC upload', js: true, with_config: { edition: 'bim' }, with_direct_uploads: :redirect do+RSpec.describe 'direct IFC upload', :js, with_config: { edition: 'bim' }, with_direct_uploads: :redirect doit_behaves_like 'can upload an IFC file' do# with direct upload, we don't get the model namelet(:model_name) { 'model.ifc' }diff --git a/modules/bim/spec/features/ifc_models/regular_ifc_upload_spec.rb b/modules/bim/spec/features/ifc_models/regular_ifc_upload_spec.rbindex c7051e6d2f6..d52fd4f7b9f 100644--- a/modules/bim/spec/features/ifc_models/regular_ifc_upload_spec.rb+++ b/modules/bim/spec/features/ifc_models/regular_ifc_upload_spec.rb@@ -27,9 +27,9 @@#++require 'spec_helper'-require_relative './ifc_upload_shared_examples'+require_relative 'ifc_upload_shared_examples'-RSpec.describe 'IFC upload', js: true, with_config: { edition: 'bim' } do+RSpec.describe 'IFC upload', :js, with_config: { edition: 'bim' } doit_behaves_like 'can upload an IFC file' dolet(:model_name) { 'minimal.ifc' }enddiff --git a/modules/bim/spec/features/model_management_spec.rb b/modules/bim/spec/features/model_management_spec.rbindex 26c410c8d43..427d82c23f3 100644--- a/modules/bim/spec/features/model_management_spec.rb+++ b/modules/bim/spec/features/model_management_spec.rb@@ -30,8 +30,7 @@ require 'spec_helper'require_relative '../support/pages/ifc_models/index'-RSpec.describe 'model management',- js: true, with_config: { edition: 'bim' } do+RSpec.describe 'model management', :js, with_config: { edition: 'bim' } dolet(:project) { create(:project, enabled_module_names: %i[bim work_package_tracking]) }let(:index_page) { Pages::IfcModels::Index.new(project) }let(:role) { create(:project_role, permissions: %i[view_ifc_models manage_bcf manage_ifc_models view_work_packages]) }@@ -131,7 +130,7 @@ RSpec.describe 'model management',it "I can't see any models and perform no actions" doexpected = '[Error 403] You are not authorized to access this page.'- expect(page).to have_selector('.op-toast.-error', text: expected)+ expect(page).to have_css('.op-toast.-error', text: expected)index_page.add_model_allowed falseenddiff --git a/modules/bim/spec/features/model_viewer_spec.rb b/modules/bim/spec/features/model_viewer_spec.rbindex 27a16673068..5d094cceff7 100644--- a/modules/bim/spec/features/model_viewer_spec.rb+++ b/modules/bim/spec/features/model_viewer_spec.rb@@ -28,8 +28,7 @@require_relative '../spec_helper'-RSpec.describe 'model viewer',- js: true, with_config: { edition: 'bim' } do+RSpec.describe 'model viewer', :js, with_config: { edition: 'bim' } dolet(:project) { create(:project, enabled_module_names: %i[bim work_package_tracking]) }# TODO: Add empty viewpoint and stub method to load viewpoints once definedlet(:work_package) { create(:work_package, project:) }@@ -94,7 +93,7 @@ RSpec.describe 'model viewer',it 'shows a warning that no IFC models exist yet' dologin_as uservisit defaults_bcf_project_ifc_models_path(project)- expect(page).to have_selector('.op-toast.-info', text: I18n.t('js.ifc_models.empty_warning'))+ expect(page).to have_css('.op-toast.-info', text: I18n.t('js.ifc_models.empty_warning'))endendend@@ -135,7 +134,7 @@ RSpec.describe 'model viewer',it 'shows no viewer' doexpected = '[Error 403] You are not authorized to access this page.'- expect(page).to have_selector('.op-toast.-error', text: expected)+ expect(page).to have_css('.op-toast.-error', text: expected)show_model_page.model_viewer_visible falseshow_model_page.model_viewer_shows_a_toolbar falsediff --git a/modules/bim/spec/features/revit_add_in/bim_revit_add_in_navigation_spec.rb b/modules/bim/spec/features/revit_add_in/bim_revit_add_in_navigation_spec.rbindex 9fdb332a3be..3f158eb52b4 100644--- a/modules/bim/spec/features/revit_add_in/bim_revit_add_in_navigation_spec.rb+++ b/modules/bim/spec/features/revit_add_in/bim_revit_add_in_navigation_spec.rb@@ -28,8 +28,8 @@require_relative '../../spec_helper'-RSpec.describe 'BIM Revit Add-in navigation spec',- driver: :chrome_revit_add_in, js: true, with_config: { edition: 'bim' } do+RSpec.describe 'BIM Revit Add-in navigation spec', :js,+ driver: :chrome_revit_add_in, with_config: { edition: 'bim' } dolet(:project) { create(:project, enabled_module_names: %i[bim work_package_tracking]) }let!(:work_package) { create(:work_package, project:) }let(:role) do@@ -71,7 +71,7 @@ RSpec.describe 'BIM Revit Add-in navigation spec',within '.op-app-header' dopage.find("a[title='#{user.name}']").click- expect(page).to have_selector('li', text: I18n.t('js.revit.revit_add_in_settings'))+ expect(page).to have_css('li', text: I18n.t('js.revit.revit_add_in_settings'))endend@@ -81,14 +81,14 @@ RSpec.describe 'BIM Revit Add-in navigation spec',find('.menu-item', text: 'NONE', wait: 10).clickfull_create.edit_field(:subject).expect_active!- expect(page).to have_selector('.work-packages-partitioned-page--content-right', visible: :all)+ expect(page).to have_css('.work-packages-partitioned-page--content-right', visible: :all)endit 'shows work package details page in full view on Cards display mode' domodel_page.click_info_icon(work_package)- expect(page).to have_selector('.work-packages-partitioned-page--content-left', text: work_package.subject)- expect(page).to have_selector('.work-packages-partitioned-page--content-right', visible: :all)+ expect(page).to have_css('.work-packages-partitioned-page--content-left', text: work_package.subject)+ expect(page).to have_css('.work-packages-partitioned-page--content-right', visible: :all)endcontext 'with the table display mode' do@@ -98,12 +98,12 @@ RSpec.describe 'BIM Revit Add-in navigation spec',model_page.switch_view 'Table'loading_indicator_saveguard- expect(page).to have_selector('.work-package-table')+ expect(page).to have_css('.work-package-table')wp_table.expect_work_package_listed work_packagewp_table.open_split_view work_package- expect(page).to have_selector('.work-packages-partitioned-page--content-left', text: work_package.subject)- expect(page).to have_selector('.work-packages-partitioned-page--content-right', visible: false)+ expect(page).to have_css('.work-packages-partitioned-page--content-left', text: work_package.subject)+ expect(page).to have_css('.work-packages-partitioned-page--content-right', visible: false)endenddiff --git a/modules/bim/spec/features/revit_add_in/bim_revit_add_in_refresh_button_spec.rb b/modules/bim/spec/features/revit_add_in/bim_revit_add_in_refresh_button_spec.rbindex 30759fb1255..758064b33da 100644--- a/modules/bim/spec/features/revit_add_in/bim_revit_add_in_refresh_button_spec.rb+++ b/modules/bim/spec/features/revit_add_in/bim_revit_add_in_refresh_button_spec.rb@@ -28,8 +28,8 @@require_relative '../../spec_helper'-RSpec.describe 'BIM Revit Add-in navigation spec',- driver: :chrome_revit_add_in, js: true, with_config: { edition: 'bim' } do+RSpec.describe 'BIM Revit Add-in navigation spec', :js,+ driver: :chrome_revit_add_in, with_config: { edition: 'bim' } dolet(:project) { create(:project, enabled_module_names: %i[bim work_package_tracking]) }let!(:work_package) { create(:work_package, project:) }let(:role) dodiff --git a/modules/bim/spec/features/show_default_spec.rb b/modules/bim/spec/features/show_default_spec.rbindex 7f77b68aee3..3163e734062 100644--- a/modules/bim/spec/features/show_default_spec.rb+++ b/modules/bim/spec/features/show_default_spec.rb@@ -28,8 +28,7 @@require_relative '../spec_helper'-RSpec.describe 'show default model',- js: true, with_config: { edition: 'bim' } do+RSpec.describe 'show default model', :js, with_config: { edition: 'bim' } dolet(:project) { create(:project, enabled_module_names: %i[bim work_package_tracking]) }let(:index_page) { Pages::IfcModels::Index.new(project) }let(:show_default_page) { Pages::IfcModels::ShowDefault.new(project) }diff --git a/modules/bim/spec/features/viewer/create_viewpoint_spec.rb b/modules/bim/spec/features/viewer/create_viewpoint_spec.rbindex ba184f3a9c4..10084b3cfbf 100644--- a/modules/bim/spec/features/viewer/create_viewpoint_spec.rb+++ b/modules/bim/spec/features/viewer/create_viewpoint_spec.rb@@ -28,8 +28,7 @@require_relative '../../spec_helper'-RSpec.describe 'Create viewpoint from BCF details page',- js: true, with_config: { edition: 'bim' } do+RSpec.describe 'Create viewpoint from BCF details page', :js, with_config: { edition: 'bim' } dolet(:project) { create(:project, enabled_module_names: %i[bim work_package_tracking]) }let(:user) { create(:admin) }diff --git a/modules/bim/spec/features/viewer/delete_viewpoint_spec.rb b/modules/bim/spec/features/viewer/delete_viewpoint_spec.rbindex 7419790fe26..e5f9c38800d 100644--- a/modules/bim/spec/features/viewer/delete_viewpoint_spec.rb+++ b/modules/bim/spec/features/viewer/delete_viewpoint_spec.rb@@ -28,8 +28,7 @@require_relative '../../spec_helper'-RSpec.describe 'Delete viewpoint in model viewer',- js: true, with_config: { edition: 'bim' } do+RSpec.describe 'Delete viewpoint in model viewer', :js, with_config: { edition: 'bim' } dolet(:project) { create(:project, enabled_module_names: %i[bim work_package_tracking]) }let(:user) { create(:admin) }diff --git a/modules/bim/spec/features/viewer/show_viewpoint_spec.rb b/modules/bim/spec/features/viewer/show_viewpoint_spec.rbindex ee4c539cea1..9b0bcf7108d 100644--- a/modules/bim/spec/features/viewer/show_viewpoint_spec.rb+++ b/modules/bim/spec/features/viewer/show_viewpoint_spec.rb@@ -28,8 +28,7 @@require_relative '../../spec_helper'-RSpec.describe 'Show viewpoint in model viewer',- js: true, with_config: { edition: 'bim' } do+RSpec.describe 'Show viewpoint in model viewer', :js, with_config: { edition: 'bim' } dolet(:project) docreate(:project,enabled_module_names: %i[bim work_package_tracking],@@ -144,7 +143,7 @@ RSpec.describe 'Show viewpoint in model viewer',it 'does not show the viewpoint' dowp_details.visit!bcf_details.expect_viewpoint_count(0)- expect(page).not_to have_selector('h3.attributes-group--header-text', text: 'BCF')+ expect(page).to have_no_css('h3.attributes-group--header-text', text: 'BCF')endendenddiff --git a/modules/bim/spec/lib/open_project/bcf/bcf_json/viewpoint_reader_spec.rb b/modules/bim/spec/lib/open_project/bcf/bcf_json/viewpoint_reader_spec.rbindex 4875ac72ee9..133f9250cc6 100644--- a/modules/bim/spec/lib/open_project/bcf/bcf_json/viewpoint_reader_spec.rb+++ b/modules/bim/spec/lib/open_project/bcf/bcf_json/viewpoint_reader_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './viewpoint_reader_shared_examples'+require_relative 'viewpoint_reader_shared_examples'RSpec.describe OpenProject::Bim::BcfJson::ViewpointReader dolet(:instance) { described_class.new xml_viewpoint.uuid, xml_viewpoint.viewpoint }diff --git a/modules/bim/spec/models/bcf/issue_spec.rb b/modules/bim/spec/models/bcf/issue_spec.rbindex 1147504edef..ed3dceada29 100644--- a/modules/bim/spec/models/bcf/issue_spec.rb+++ b/modules/bim/spec/models/bcf/issue_spec.rb@@ -42,14 +42,14 @@ RSpec.describe Bim::Bcf::Issue doit "caches the document" dofirst_fetched_doc = subject.markup_doc- expect(subject.markup_doc).to be_eql(first_fetched_doc)+ expect(subject.markup_doc).to eql(first_fetched_doc)endit "invalidates the cache after an update of the issue" dofirst_fetched_doc = subject.markup_docsubject.markup = subject.markup + ' 'subject.save- expect(subject.markup_doc).not_to be_eql(first_fetched_doc)+ expect(subject.markup_doc).not_to eql(first_fetched_doc)endend@@ -59,7 +59,7 @@ RSpec.describe Bim::Bcf::Issue doit 'returns all issues of the provided project' doexpect(described_class.of_project(issue.project))- .to match_array [issue]+ .to contain_exactly(issue)endendenddiff --git a/modules/bim/spec/requests/api/bcf/v2_1/auth_api_spec.rb b/modules/bim/spec/requests/api/bcf/v2_1/auth_api_spec.rbindex 8edaf10145f..a60ec1ddcbf 100644--- a/modules/bim/spec/requests/api/bcf/v2_1/auth_api_spec.rb+++ b/modules/bim/spec/requests/api/bcf/v2_1/auth_api_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'rack/test'-require_relative './shared_responses'+require_relative 'shared_responses'RSpec.describe 'BCF 2.1 auth resource', content_type: :json doinclude Rack::Test::Methodsdiff --git a/modules/bim/spec/requests/api/bcf/v2_1/current_user_api_spec.rb b/modules/bim/spec/requests/api/bcf/v2_1/current_user_api_spec.rbindex 8d485890199..9b226a1a9be 100644--- a/modules/bim/spec/requests/api/bcf/v2_1/current_user_api_spec.rb+++ b/modules/bim/spec/requests/api/bcf/v2_1/current_user_api_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'rack/test'-require_relative './shared_responses'+require_relative 'shared_responses'RSpec.describe 'BCF 2.1 current-user resource', content_type: :json doinclude Rack::Test::Methodsdiff --git a/modules/bim/spec/requests/api/bcf/v2_1/project_extensions_api_spec.rb b/modules/bim/spec/requests/api/bcf/v2_1/project_extensions_api_spec.rbindex a45f1478948..34d9a7ac2d3 100644--- a/modules/bim/spec/requests/api/bcf/v2_1/project_extensions_api_spec.rb+++ b/modules/bim/spec/requests/api/bcf/v2_1/project_extensions_api_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'rack/test'-require_relative './shared_responses'+require_relative 'shared_responses'RSpec.describe 'BCF 2.1 project extensions resource', content_type: :json doinclude Rack::Test::Methodsdiff --git a/modules/bim/spec/requests/api/bcf/v2_1/viewpoints_api_spec.rb b/modules/bim/spec/requests/api/bcf/v2_1/viewpoints_api_spec.rbindex 49413343a9d..8ae31ca303c 100644--- a/modules/bim/spec/requests/api/bcf/v2_1/viewpoints_api_spec.rb+++ b/modules/bim/spec/requests/api/bcf/v2_1/viewpoints_api_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'rack/test'-require_relative './shared_responses'+require_relative 'shared_responses'RSpec.describe 'BCF 2.1 viewpoints resource', content_type: :json doinclude Rack::Test::Methodsdiff --git a/modules/bim/spec/requests/api/bcf_xml/v1/bcf_xml_api_spec.rb b/modules/bim/spec/requests/api/bcf_xml/v1/bcf_xml_api_spec.rbindex e7fe2c7142b..69cb65849fd 100644--- a/modules/bim/spec/requests/api/bcf_xml/v1/bcf_xml_api_spec.rb+++ b/modules/bim/spec/requests/api/bcf_xml/v1/bcf_xml_api_spec.rb@@ -47,7 +47,7 @@ RSpec.describe 'BCF XML API v1 bcf_xml resource' dolet(:filename) { 'MaximumInformation.bcf' }let(:bcf_xml_file) doRack::Test::UploadedFile.new(- File.join(Rails.root, "modules/bim/spec/fixtures/files/#{filename}"),+ Rails.root.join("modules/bim/spec/fixtures/files/#{filename}").to_s,'application/octet-stream')enddiff --git a/modules/bim/spec/support/components/bcf_details_viewpoints.rb b/modules/bim/spec/support/components/bcf_details_viewpoints.rbindex 8c76f44d3ea..084f468b0fc 100644--- a/modules/bim/spec/support/components/bcf_details_viewpoints.rb+++ b/modules/bim/spec/support/components/bcf_details_viewpoints.rb@@ -29,11 +29,11 @@module Componentsmodule BcfDetailsViewpointsdef expect_viewpoint_count(number)- expect(page).to have_selector('a.ngx-gallery-thumbnail', visible: :all, count: number, wait: 20)+ expect(page).to have_css('a.ngx-gallery-thumbnail', visible: :all, count: number, wait: 20)enddef expect_no_viewpoint_addable- expect(page).not_to have_selector('a.button', text: 'Viewpoint')+ expect(page).to have_no_css('a.button', text: 'Viewpoint')enddef next_viewpointdiff --git a/modules/bim/spec/support/pages/ifc_models/index.rb b/modules/bim/spec/support/pages/ifc_models/index.rbindex 7366ecc1dca..737013cb593 100644--- a/modules/bim/spec/support/pages/ifc_models/index.rb+++ b/modules/bim/spec/support/pages/ifc_models/index.rb@@ -57,7 +57,7 @@ module Pagesvisit!else- expect(page).not_to have_selector('.button.-alt-highlight', text: 'IFC model')+ expect(page).to have_no_css('.button.-alt-highlight', text: 'IFC model')endend@@ -69,14 +69,14 @@ module Pagesdef edit_model_allowed(model_name, allowed)row = find_model_table_row model_namewithin row do- expect(page).to (allowed ? have_selector('.icon-edit') : have_no_selector('.icon-edit'))+ expect(page).to (allowed ? have_css('.icon-edit') : have_no_selector('.icon-edit'))endenddef delete_model_allowed(model_name, allowed)row = find_model_table_row model_namewithin row do- expect(page).to (allowed ? have_selector('.icon-edit') : have_no_selector('.icon-edit'))+ expect(page).to (allowed ? have_css('.icon-edit') : have_no_selector('.icon-edit'))endend@@ -153,7 +153,7 @@ module Pagesenddef change_model_name(model_name, new_name)- expect(page).to have_selector('input[type="file"]')+ expect(page).to have_css('input[type="file"]')expect(page).to have_field('bim_ifc_models_ifc_model[title]', with: model_name)fill_in 'bim_ifc_models_ifc_model[title]', with: new_nameenddiff --git a/modules/bim/spec/support/pages/ifc_models/show_default.rb b/modules/bim/spec/support/pages/ifc_models/show_default.rbindex 0a11dd4b4dd..0b4fb31ba45 100644--- a/modules/bim/spec/support/pages/ifc_models/show_default.rb+++ b/modules/bim/spec/support/pages/ifc_models/show_default.rb@@ -58,7 +58,7 @@ module Pagesenddef finished_loading- expect(page).to have_selector('.xeokit-busy-modal', visible: :all, wait: 30)+ expect(page).to have_css('.xeokit-busy-modal', visible: :all, wait: 30)enddef model_viewer_visible(visible)@@ -78,8 +78,8 @@ module Pagesexpect(page).to have_selector(selector, count: 8)endelse- expect(page).not_to have_selector(selector)- expect(page).not_to have_selector('[data-test-selector="op-ifc-viewer--toolbar-container"]')+ expect(page).to have_no_selector(selector)+ expect(page).to have_no_css('[data-test-selector="op-ifc-viewer--toolbar-container"]')endend@@ -90,7 +90,7 @@ module Pagesenddef page_has_a_toolbar- expect(page).to have_selector('.toolbar-container')+ expect(page).to have_css('.toolbar-container')enddef page_shows_a_filter_button(visible)@@ -115,11 +115,11 @@ module Pagesenddef expect_view_toggle_at(value)- expect(page).to have_selector('#bcf-view-toggle-button', text: value)+ expect(page).to have_css('#bcf-view-toggle-button', text: value)enddef has_no_menu_item_with_text?(value)- expect(page).not_to have_selector('.menu-item', text: value)+ expect(page).to have_no_css('.menu-item', text: value)endprivatediff --git a/modules/bim/spec/views/bim/ifc_models/ifc_models/index.html.erb_spec.rb b/modules/bim/spec/views/bim/ifc_models/ifc_models/index.html.erb_spec.rbindex 50d45b6952e..fa71df317e3 100644--- a/modules/bim/spec/views/bim/ifc_models/ifc_models/index.html.erb_spec.rb+++ b/modules/bim/spec/views/bim/ifc_models/ifc_models/index.html.erb_spec.rb@@ -96,7 +96,7 @@ RSpec.describe 'bim/ifc_models/ifc_models/index' doit 'lists the IFC model with all but the download button' dorenderexpect(rendered).to have_text('office.ifc')- expect(rendered).not_to have_link('Download')+ expect(rendered).to have_no_link('Download')expect(rendered).to have_link('Delete')expect(rendered).to have_link('Edit')enddiff --git a/modules/boards/app/models/boards/grid.rb b/modules/boards/app/models/boards/grid.rbindex beec300c2fc..9c3cfd2cf69 100644--- a/modules/boards/app/models/boards/grid.rb+++ b/modules/boards/app/models/boards/grid.rb@@ -68,7 +68,6 @@ module Boardsdef contained_query_idswidgets.filter_map { |w| w.options['queryId'] || w.options['query_id'] }-endendenddiff --git a/modules/boards/spec/features/action_boards/assignee_board_spec.rb b/modules/boards/spec/features/action_boards/assignee_board_spec.rbindex 5feb4325f8c..2e052f9c39e 100644--- a/modules/boards/spec/features/action_boards/assignee_board_spec.rb+++ b/modules/boards/spec/features/action_boards/assignee_board_spec.rb@@ -27,11 +27,10 @@#++require 'spec_helper'-require_relative './../support/board_index_page'-require_relative './../support/board_page'+require_relative '../support/board_index_page'+require_relative '../support/board_page'-RSpec.describe 'Assignee action board',- js: true,+RSpec.describe 'Assignee action board', :js,with_ee: %i[board_view] dolet(:bobself_user) docreate(:user,@@ -149,7 +148,7 @@ RSpec.describe 'Assignee action board',# Expect to have changed the avatarwithin_test_selector('op-wp-single-card--content-assignee') do- expect(page).to have_selector('.op-avatar_mini', text: 'FB', wait: 10)+ expect(page).to have_css('.op-avatar_mini', text: 'FB', wait: 10)endwork_package.reload@@ -163,7 +162,7 @@ RSpec.describe 'Assignee action board',# Expect to have changed the avatarwithin_test_selector('op-wp-single-card--content-assignee') do- expect(page).to have_selector('.op-avatar_mini', text: 'GG', wait: 10)+ expect(page).to have_css('.op-avatar_mini', text: 'GG', wait: 10)endwork_package.reloaddiff --git a/modules/boards/spec/features/action_boards/custom_field_filters_spec.rb b/modules/boards/spec/features/action_boards/custom_field_filters_spec.rbindex f47018d04b4..dae5cc3c5f1 100644--- a/modules/boards/spec/features/action_boards/custom_field_filters_spec.rb+++ b/modules/boards/spec/features/action_boards/custom_field_filters_spec.rb@@ -27,10 +27,10 @@#++require 'spec_helper'-require_relative './../support//board_index_page'-require_relative './../support/board_page'+require_relative '../support//board_index_page'+require_relative '../support/board_page'-RSpec.describe 'Custom field filter in boards', js: true, with_ee: %i[board_view] do+RSpec.describe 'Custom field filter in boards', :js, with_ee: %i[board_view] dolet(:user) docreate(:user,member_with_roles: { project => role })diff --git a/modules/boards/spec/features/action_boards/status_board_spec.rb b/modules/boards/spec/features/action_boards/status_board_spec.rbindex c4bf4c896a9..6a3b072db89 100644--- a/modules/boards/spec/features/action_boards/status_board_spec.rb+++ b/modules/boards/spec/features/action_boards/status_board_spec.rb@@ -27,10 +27,10 @@#++require 'spec_helper'-require_relative './../support//board_index_page'-require_relative './../support/board_page'+require_relative '../support//board_index_page'+require_relative '../support/board_page'-RSpec.describe 'Status action board', js: true, with_ee: %i[board_view] do+RSpec.describe 'Status action board', :js, with_ee: %i[board_view] dolet(:user) docreate(:user,member_with_roles: { project => role })diff --git a/modules/boards/spec/features/action_boards/status_type_moving_board_spec.rb b/modules/boards/spec/features/action_boards/status_type_moving_board_spec.rbindex 4a3cd5ff022..2483a30268d 100644--- a/modules/boards/spec/features/action_boards/status_type_moving_board_spec.rb+++ b/modules/boards/spec/features/action_boards/status_type_moving_board_spec.rb@@ -27,10 +27,10 @@#++require 'spec_helper'-require_relative './../support//board_index_page'-require_relative './../support/board_page'+require_relative '../support//board_index_page'+require_relative '../support/board_page'-RSpec.describe 'Status action board', js: true, with_ee: %i[board_view] do+RSpec.describe 'Status action board', :js, with_ee: %i[board_view] dolet(:user) docreate(:user,member_with_roles: { project => role })diff --git a/modules/boards/spec/features/action_boards/subproject_board_spec.rb b/modules/boards/spec/features/action_boards/subproject_board_spec.rbindex a2f9e324a05..0573ab22203 100644--- a/modules/boards/spec/features/action_boards/subproject_board_spec.rb+++ b/modules/boards/spec/features/action_boards/subproject_board_spec.rb@@ -202,11 +202,11 @@ RSpec.describe 'Subproject action board', :js, with_ee: %i[board_view] doboard_page.expect_card subproject1.name, work_package.subject# No error is to be displayed as erroneous columns are filtered out- expect(page).not_to have_css('.op-toast.-error')+ expect(page).to have_no_css('.op-toast.-error')board_page.expect_no_list(subproject2.name)expect(page)- .not_to have_content invisible_work_package.subject+ .to have_no_content invisible_work_package.subjectendend@@ -236,7 +236,7 @@ RSpec.describe 'Subproject action board', :js, with_ee: %i[board_view] doboard_page.open_and_fill_add_list_modal subproject2.name- expect(page).not_to have_css('.ng-option', text: subproject2.name)+ expect(page).to have_no_css('.ng-option', text: subproject2.name)endendenddiff --git a/modules/boards/spec/features/action_boards/subtasks_board_spec.rb b/modules/boards/spec/features/action_boards/subtasks_board_spec.rbindex d075792e21e..ca86390bffc 100644--- a/modules/boards/spec/features/action_boards/subtasks_board_spec.rb+++ b/modules/boards/spec/features/action_boards/subtasks_board_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../support//board_index_page'require_relative '../support/board_page'-RSpec.describe 'Subtasks action board', js: true, with_ee: %i[board_view] do+RSpec.describe 'Subtasks action board', :js, with_ee: %i[board_view] dolet(:type) { create(:type_standard) }let(:project) { create(:project, types: [type], enabled_module_names: %i[work_package_tracking board_view]) }let(:role) { create(:project_role, permissions:) }diff --git a/modules/boards/spec/features/action_boards/version_board_spec.rb b/modules/boards/spec/features/action_boards/version_board_spec.rbindex b98a713970e..6c0180afb5e 100644--- a/modules/boards/spec/features/action_boards/version_board_spec.rb+++ b/modules/boards/spec/features/action_boards/version_board_spec.rb@@ -245,18 +245,18 @@ RSpec.describe 'Version action board', :js, with_ee: %i[board_view] doendboard_page.expect_list 'Closed version'- expect(page).to have_selector("#{test_selector('op-version-board-header')}.-closed")+ expect(page).to have_css("#{test_selector('op-version-board-header')}.-closed")# Can open that versionboard_page.click_list_dropdown 'Closed version', 'Open version'- expect(page).not_to have_selector("#{test_selector('op-version-board-header')}.-closed")+ expect(page).to have_no_css("#{test_selector('op-version-board-header')}.-closed")closed_version.reloadexpect(closed_version.status).to eq 'open'# Can lock that versionboard_page.click_list_dropdown 'Closed version', 'Lock version'- expect(page).to have_selector("#{test_selector('op-version-board-header')}.-locked")+ expect(page).to have_css("#{test_selector('op-version-board-header')}.-locked")closed_version.reloadexpect(closed_version.status).to eq 'locked'@@ -323,7 +323,7 @@ RSpec.describe 'Version action board', :js, with_ee: %i[board_view] doboard_page.expect_editable_board(true)board_page.expect_editable_list(false)- expect(page).not_to have_selector("#{test_selector('op-wp-single-card')}.-draggable")+ expect(page).to have_no_css("#{test_selector('op-wp-single-card')}.-draggable")endend@@ -337,7 +337,7 @@ RSpec.describe 'Version action board', :js, with_ee: %i[board_view] doboard_page.open_and_fill_add_list_modal 'Completely new version'- expect(page).not_to have_css('.ng-option', text: 'Completely new version')+ expect(page).to have_no_css('.ng-option', text: 'Completely new version')endendenddiff --git a/modules/boards/spec/features/board_conflicts_spec.rb b/modules/boards/spec/features/board_conflicts_spec.rbindex ce5d2e46f5f..a97d4e39176 100644--- a/modules/boards/spec/features/board_conflicts_spec.rb+++ b/modules/boards/spec/features/board_conflicts_spec.rb@@ -27,10 +27,10 @@#++require 'spec_helper'-require_relative './support/board_index_page'-require_relative './support/board_page'+require_relative 'support/board_index_page'+require_relative 'support/board_page'-RSpec.describe 'Board remote changes resolution', js: true, with_ee: %i[board_view] do+RSpec.describe 'Board remote changes resolution', :js, with_ee: %i[board_view] dolet(:user1) docreate(:user,member_with_roles: { project => role })diff --git a/modules/boards/spec/features/board_enterprise_spec.rb b/modules/boards/spec/features/board_enterprise_spec.rbindex 0e05c8ae788..dd8d4b15a80 100644--- a/modules/boards/spec/features/board_enterprise_spec.rb+++ b/modules/boards/spec/features/board_enterprise_spec.rb@@ -56,8 +56,8 @@ RSpec.describe 'Boards enterprise spec', :js, :with_cuprite doit 'disabled all action boards' dopage.find('.toolbar-item a', text: 'Board').click- expect(page).to have_selector("#{test_selector('op-tile-block')}:not(.-disabled)", text: 'Basic')- expect(page).to have_selector("#{test_selector('op-tile-block')}.-disabled", count: 5)+ expect(page).to have_css("#{test_selector('op-tile-block')}:not(.-disabled)", text: 'Basic')+ expect(page).to have_css("#{test_selector('op-tile-block')}.-disabled", count: 5)endit 'shows a banner on the action board' do@@ -85,7 +85,7 @@ RSpec.describe 'Boards enterprise spec', :js, :with_cuprite doit 'enables all options' dopage.find('.toolbar-item a', text: 'Board').click- expect(page).to have_selector("#{test_selector('op-tile-block')}:not(.-disabled)", count: 6)+ expect(page).to have_css("#{test_selector('op-tile-block')}:not(.-disabled)", count: 6)endit 'shows the action board' dodiff --git a/modules/boards/spec/features/board_highlighting_spec.rb b/modules/boards/spec/features/board_highlighting_spec.rbindex 86f0b0b3b4a..2c144beb40f 100644--- a/modules/boards/spec/features/board_highlighting_spec.rb+++ b/modules/boards/spec/features/board_highlighting_spec.rb@@ -27,10 +27,10 @@#++require 'spec_helper'-require_relative './support/board_index_page'-require_relative './support/board_page'+require_relative 'support/board_index_page'+require_relative 'support/board_page'-RSpec.describe 'Work Package boards spec', js: true, with_ee: %i[board_view] do+RSpec.describe 'Work Package boards spec', :js, with_ee: %i[board_view] dolet(:user) docreate(:user,member_with_roles: { project => role })@@ -81,26 +81,26 @@ RSpec.describe 'Work Package boards spec', js: true, with_ee: %i[board_view] doboard_page.expect_card 'Open', wp2.subject# Highlight type inline is always active- expect(page).to have_selector(".__hl_inline_type_#{type.id}")- expect(page).to have_selector(".__hl_inline_type_#{type2.id}")+ expect(page).to have_css(".__hl_inline_type_#{type.id}")+ expect(page).to have_css(".__hl_inline_type_#{type2.id}")# Highlight whole card by priorityboard_page.change_board_highlighting 'inline', 'Priority'- expect(page).to have_selector(".__hl_background_priority_#{priority.id}")- expect(page).to have_selector(".__hl_background_priority_#{priority2.id}")+ expect(page).to have_css(".__hl_background_priority_#{priority.id}")+ expect(page).to have_css(".__hl_background_priority_#{priority2.id}")# Highlight whole card by typeboard_page.change_board_highlighting 'inline', 'Type'- expect(page).to have_selector(".__hl_background_type_#{type.id}")- expect(page).to have_selector(".__hl_background_type_#{type2.id}")+ expect(page).to have_css(".__hl_background_type_#{type.id}")+ expect(page).to have_css(".__hl_background_type_#{type2.id}")# Disable highlightingboard_page.change_board_highlighting 'none'- expect(page).not_to have_selector(".__hl_background_type_#{type.id}")- expect(page).not_to have_selector(".__hl_background_type_#{type2.id}")+ expect(page).to have_no_css(".__hl_background_type_#{type.id}")+ expect(page).to have_no_css(".__hl_background_type_#{type2.id}")# Type is still shown highlighted- expect(page).to have_selector(".__hl_inline_type_#{type.id}")- expect(page).to have_selector(".__hl_inline_type_#{type2.id}")+ expect(page).to have_css(".__hl_inline_type_#{type.id}")+ expect(page).to have_css(".__hl_inline_type_#{type2.id}")endenddiff --git a/modules/boards/spec/features/board_index_spec.rb b/modules/boards/spec/features/board_index_spec.rbindex 79c3596f0e1..06edd75b75a 100644--- a/modules/boards/spec/features/board_index_spec.rb+++ b/modules/boards/spec/features/board_index_spec.rb@@ -67,7 +67,6 @@ RSpec.describe 'Work Package Project Boards Index Page',shared_let(:priority) { create(:default_priority) }shared_let(:status) { create(:default_status) }-let(:current_user) { user_with_full_permissions }let(:board_index) { Pages::BoardIndex.new(project) }diff --git a/modules/boards/spec/features/board_management_spec.rb b/modules/boards/spec/features/board_management_spec.rbindex b23b483994b..a15e88ba211 100644--- a/modules/boards/spec/features/board_management_spec.rb+++ b/modules/boards/spec/features/board_management_spec.rb@@ -27,10 +27,10 @@#++require 'spec_helper'-require_relative './support/board_index_page'-require_relative './support/board_page'+require_relative 'support/board_index_page'+require_relative 'support/board_page'-RSpec.describe 'Board management spec', js: true, with_ee: %i[board_view] do+RSpec.describe 'Board management spec', :js, with_ee: %i[board_view] dolet(:user) docreate(:user,member_with_roles: { project => role })@@ -283,7 +283,7 @@ RSpec.describe 'Board management spec', js: true, with_ee: %i[board_view] doit 'does not allow viewing of boards' dovisit project_work_package_board_path(project, board_view)- expect(page).to have_selector('#errorExplanation', text: I18n.t(:notice_not_authorized))+ expect(page).to have_css('#errorExplanation', text: I18n.t(:notice_not_authorized))board_index.expect_editable falseend@@ -294,7 +294,7 @@ RSpec.describe 'Board management spec', js: true, with_ee: %i[board_view] doit 'does not allow viewing of boards' doboard_index.visit!- expect(page).to have_selector('#errorExplanation', text: I18n.t(:notice_not_authorized))+ expect(page).to have_css('#errorExplanation', text: I18n.t(:notice_not_authorized))endendenddiff --git a/modules/boards/spec/features/board_navigation_spec.rb b/modules/boards/spec/features/board_navigation_spec.rbindex 1da1ec87215..6fd0cefa35d 100644--- a/modules/boards/spec/features/board_navigation_spec.rb+++ b/modules/boards/spec/features/board_navigation_spec.rb@@ -27,10 +27,10 @@#++require 'spec_helper'-require_relative './support/board_index_page'-require_relative './support/board_page'+require_relative 'support/board_index_page'+require_relative 'support/board_page'-RSpec.describe 'Work Package boards spec', js: true, with_ee: %i[board_view] do+RSpec.describe 'Work Package boards spec', :js, with_ee: %i[board_view] dolet(:user) docreate(:user,member_with_roles: { project => role })diff --git a/modules/boards/spec/features/board_update_spec.rb b/modules/boards/spec/features/board_update_spec.rbindex 23aca879e2b..78a6e8d7cf4 100644--- a/modules/boards/spec/features/board_update_spec.rb+++ b/modules/boards/spec/features/board_update_spec.rb@@ -27,10 +27,10 @@#++require 'spec_helper'-require_relative './support/board_index_page'-require_relative './support/board_page'+require_relative 'support/board_index_page'+require_relative 'support/board_page'-RSpec.describe 'Work Package boards updating spec', js: true, with_ee: %i[board_view] do+RSpec.describe 'Work Package boards updating spec', :js, with_ee: %i[board_view] dolet(:admin) { create(:admin) }let(:project) { create(:project, enabled_module_names: %i[work_package_tracking board_view]) }diff --git a/modules/boards/spec/features/boards_global_create_spec.rb b/modules/boards/spec/features/boards_global_create_spec.rbindex b4a0f528edf..f2d1cd747f0 100644--- a/modules/boards/spec/features/boards_global_create_spec.rb+++ b/modules/boards/spec/features/boards_global_create_spec.rb@@ -51,7 +51,7 @@ RSpec.describe 'Boards',context 'with a Community Edition', with_ee: %i[] doit 'renders an enterprise banner and disables all restriced board types', :aggregate_failures do- expect(page).to have_selector('op-enterprise-banner')+ expect(page).to have_css('op-enterprise-banner')expect(page).to have_selector(:radio_button, 'Basic')%w[Status Assignee Version Subproject Parent-child].each do |restricted_board_type|@@ -96,7 +96,7 @@ RSpec.describe 'Boards',expect(page).to have_text(I18n.t(:notice_successful_create))expect(page).to have_current_path("/projects/#{project.identifier}/boards/#{Boards::Grid.last.id}")expect(page).to have_text "Gotham Renewal Board"- expect(page).to have_selector("[data-query-name='#{status.name}']")+ expect(page).to have_css("[data-query-name='#{status.name}']")endend@@ -128,10 +128,10 @@ RSpec.describe 'Boards',expect(page).to have_current_path("/projects/#{project.identifier}/boards/#{Boards::Grid.last.id}")expect(page).to have_text "Gotham Renewal Board"versions.each do |version|- expect(page).to have_selector("[data-query-name='#{version.name}'")+ expect(page).to have_css("[data-query-name='#{version.name}'")endexcluded_versions.each do |version|- expect(page).not_to have_selector("[data-query-name='#{version.name}'")+ expect(page).to have_no_css("[data-query-name='#{version.name}'")endendenddiff --git a/modules/boards/spec/features/boards_sorting_spec.rb b/modules/boards/spec/features/boards_sorting_spec.rbindex f77c5bbc6e3..9ece629182e 100644--- a/modules/boards/spec/features/boards_sorting_spec.rb+++ b/modules/boards/spec/features/boards_sorting_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative 'support/board_index_page'require_relative 'support/board_page'-RSpec.describe 'Work Package boards sorting spec', js: true, with_ee: %i[board_view] do+RSpec.describe 'Work Package boards sorting spec', :js, with_ee: %i[board_view] dolet(:admin) { create(:admin) }let(:project) { create(:project, enabled_module_names: %i[work_package_tracking board_view]) }let(:board_index) { Pages::BoardIndex.new(project) }diff --git a/modules/boards/spec/features/menu_items/global_menu_item_spec.rb b/modules/boards/spec/features/menu_items/global_menu_item_spec.rbindex 3ae8cb57df9..422333c35bc 100644--- a/modules/boards/spec/features/menu_items/global_menu_item_spec.rb+++ b/modules/boards/spec/features/menu_items/global_menu_item_spec.rb@@ -58,7 +58,7 @@ RSpec.describe 'Global menu item for boards', :js, :with_cuprite doit 'is not rendered' dowithin '#main-menu' do- expect(page).not_to have_content(boards_label)+ expect(page).to have_no_content(boards_label)endendenddiff --git a/modules/boards/spec/features/menu_items/top_menu_item_spec.rb b/modules/boards/spec/features/menu_items/top_menu_item_spec.rbindex ee4181aa90e..a85b0c38c47 100644--- a/modules/boards/spec/features/menu_items/top_menu_item_spec.rb+++ b/modules/boards/spec/features/menu_items/top_menu_item_spec.rb@@ -73,7 +73,7 @@ RSpec.describe 'Top menu item for boards', :js, :with_cuprite doit "does not display the menu item" dowithin '#more-menu', visible: false do- expect(page).not_to have_link boards+ expect(page).to have_no_link boardsendendenddiff --git a/modules/boards/spec/features/support/board_index_page.rb b/modules/boards/spec/features/support/board_index_page.rbindex 8647aae07a2..3bc10cbd10f 100644--- a/modules/boards/spec/features/support/board_index_page.rb+++ b/modules/boards/spec/features/support/board_index_page.rb@@ -73,10 +73,10 @@ module Pagesnew_board_page.click_on_submitif expect_empty- expect(page).to have_selector('.boards-list--add-item-text', wait: 10)- expect(page).not_to have_selector('.boards-list--item')+ expect(page).to have_css('.boards-list--add-item-text', wait: 10)+ expect(page).to have_no_css('.boards-list--item')else- expect(page).to have_selector('.boards-list--item', wait: 10)+ expect(page).to have_css('.boards-list--item', wait: 10)end::Pages::Board.new ::Boards::Grid.lastdiff --git a/modules/boards/spec/features/support/board_list_page.rb b/modules/boards/spec/features/support/board_list_page.rbindex 8830ae0f327..3696969947d 100644--- a/modules/boards/spec/features/support/board_list_page.rb+++ b/modules/boards/spec/features/support/board_list_page.rb@@ -42,14 +42,14 @@ module Pagesdef expect_no_create_buttonwithin '.toolbar-items' do- expect(page).not_to have_link 'Board'+ expect(page).to have_no_link 'Board'endenddef expect_delete_buttons(*boards)within '#content-wrapper' doboards.each do |board|- expect(page).to have_selector "[data-test-selector='board-remove-#{board.id}']"+ expect(page).to have_css "[data-test-selector='board-remove-#{board.id}']"endendend@@ -57,7 +57,7 @@ module Pagesdef expect_no_delete_buttons(*boards)within '#content-wrapper' doboards.each do |board|- expect(page).not_to have_selector "[data-test-selector='board-remove-#{board.id}']"+ expect(page).to have_no_css "[data-test-selector='board-remove-#{board.id}']"endendend@@ -67,7 +67,7 @@ module Pageswithin '#content-wrapper' doexpected_board_names.each do |board_name|- expect(page).to have_selector("td.name", text: board_name)+ expect(page).to have_css("td.name", text: board_name)endendend@@ -86,7 +86,7 @@ module Pageswithin '#content-wrapper' dounexpected_board_names.each do |board_name|- expect(page).not_to have_selector("td.title", text: board_name)+ expect(page).to have_no_css("td.title", text: board_name)endendend@@ -102,7 +102,7 @@ module Pagesenddef expect_to_be_on_page(number)- expect(page).to have_selector('.op-pagination--item_current', text: number)+ expect(page).to have_css('.op-pagination--item_current', text: number)enddef to_page(number)diff --git a/modules/boards/spec/features/support/board_overview_page.rb b/modules/boards/spec/features/support/board_overview_page.rbindex 5661d72b4aa..7a71af131b9 100644--- a/modules/boards/spec/features/support/board_overview_page.rb+++ b/modules/boards/spec/features/support/board_overview_page.rb@@ -37,7 +37,7 @@ module Pagesdef expect_global_menu_item_selectedwithin '#main-menu' do- expect(page).to have_selector('.selected', text: 'Boards')+ expect(page).to have_css('.selected', text: 'Boards')endendenddiff --git a/modules/boards/spec/features/support/board_page.rb b/modules/boards/spec/features/support/board_page.rbindex 58ddf172106..e5fd3f0ebc3 100644--- a/modules/boards/spec/features/support/board_page.rb+++ b/modules/boards/spec/features/support/board_page.rb@@ -27,7 +27,6 @@#++require 'support/pages/page'-require_relative './board_page'module Pagesclass Board < Page@@ -130,7 +129,7 @@ module Pagesquery: work_package.subject,results_selector: '.work-packages-partitioned-query-space--container')- expect(target_dropdown).not_to have_selector('.ui-menu-item', text: work_package.subject)+ expect(target_dropdown).to have_no_css('.ui-menu-item', text: work_package.subject)end##@@ -159,7 +158,7 @@ module Pagesdef expect_movable(list_name, card_title, movable: true)within_list(list_name) do- expect(page).to have_selector('[data-test-selector="op-wp-single-card"]', text: card_title)+ expect(page).to have_css('[data-test-selector="op-wp-single-card"]', text: card_title)expect(page).to have_conditional_selector(movable,'[data-test-selector="op-wp-single-card"][data-qa-draggable]',text: card_title)@@ -177,8 +176,8 @@ module Pages# wait for reload of lists to start and finish# Not sure if that's the most reliable way to do it, but there is nothing visible# about the PATCH request being sent and executed successfully after moving a card.- expect(page).to have_selector('.op-loading-indicator', wait: 5)- expect(page).not_to have_selector('.op-loading-indicator')+ expect(page).to have_css('.op-loading-indicator', wait: 5)+ expect(page).to have_no_css('.op-loading-indicator')enddef add_list(option: nil, query: option)@@ -190,7 +189,7 @@ module Pagesif option.nil?page.find('.boards-list--add-item').click- expect(page).to have_selector('[data-test-selector="op-board-list"]', count: count + 1)+ expect(page).to have_css('[data-test-selector="op-board-list"]', count: count + 1)elseopen_and_fill_add_list_modal querypage.find('.ng-option', text: option, wait: 10).click@@ -210,23 +209,23 @@ module Pagesenddef expect_changed- expect(page).to have_selector('.editable-toolbar-title--save')+ expect(page).to have_css('.editable-toolbar-title--save')enddef expect_not_changed- expect(page).not_to have_selector('.editable-toolbar-title--save')+ expect(page).to have_no_css('.editable-toolbar-title--save')enddef expect_list(name)- expect(page).to have_selector('[data-test-selector="op-board-list--header"]', text: name, wait: 10)+ expect(page).to have_css('[data-test-selector="op-board-list--header"]', text: name, wait: 10)enddef expect_no_list(name)- expect(page).not_to have_selector('[data-test-selector="op-board-list--header"]', text: name)+ expect(page).to have_no_css('[data-test-selector="op-board-list--header"]', text: name)enddef expect_empty- expect(page).not_to have_selector('.boards-list--item', wait: 10)+ expect(page).to have_no_css('.boards-list--item', wait: 10)enddef remove_list(name)@@ -235,7 +234,7 @@ module Pagesaccept_alert_dialog!expect_and_dismiss_toaster message: I18n.t('js.notice_successful_update')- expect(page).not_to have_selector list_selector(name)+ expect(page).to have_no_selector list_selector(name)enddef click_list_dropdown(list_name, action)@@ -255,9 +254,9 @@ module Pagesopen_and_fill_add_list_modal nameif present- expect(page).to have_selector('.ng-option', text: name)+ expect(page).to have_css('.ng-option', text: name)else- expect(page).not_to have_selector('.ng-option', text: name)+ expect(page).to have_no_css('.ng-option', text: name)endfind('body').send_keys [:escape]end@@ -334,7 +333,7 @@ module Pagesif editableexpect(page).to have_field('editable-toolbar-title', with: name)else- expect(page).to have_selector('.editable-toolbar-title--fixed', text: name)+ expect(page).to have_css('.editable-toolbar-title--fixed', text: name)endend@@ -358,7 +357,7 @@ module Pagesdef open_add_list_modalpage.find('.boards-list--add-item').click- expect(page).to have_selector('.new-list--action-select input')+ expect(page).to have_css('.new-list--action-select input')enddef add_list_modal_shows_warning(value, with_link: false)diff --git a/modules/boards/spec/queries/grids/query_integration_spec.rb b/modules/boards/spec/queries/grids/query_integration_spec.rbindex 2688f32feda..7c2463d6bb0 100644--- a/modules/boards/spec/queries/grids/query_integration_spec.rb+++ b/modules/boards/spec/queries/grids/query_integration_spec.rb@@ -56,7 +56,7 @@ RSpec.describe Grids::Query, type: :model docontext 'without a filter' dodescribe '#results' doit 'is the same as getting all the boards visible to the user' do- expect(instance.results).to match_array [board_grid]+ expect(instance.results).to contain_exactly(board_grid)endendend@@ -69,7 +69,7 @@ RSpec.describe Grids::Query, type: :model dodescribe '#results' doit 'yields boards assigned to the project' do- expect(instance.results).to match_array [board_grid]+ expect(instance.results).to contain_exactly(board_grid)endenddiff --git a/modules/boards/spec/requests/api/v3/grids/grids_resource_spec.rb b/modules/boards/spec/requests/api/v3/grids/grids_resource_spec.rbindex 986326b28a4..55de32fde4c 100644--- a/modules/boards/spec/requests/api/v3/grids/grids_resource_spec.rb+++ b/modules/boards/spec/requests/api/v3/grids/grids_resource_spec.rb@@ -259,8 +259,7 @@ RSpec.describe 'API v3 Grids resource for Board Grids', content_type: :json doexpect(subject.status).to eq 422expect(JSON.parse(subject.body)['_embedded']['errors'].map { |e| e['message'] })- .to match_array ["Widgets is outside of the grid.",- "Number of rows must be greater than 0."]+ .to contain_exactly("Widgets is outside of the grid.", "Number of rows must be greater than 0.")endit 'does not persist the changes to widgets' do@@ -391,9 +390,8 @@ RSpec.describe 'API v3 Grids resource for Board Grids', content_type: :json do.at_path('_type')expect(JSON.parse(subject.body)['_embedded']['errors'].map { |e| e['message'] })- .to match_array ["Widgets is outside of the grid.",- "Number of rows must be greater than 0.",- "Number of columns must be greater than 0."]+ .to contain_exactly("Widgets is outside of the grid.", "Number of rows must be greater than 0.",+ "Number of columns must be greater than 0.")endenddiff --git a/modules/boards/spec/services/copy_service_integration_spec.rb b/modules/boards/spec/services/copy_service_integration_spec.rbindex 5682ae157df..1213dbe45f3 100644--- a/modules/boards/spec/services/copy_service_integration_spec.rb+++ b/modules/boards/spec/services/copy_service_integration_spec.rb@@ -76,7 +76,7 @@ RSpec.describe Projects::CopyService, 'integration', type: :model doquery.save!end- it 'will succeed to copy, but add an error for the missing subproject column (Regression #34550)' do+ it 'succeeds to copy, but add an error for the missing subproject column (Regression #34550)' do# Expect to have created to board, but with errorexpect(subject).to be_successexpect(subject.errors.full_messages).to eq([expected_error])@@ -101,7 +101,7 @@ RSpec.describe Projects::CopyService, 'integration', type: :model doenddescribe 'call' do- it 'will copy the boards with the order correct' do+ it 'copies the boards with the order correct' doexpect(subject).to be_successexpect(board_copies.count).to eq 1diff --git a/modules/budgets/app/models/budget.rb b/modules/budgets/app/models/budget.rbindex 22de1755b48..cc7f457941c 100644--- a/modules/budgets/app/models/budget.rb+++ b/modules/budgets/app/models/budget.rb@@ -224,13 +224,13 @@ class Budget < ApplicationRecorddef update_budget_item_attributes(budget_item_attributes, type:)return unless edit_allowed?- budget_items = send("#{type}_budget_items")+ budget_items = send(:"#{type}_budget_items")budget_items.reject(&:new_record?).each do |budget_item|attributes = budget_item_attributes[budget_item.id.to_s.to_sym]- send("correct_#{type}_attributes!", attributes)+ send(:"correct_#{type}_attributes!", attributes)- if send("valid_#{type}_budget_attributes?", attributes)+ if send(:"valid_#{type}_budget_attributes?", attributes)budget_item.attributes = attributeselse# This is surprising as it will delete right away compared to thediff --git a/modules/budgets/app/models/queries/work_packages/filter/budget_filter.rb b/modules/budgets/app/models/queries/work_packages/filter/budget_filter.rbindex cfdae6b0ad7..2d68c93a9d9 100644--- a/modules/budgets/app/models/queries/work_packages/filter/budget_filter.rb+++ b/modules/budgets/app/models/queries/work_packages/filter/budget_filter.rb@@ -58,7 +58,6 @@ module Queries::WorkPackages::Filtervalues.filter_map { |budget_id| available_budgets[budget_id.to_i] }-enddef human_namediff --git a/modules/budgets/spec/factories/labor_budget_item_factory.rb b/modules/budgets/spec/factories/labor_budget_item_factory.rbindex 967f89b0b07..fc011c63617 100644--- a/modules/budgets/spec/factories/labor_budget_item_factory.rb+++ b/modules/budgets/spec/factories/labor_budget_item_factory.rb@@ -28,8 +28,8 @@FactoryBot.define dofactory :labor_budget_item do- association :user, factory: :user- association :budget, factory: :budget+ association :user+ association :budgethours { 0.0 }endenddiff --git a/modules/budgets/spec/factories/material_budget_item_factory.rb b/modules/budgets/spec/factories/material_budget_item_factory.rbindex 1b8e778842f..62965ea6d31 100644--- a/modules/budgets/spec/factories/material_budget_item_factory.rb+++ b/modules/budgets/spec/factories/material_budget_item_factory.rb@@ -28,8 +28,8 @@FactoryBot.define dofactory :material_budget_item do- association :cost_type, factory: :cost_type- association :budget, factory: :budget+ association :cost_type+ association :budgetunits { 0.0 }endenddiff --git a/modules/budgets/spec/features/budgets/add_budget_spec.rb b/modules/budgets/spec/features/budgets/add_budget_spec.rbindex 60857662ceb..78f68e470ae 100644--- a/modules/budgets/spec/features/budgets/add_budget_spec.rb+++ b/modules/budgets/spec/features/budgets/add_budget_spec.rb@@ -28,7 +28,7 @@require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')-RSpec.describe 'adding a new budget', js: true do+RSpec.describe 'adding a new budget', :js dolet(:project) { create(:project_with_types, members: project_members) }let(:user) { create(:admin) }let(:project_members) { {} }@@ -73,8 +73,8 @@ RSpec.describe 'adding a new budget', js: true doexpect(page).to have_content "Successful creation"expect(page).to have_content "My subject"- expect(page).to have_selector('.material_budget_items td.units', text: '15.00')- expect(page).to have_selector('.material_budget_items td', text: 'Foobar')+ expect(page).to have_css('.material_budget_items td.units', text: '15.00')+ expect(page).to have_css('.material_budget_items td', text: 'Foobar')endend@@ -161,13 +161,13 @@ RSpec.describe 'adding a new budget', js: true doexpect(page).to have_content('Successful creation')new_budget_page.toggle_unit_costs!- expect(page).to have_selector('td.currency', text: '150.00 EUR')+ expect(page).to have_css('td.currency', text: '150.00 EUR')expect(new_budget_page.unit_costs_at(1)).to have_content '150.00 EUR'expect(new_budget_page.unit_costs_at(2)).to have_content '100.00 EUR'expect(new_budget_page.overall_unit_costs).to have_content '250.00 EUR'new_budget_page.toggle_labor_costs!- expect(page).to have_selector('td.currency', text: '125.00 EUR')+ expect(page).to have_css('td.currency', text: '125.00 EUR')expect(new_budget_page.labor_costs_at(1)).to have_content '125.00 EUR'expect(new_budget_page.labor_costs_at(2)).to have_content '50.00 EUR'expect(new_budget_page.overall_labor_costs).to have_content '175.00 EUR'diff --git a/modules/budgets/spec/features/budgets/attachment_upload_spec.rb b/modules/budgets/spec/features/budgets/attachment_upload_spec.rbindex 0079c661900..1c53a46b48f 100644--- a/modules/budgets/spec/features/budgets/attachment_upload_spec.rb+++ b/modules/budgets/spec/features/budgets/attachment_upload_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'features/page_objects/notification'-RSpec.describe 'Upload attachment to budget', js: true do+RSpec.describe 'Upload attachment to budget', :js dolet(:user) docreate(:user, member_with_permissions: { project => %i[view_budgets edit_budgets] })end@@ -59,7 +59,7 @@ RSpec.describe 'Upload attachment to budget', js: true doclick_on 'Create'- expect(page).to have_selector('#content img', count: 1)+ expect(page).to have_css('#content img', count: 1)expect(page).to have_content('Image uploaded on creation')attachments_list.expect_attached('image.png')@@ -73,7 +73,7 @@ RSpec.describe 'Upload attachment to budget', js: true doclick_on 'Submit'- expect(page).to have_selector('#content img', count: 2)+ expect(page).to have_css('#content img', count: 2)expect(page).to have_content('Image uploaded on creation')expect(page).to have_content('Image uploaded the second time')attachments_list.expect_attached('image.png', count: 2)diff --git a/modules/budgets/spec/features/budgets/copy_budget_spec.rb b/modules/budgets/spec/features/budgets/copy_budget_spec.rbindex ed4800467fa..98deeba1488 100644--- a/modules/budgets/spec/features/budgets/copy_budget_spec.rb+++ b/modules/budgets/spec/features/budgets/copy_budget_spec.rb@@ -28,7 +28,7 @@require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')-RSpec.describe 'Copying a budget', js: true do+RSpec.describe 'Copying a budget', :js dolet(:project) { create(:project, enabled_module_names: %i[budgets costs]) }let(:current_user) docreate(:user,@@ -91,6 +91,6 @@ RSpec.describe 'Copying a budget', js: true dobudget_page.expect_toast message: 'Successful creation.'expect(page)- .to have_selector('.author', text: current_user.name)+ .to have_css('.author', text: current_user.name)endenddiff --git a/modules/budgets/spec/features/budgets/delete_budget_spec.rb b/modules/budgets/spec/features/budgets/delete_budget_spec.rbindex cdbeda2a0a2..283f43ee024 100644--- a/modules/budgets/spec/features/budgets/delete_budget_spec.rb+++ b/modules/budgets/spec/features/budgets/delete_budget_spec.rb@@ -28,7 +28,7 @@require File.expand_path("#{File.dirname(__FILE__)}/../../spec_helper.rb")-RSpec.describe 'Deleting a budget', js: true do+RSpec.describe 'Deleting a budget', :js dolet(:project) { create(:project, enabled_module_names: %i[budgets costs]) }let(:user) { create(:admin) }let(:budget_subject) { "A budget subject" }diff --git a/modules/budgets/spec/features/budgets/update_budget_spec.rb b/modules/budgets/spec/features/budgets/update_budget_spec.rbindex bc2b4ae19e3..1260754d9b0 100644--- a/modules/budgets/spec/features/budgets/update_budget_spec.rb+++ b/modules/budgets/spec/features/budgets/update_budget_spec.rb@@ -28,7 +28,7 @@require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')-RSpec.describe 'updating a budget', js: true do+RSpec.describe 'updating a budget', :js dolet(:project) docreate(:project_with_types,enabled_module_names: %i[budgets costs work_package_tracking],@@ -62,11 +62,11 @@ RSpec.describe 'updating a budget', js: true doexpect(budget_page).to have_content('Successful update')budget_page.toggle_unit_costs!- expect(page).to have_selector('tbody td.currency', text: '150.00 EUR')+ expect(page).to have_css('tbody td.currency', text: '150.00 EUR')expect(budget_page.overall_unit_costs).to have_content '150.00 EUR'budget_page.toggle_labor_costs!- expect(page).to have_selector('tbody td.currency', text: '125.00 EUR')+ expect(page).to have_css('tbody td.currency', text: '125.00 EUR')expect(budget_page.labor_costs_at(1)).to have_content '125.00 EUR'expect(budget_page.overall_labor_costs).to have_content '125.00 EUR'end@@ -125,12 +125,12 @@ RSpec.describe 'updating a budget', js: true doexpect(budget_page).to have_content('Successful update')budget_page.toggle_unit_costs!- expect(page).to have_selector('tbody td.currency', text: '250.00 EUR')+ expect(page).to have_css('tbody td.currency', text: '250.00 EUR')expect(budget_page.unit_costs_at(1)).to have_content '250.00 EUR'expect(budget_page.overall_unit_costs).to have_content '250.00 EUR'budget_page.toggle_labor_costs!- expect(page).to have_selector('tbody td.currency', text: '75.00 EUR')+ expect(page).to have_css('tbody td.currency', text: '75.00 EUR')expect(budget_page.labor_costs_at(1)).to have_content '75.00 EUR'expect(budget_page.overall_labor_costs).to have_content '75.00 EUR'end@@ -165,9 +165,9 @@ RSpec.describe 'updating a budget', js: true doclick_on 'OK'expect(budget_page).to have_content(I18n.t(:notice_successful_update, locale: :de))- expect(page).to have_selector('tbody td.currency', text: '150,00 EUR')- expect(page).to have_selector('tbody td.currency', text: '1.000,00 EUR')- expect(page).to have_selector('tbody td.currency', text: '125,00 EUR')+ expect(page).to have_css('tbody td.currency', text: '150,00 EUR')+ expect(page).to have_css('tbody td.currency', text: '1.000,00 EUR')+ expect(page).to have_css('tbody td.currency', text: '125,00 EUR')endend@@ -186,15 +186,15 @@ RSpec.describe 'updating a budget', js: true do# Update first elementbudget_page.edit_planned_costs! material_budget_item.id, type: :material, costs: 123expect(budget_page).to have_content('Successful update')- expect(page).to have_selector('tbody td.currency', text: '123.00 EUR')+ expect(page).to have_css('tbody td.currency', text: '123.00 EUR')click_on 'Update'# Update second elementbudget_page.edit_planned_costs! material_budget_item_2.id, type: :material, costs: 543expect(budget_page).to have_content('Successful update')- expect(page).to have_selector('tbody td.currency', text: '123.00 EUR')- expect(page).to have_selector('tbody td.currency', text: '543.00 EUR')+ expect(page).to have_css('tbody td.currency', text: '123.00 EUR')+ expect(page).to have_css('tbody td.currency', text: '543.00 EUR')# Expect overridden costs on bothmaterial_budget_item.reload@@ -223,15 +223,15 @@ RSpec.describe 'updating a budget', js: true do# Update first elementbudget_page.edit_planned_costs! material_budget_item.id, type: :material, costs: 123expect(budget_page).to have_content('Successful update')- expect(page).to have_selector('tbody td.currency', text: 'USD 123.00')+ expect(page).to have_css('tbody td.currency', text: 'USD 123.00')click_on 'Update'# Update second elementbudget_page.edit_planned_costs! material_budget_item_2.id, type: :material, costs: 543expect(budget_page).to have_content('Successful update')- expect(page).to have_selector('tbody td.currency', text: 'USD 123.00')- expect(page).to have_selector('tbody td.currency', text: 'USD 543.00')+ expect(page).to have_css('tbody td.currency', text: 'USD 123.00')+ expect(page).to have_css('tbody td.currency', text: 'USD 543.00')# Expect overridden costs on bothmaterial_budget_item.reload@@ -263,15 +263,15 @@ RSpec.describe 'updating a budget', js: true do# Update first elementbudget_page.edit_planned_costs! labor_budget_item.id, type: :labor, costs: 456expect(budget_page).to have_content('Successful update')- expect(page).to have_selector('tbody td.currency', text: '456.00 EUR')+ expect(page).to have_css('tbody td.currency', text: '456.00 EUR')click_on 'Update'# Update second elementbudget_page.edit_planned_costs! labor_budget_item_2.id, type: :labor, costs: 987expect(budget_page).to have_content('Successful update')- expect(page).to have_selector('tbody td.currency', text: '456.00 EUR')- expect(page).to have_selector('tbody td.currency', text: '987.00 EUR')+ expect(page).to have_css('tbody td.currency', text: '456.00 EUR')+ expect(page).to have_css('tbody td.currency', text: '987.00 EUR')# Expect overridden costs on bothlabor_budget_item.reload@@ -300,15 +300,15 @@ RSpec.describe 'updating a budget', js: true do# Update first elementbudget_page.edit_planned_costs! labor_budget_item.id, type: :labor, costs: 456expect(budget_page).to have_content('Successful update')- expect(page).to have_selector('tbody td.currency', text: 'USD 456.00')+ expect(page).to have_css('tbody td.currency', text: 'USD 456.00')click_on 'Update'# Update second elementbudget_page.edit_planned_costs! labor_budget_item_2.id, type: :labor, costs: 987expect(budget_page).to have_content('Successful update')- expect(page).to have_selector('tbody td.currency', text: 'USD 456.00')- expect(page).to have_selector('tbody td.currency', text: 'USD 987.00')+ expect(page).to have_css('tbody td.currency', text: 'USD 456.00')+ expect(page).to have_css('tbody td.currency', text: 'USD 987.00')# Expect overridden costs on bothlabor_budget_item.reload@@ -333,7 +333,7 @@ RSpec.describe 'updating a budget', js: true dopage.find("#budget_existing_labor_budget_item_attributes_#{labor_budget_item.id} a.delete-budget-item").clickclick_on 'Submit'- expect(budget_page.labor_costs_at(1)).not_to have_content '125.00 EUR'+ expect(budget_page.labor_costs_at(1)).to have_no_content '125.00 EUR'endendenddiff --git a/modules/budgets/spec/features/costs_edit_fields_spec.rb b/modules/budgets/spec/features/costs_edit_fields_spec.rbindex 43d00887efd..0e90b5c23c6 100644--- a/modules/budgets/spec/features/costs_edit_fields_spec.rb+++ b/modules/budgets/spec/features/costs_edit_fields_spec.rb@@ -28,7 +28,7 @@require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb')-RSpec.describe 'Work Package budget fields', js: true do+RSpec.describe 'Work Package budget fields', :js dolet(:type_task) { create(:type_task) }let!(:status) { create(:status, is_default: true) }let!(:priority) { create(:priority, is_default: true) }@@ -46,10 +46,10 @@ RSpec.describe 'Work Package budget fields', js: true doit 'does not show read-only fields and allows setting the budget' docreate_page.visit!- expect(page).to have_selector('.inline-edit--container.budget')- expect(page).not_to have_selector('.inline-edit--container.laborCosts')- expect(page).not_to have_selector('.inline-edit--container.materialCosts')- expect(page).not_to have_selector('.inline-edit--container.overallCosts')+ expect(page).to have_css('.inline-edit--container.budget')+ expect(page).to have_no_css('.inline-edit--container.laborCosts')+ expect(page).to have_no_css('.inline-edit--container.materialCosts')+ expect(page).to have_no_css('.inline-edit--container.overallCosts')field = create_page.edit_field(:budget)field.set_value budget.namediff --git a/modules/budgets/spec/features/work_package_filter_spec.rb b/modules/budgets/spec/features/work_package_filter_spec.rbindex 2a2a4c7b8d5..b21a5d93a60 100644--- a/modules/budgets/spec/features/work_package_filter_spec.rb+++ b/modules/budgets/spec/features/work_package_filter_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Filter by budget', js: true do+RSpec.describe 'Filter by budget', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }diff --git a/modules/budgets/spec/support/pages/destroy_info.rb b/modules/budgets/spec/support/pages/destroy_info.rbindex f6d14b7801c..7bfab77bdc0 100644--- a/modules/budgets/spec/support/pages/destroy_info.rb+++ b/modules/budgets/spec/support/pages/destroy_info.rb@@ -48,7 +48,7 @@ module Pagesdef expect_no_reassign_optionexpect(page)- .not_to have_field('todo_reassign')+ .to have_no_field('todo_reassign')enddef select_reassign_option(budget_name)diff --git a/modules/budgets/spec/support/pages/index_budget.rb b/modules/budgets/spec/support/pages/index_budget.rbindex 9c2a056795d..228e18a37fd 100644--- a/modules/budgets/spec/support/pages/index_budget.rb+++ b/modules/budgets/spec/support/pages/index_budget.rb@@ -38,7 +38,7 @@ module Pagesdef expect_budget_not_listed(budget_name)expect(page)- .not_to have_content(budget_name)+ .to have_no_content(budget_name)enddef pathdiff --git a/modules/calendar/app/models/ical_token_query_assignment.rb b/modules/calendar/app/models/ical_token_query_assignment.rbindex a7a5de5c1c7..6dbbb977037 100644--- a/modules/calendar/app/models/ical_token_query_assignment.rb+++ b/modules/calendar/app/models/ical_token_query_assignment.rb@@ -29,11 +29,8 @@class ICalTokenQueryAssignment < ApplicationRecordself.table_name = 'ical_token_query_assignments'- # rubocop:disable Rails/BelongsTobelongs_to :ical_token, class_name: 'Token::ICal', optional: truebelongs_to :query, optional: true- # rubocop:enable Rails/BelongsTo-validates :name, presence: truevalidate :unique_name_per_user_and_querydiff --git a/modules/calendar/app/services/calendar/create_ical_service.rb b/modules/calendar/app/services/calendar/create_ical_service.rbindex b553e89c646..d8cbffc0c2b 100644--- a/modules/calendar/app/services/calendar/create_ical_service.rb+++ b/modules/calendar/app/services/calendar/create_ical_service.rb@@ -68,7 +68,7 @@ module Calendarlocationdescription].each do |value|- event.send("#{value}=", send("#{value}_value", work_package))+ event.send(:"#{value}=", send(:"#{value}_value", work_package))endevent@@ -92,7 +92,7 @@ module Calendarenddef start_date(work_package)- (work_package.start_date.presence || work_package.due_date)+ work_package.start_date.presence || work_package.due_dateenddef dtend_value(work_package)diff --git a/modules/calendar/spec/features/calendar_create_work_package_spec.rb b/modules/calendar/spec/features/calendar_create_work_package_spec.rbindex 52ed74681b4..2b86b6e033f 100644--- a/modules/calendar/spec/features/calendar_create_work_package_spec.rb+++ b/modules/calendar/spec/features/calendar_create_work_package_spec.rb@@ -27,9 +27,9 @@#++require 'spec_helper'-require_relative './shared_context'+require_relative 'shared_context'-RSpec.describe 'Calendar create new work package', js: true do+RSpec.describe 'Calendar create new work package', :js doinclude_context 'with calendar full access'let(:type_task) { create(:type_task) }diff --git a/modules/calendar/spec/features/calendar_dates_spec.rb b/modules/calendar/spec/features/calendar_dates_spec.rbindex 77ee81f16a4..662cd88006c 100644--- a/modules/calendar/spec/features/calendar_dates_spec.rb+++ b/modules/calendar/spec/features/calendar_dates_spec.rb@@ -51,22 +51,22 @@ RSpec.describe 'Calendar non working days', :js, :with_cuprite doexpect(page).to have_css('.fc-day-sat.fc-non-working-day', minimum: 1, wait: 10)expect(page).to have_css('.fc-day-sun.fc-non-working-day', minimum: 1)- expect(page).not_to have_css('.fc-day-mon.fc-non-working-day')- expect(page).not_to have_css('.fc-day-tue.fc-non-working-day')- expect(page).not_to have_css('.fc-day-wed.fc-non-working-day')- expect(page).not_to have_css('.fc-day-thu.fc-non-working-day')- expect(page).not_to have_css('.fc-day-fri.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-mon.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-tue.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-wed.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-thu.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-fri.fc-non-working-day')find('.fc-next-button').clickexpect(page).to have_css('.fc-day-sat.fc-non-working-day', minimum: 1, wait: 10)expect(page).to have_css('.fc-day-sun.fc-non-working-day', minimum: 1)- expect(page).not_to have_css('.fc-day-mon.fc-non-working-day')- expect(page).not_to have_css('.fc-day-tue.fc-non-working-day')- expect(page).not_to have_css('.fc-day-wed.fc-non-working-day')- expect(page).not_to have_css('.fc-day-thu.fc-non-working-day')- expect(page).not_to have_css('.fc-day-fri.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-mon.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-tue.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-wed.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-thu.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-fri.fc-non-working-day')endenddiff --git a/modules/calendar/spec/features/calendar_project_include_spec.rb b/modules/calendar/spec/features/calendar_project_include_spec.rbindex 91efafc584b..f34008cb72a 100644--- a/modules/calendar/spec/features/calendar_project_include_spec.rb+++ b/modules/calendar/spec/features/calendar_project_include_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require 'features/work_packages/project_include/project_include_shared_examples'require_relative '../support/pages/calendar'-RSpec.describe 'Calendar project include', js: true do+RSpec.describe 'Calendar project include', :js doshared_let(:enabled_modules) { %w[work_package_tracking calendar_view] }shared_let(:permissions) do%i[view_work_packages view_calendar edit_work_packages add_work_packages save_queries manage_public_queries]diff --git a/modules/calendar/spec/features/calendar_sharing_spec.rb b/modules/calendar/spec/features/calendar_sharing_spec.rbindex fd5ed82efa3..d8b93697ad5 100644--- a/modules/calendar/spec/features/calendar_sharing_spec.rb+++ b/modules/calendar/spec/features/calendar_sharing_spec.rb@@ -109,7 +109,7 @@ RSpec.describe 'Calendar sharing via ical', :js dopage.click_button("Subscribe to calendar")# modal should not be shown- expect(page).not_to have_css('.spot-modal--header', text: "Subscribe to calendar")+ expect(page).to have_no_css('.spot-modal--header', text: "Subscribe to calendar")endendend@@ -155,7 +155,7 @@ RSpec.describe 'Calendar sharing via ical', :js dopage.click_button("Subscribe to calendar")# modal should not be shown- expect(page).not_to have_css('.spot-modal--header', text: "Subscribe to calendar")+ expect(page).to have_no_css('.spot-modal--header', text: "Subscribe to calendar")endendend@@ -199,7 +199,7 @@ RSpec.describe 'Calendar sharing via ical', :js doclick_button "Cancel"- expect(page).not_to have_css('.spot-modal--header', text: "Subscribe to calendar")+ expect(page).to have_no_css('.spot-modal--header', text: "Subscribe to calendar")endit 'successfully requests a new tokenized iCalendar URL when a unique name is provided' do@@ -210,7 +210,7 @@ RSpec.describe 'Calendar sharing via ical', :js doclick_button "Copy URL"# implicitly testing for success -> modal is closed and fallback message is shown- expect(page).not_to have_css('.spot-modal--header', text: "Subscribe to calendar")+ expect(page).to have_no_css('.spot-modal--header', text: "Subscribe to calendar")expect(page).to have_content("/projects/#{saved_query.project.id}/calendars/#{saved_query.id}/ical?ical_token=")# explictly testing for success message is not working in test env, probably@@ -242,7 +242,7 @@ RSpec.describe 'Calendar sharing via ical', :js doclick_button "Copy URL"- expect(page).not_to have_css('.spot-modal--header', text: "Subscribe to calendar")+ expect(page).to have_no_css('.spot-modal--header', text: "Subscribe to calendar")expect(page).to have_content("/projects/#{saved_query.project.id}/calendars/#{saved_query.id}/ical?ical_token=")# do the same thing again, now expect validation error@@ -309,7 +309,7 @@ RSpec.describe 'Calendar sharing via ical', :js dopage.click_button("Subscribe to calendar")# modal should not be shown- expect(page).not_to have_css('.spot-modal--header', text: "Subscribe to calendar")+ expect(page).to have_no_css('.spot-modal--header', text: "Subscribe to calendar")endendenddiff --git a/modules/calendar/spec/features/calendar_widget_spec.rb b/modules/calendar/spec/features/calendar_widget_spec.rbindex 7e52cb32caf..89e08d07faf 100644--- a/modules/calendar/spec/features/calendar_widget_spec.rb+++ b/modules/calendar/spec/features/calendar_widget_spec.rb@@ -78,7 +78,7 @@ RSpec.describe 'Calendar Widget', :js, :with_cuprite, with_settings: { start_of_overview_page.expect_and_dismiss_toaster message: I18n.t('js.notice_successful_update')- expect(page).to have_selector('.fc-event-title', text: work_package.subject)+ expect(page).to have_css('.fc-event-title', text: work_package.subject)calendar.resize_date(work_package, work_package.due_date - 1.day)overview_page.expect_and_dismiss_toaster message: I18n.t('js.notice_successful_update')diff --git a/modules/calendar/spec/features/calendars_spec.rb b/modules/calendar/spec/features/calendars_spec.rbindex f4171861245..7edd7505e2e 100644--- a/modules/calendar/spec/features/calendars_spec.rb+++ b/modules/calendar/spec/features/calendars_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Work package calendars', js: true do+RSpec.describe 'Work package calendars', :js dolet(:project) { create(:project) }let(:user) docreate(:user,@@ -86,13 +86,13 @@ RSpec.describe 'Work package calendars', js: true do# should open the calendar with the current month displayedexpect(page)- .to have_selector '.fc-event-title', text: current_work_package.subject+ .to have_css '.fc-event-title', text: current_work_package.subjectexpect(page)- .to have_selector '.fc-event-title', text: another_current_work_package.subject+ .to have_css '.fc-event-title', text: another_current_work_package.subjectexpect(page)- .not_to have_selector '.fc-event-title', text: future_work_package.subject+ .to have_no_css '.fc-event-title', text: future_work_package.subjectexpect(page)- .not_to have_selector '.fc-event-title', text: another_future_work_package.subject+ .to have_no_css '.fc-event-title', text: another_future_work_package.subjectfilters.expect_filter_count 1@@ -105,9 +105,9 @@ RSpec.describe 'Work package calendars', js: true do# non matching work packages are no longer displayedexpect(page)- .not_to have_selector '.fc-event-title', text: current_work_package.subject+ .to have_no_css '.fc-event-title', text: current_work_package.subjectexpect(page)- .to have_selector '.fc-event-title', text: another_current_work_package.subject+ .to have_css '.fc-event-title', text: another_current_work_package.subject# The filter for the time frame added implicitly should not be visiblefilters.expect_filter_count 2@@ -116,25 +116,25 @@ RSpec.describe 'Work package calendars', js: true dofind('.fc-next-button').clickexpect(page)- .not_to have_selector '.fc-event-title', text: current_work_package.subject+ .to have_no_css '.fc-event-title', text: current_work_package.subjectexpect(page)- .not_to have_selector '.fc-event-title', text: another_current_work_package.subject+ .to have_no_css '.fc-event-title', text: another_current_work_package.subjectexpect(page)- .not_to have_selector '.fc-event-title', text: future_work_package.subject+ .to have_no_css '.fc-event-title', text: future_work_package.subjectexpect(page)- .to have_selector '.fc-event-title', text: another_future_work_package.subject+ .to have_css '.fc-event-title', text: another_future_work_package.subject# removing the filter will show the event againfilters.remove_filter 'subject'expect(page)- .not_to have_selector '.fc-event-title', text: current_work_package.subject+ .to have_no_css '.fc-event-title', text: current_work_package.subjectexpect(page)- .not_to have_selector '.fc-event-title', text: another_current_work_package.subject+ .to have_no_css '.fc-event-title', text: another_current_work_package.subjectexpect(page)- .to have_selector '.fc-event-title', text: future_work_package.subject+ .to have_css '.fc-event-title', text: future_work_package.subjectexpect(page)- .to have_selector '.fc-event-title', text: another_future_work_package.subject+ .to have_css '.fc-event-title', text: another_future_work_package.subjectfuture_url = current_url@@ -142,37 +142,37 @@ RSpec.describe 'Work package calendars', js: true dofind('.fc-prev-button').clickexpect(page)- .to have_selector '.fc-event-title', text: current_work_package.subject+ .to have_css '.fc-event-title', text: current_work_package.subjectexpect(page)- .to have_selector '.fc-event-title', text: another_current_work_package.subject+ .to have_css '.fc-event-title', text: another_current_work_package.subjectexpect(page)- .not_to have_selector '.fc-event-title', text: future_work_package.subject+ .to have_no_css '.fc-event-title', text: future_work_package.subjectexpect(page)- .not_to have_selector '.fc-event-title', text: another_future_work_package.subject+ .to have_no_css '.fc-event-title', text: another_future_work_package.subject# open the page via the url should show the next month againvisit future_urlexpect(page)- .not_to have_selector '.fc-event-title', text: current_work_package.subject+ .to have_no_css '.fc-event-title', text: current_work_package.subjectexpect(page)- .not_to have_selector '.fc-event-title', text: another_current_work_package.subject+ .to have_no_css '.fc-event-title', text: another_current_work_package.subjectexpect(page)- .to have_selector '.fc-event-title', text: future_work_package.subject+ .to have_css '.fc-event-title', text: future_work_package.subjectexpect(page)- .to have_selector '.fc-event-title', text: another_future_work_package.subject+ .to have_css '.fc-event-title', text: another_future_work_package.subject# go back a month by using the browser back functionalitypage.execute_script('window.history.back()')expect(page)- .to have_selector '.fc-event-title', text: current_work_package.subject+ .to have_css '.fc-event-title', text: current_work_package.subjectexpect(page)- .to have_selector '.fc-event-title', text: another_current_work_package.subject+ .to have_css '.fc-event-title', text: another_current_work_package.subjectexpect(page)- .not_to have_selector '.fc-event-title', text: future_work_package.subject+ .to have_no_css '.fc-event-title', text: future_work_package.subjectexpect(page)- .not_to have_selector '.fc-event-title', text: another_future_work_package.subject+ .to have_no_css '.fc-event-title', text: another_future_work_package.subject# click goes to work package split screenpage.find('.fc-event-title', text: current_work_package.subject).click@@ -182,7 +182,7 @@ RSpec.describe 'Work package calendars', js: true do# Regression #29664page.go_backexpect(page)- .to have_selector('.fc-event-title', text: current_work_package.subject, wait: 20)+ .to have_css('.fc-event-title', text: current_work_package.subject, wait: 20)current_wp_split_screen.expect_closed# click goes to work package split screen page again@@ -193,7 +193,7 @@ RSpec.describe 'Work package calendars', js: true docurrent_wp_split_screen.closeexpect(page)- .to have_selector '.fc-event-title', text: current_work_package.subject, wait: 20+ .to have_css '.fc-event-title', text: current_work_package.subject, wait: 20current_wp_split_screen.expect_closedendenddiff --git a/modules/calendar/spec/support/pages/calendar.rb b/modules/calendar/spec/support/pages/calendar.rbindex 4af28db990c..7eb67e01852 100644--- a/modules/calendar/spec/support/pages/calendar.rb+++ b/modules/calendar/spec/support/pages/calendar.rb@@ -89,7 +89,7 @@ module Pagesenddef expect_title(title = 'Unnamed calendar')- expect(page).to have_selector '.editable-toolbar-title--fixed', text: title+ expect(page).to have_css '.editable-toolbar-title--fixed', text: titleenddef expect_event(work_package, present: true)@@ -109,11 +109,11 @@ module Pagesenddef expect_wp_not_resizable(work_package)- expect(page).to have_selector('.fc-event:not(.fc-event-resizable)', text: work_package.subject)+ expect(page).to have_css('.fc-event:not(.fc-event-resizable)', text: work_package.subject)enddef expect_wp_not_draggable(work_package)- expect(page).to have_selector('.fc-event:not(.fc-event-draggable)', text: work_package.subject)+ expect(page).to have_css('.fc-event:not(.fc-event-draggable)', text: work_package.subject)enddef set_title(title)@@ -150,19 +150,19 @@ module Pagesenddef expect_create_button- expect(page).to have_selector '.button', text: 'Calendar'+ expect(page).to have_css '.button', text: 'Calendar'enddef expect_no_create_button- expect(page).not_to have_selector '.button', text: 'Calendar'+ expect(page).to have_no_css '.button', text: 'Calendar'enddef expect_delete_button(query)- expect(page).to have_selector "[data-test-selector='calendar-remove-#{query.id}']"+ expect(page).to have_css "[data-test-selector='calendar-remove-#{query.id}']"enddef expect_no_delete_button(query)- expect(page).not_to have_selector "[data-test-selector='calendar-remove-#{query.id}']"+ expect(page).to have_no_css "[data-test-selector='calendar-remove-#{query.id}']"enddef expect_no_views_visible@@ -170,11 +170,11 @@ module Pagesenddef expect_view_visible(query)- expect(page).to have_selector 'td', text: query.name+ expect(page).to have_css 'td', text: query.nameenddef expect_view_not_visible(query)- expect(page).not_to have_selector 'td', text: query.name+ expect(page).to have_no_css 'td', text: query.nameenddef expect_views_listed_in_order(*queries)diff --git a/modules/costs/app/models/entry.rb b/modules/costs/app/models/entry.rbindex b5047a69b7c..2e40152e16e 100644--- a/modules/costs/app/models/entry.rb+++ b/modules/costs/app/models/entry.rb@@ -36,9 +36,9 @@ module EntryTimeEntry === obj or CostEntry === objend- def calculate(type, *args)- a = TimeEntry.calculate(type, *args)- b = CostEntry.calculate(type, *args)+ def calculate(type, *)+ a = TimeEntry.calculate(type, *)+ b = CostEntry.calculate(type, *)case typewhen :sum, :count then a + bwhen :avg then (a + b) / 2@@ -69,16 +69,16 @@ module Entrydef find_from_ids(_args, options) find_many :find_from_ids, options end- def find_one(*args)- TimeEntry.send(*args) || CostEntry.send(*args)+ def find_one(*)+ TimeEntry.send(*) || CostEntry.send(*)end- def find_many(*args)- TimeEntry.send(*args) + CostEntry.send(*args)+ def find_many(*)+ TimeEntry.send(*) + CostEntry.send(*)end- def send_all(*args)- [TimeEntry.send(*args), CostEntry.send(*args)]+ def send_all(*)+ [TimeEntry.send(*), CostEntry.send(*)]endendenddiff --git a/modules/costs/app/services/time_entries/set_attributes_service.rb b/modules/costs/app/services/time_entries/set_attributes_service.rbindex d7c27f478e9..a42862f7d97 100644--- a/modules/costs/app/services/time_entries/set_attributes_service.rb+++ b/modules/costs/app/services/time_entries/set_attributes_service.rb@@ -30,7 +30,7 @@ module TimeEntriesclass SetAttributesService < ::BaseServices::SetAttributesprivate- def set_attributes(attributes)+ def set_attributes(_attributes)model.attributes = params##diff --git a/modules/costs/db/migrate/20180323133404_to_v710_aggregated_costs_migrations.rb b/modules/costs/db/migrate/20180323133404_to_v710_aggregated_costs_migrations.rbindex b1aece8fd0c..8202b775909 100644--- a/modules/costs/db/migrate/20180323133404_to_v710_aggregated_costs_migrations.rb+++ b/modules/costs/db/migrate/20180323133404_to_v710_aggregated_costs_migrations.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require Rails.root.join("db", "migrate", "migration_utils", "migration_squasher").to_s+require Rails.root.join("db/migrate/migration_utils/migration_squasher").to_s# This migration aggregates the migrations detailed in MIGRATION_FILESclass ToV710AggregatedCostsMigrations < ActiveRecord::Migration[5.1]MIGRATION_FILES = <<-MIGRATIONS@@ -120,7 +120,7 @@ class ToV710AggregatedCostsMigrations < ActiveRecord::Migration[5.1]t.integer :author_id, null: falset.string :subject, null: falset.text :description- t.date :fixed_date, null: false+ t.date :fixed_date, null: falset.datetime :created_onenddiff --git a/modules/costs/lib/costs/patches/members_patch.rb b/modules/costs/lib/costs/patches/members_patch.rbindex d47b230473c..9bc1aca8a33 100644--- a/modules/costs/lib/costs/patches/members_patch.rb+++ b/modules/costs/lib/costs/patches/members_patch.rb@@ -45,7 +45,7 @@ module Costsmodule TableComponentdef sort_collection(query, sort_clause, sort_columns)- q = super query, sort_clause.gsub("current_rate", 'COALESCE(rate, 0.0)'), sort_columns+ q = super(query, sort_clause.gsub("current_rate", 'COALESCE(rate, 0.0)'), sort_columns)if sort_columns.include? :current_ratejoin_rate qdiff --git a/modules/costs/spec/factories/cost_rate_factory.rb b/modules/costs/spec/factories/cost_rate_factory.rbindex b7307b720d9..9460919cd54 100644--- a/modules/costs/spec/factories/cost_rate_factory.rb+++ b/modules/costs/spec/factories/cost_rate_factory.rb@@ -28,7 +28,7 @@FactoryBot.define dofactory :cost_rate do- association :cost_type, factory: :cost_type+ association :cost_typevalid_from { Date.today }rate { 50.0 }enddiff --git a/modules/costs/spec/factories/default_hourly_rate_factory.rb b/modules/costs/spec/factories/default_hourly_rate_factory.rbindex ad7a3873302..d77bfd71bb6 100644--- a/modules/costs/spec/factories/default_hourly_rate_factory.rb+++ b/modules/costs/spec/factories/default_hourly_rate_factory.rb@@ -28,7 +28,7 @@FactoryBot.define dofactory :default_hourly_rate do- association :user, factory: :user+ association :uservalid_from { Date.today }rate { 50.0 }enddiff --git a/modules/costs/spec/factories/hourly_rate_factory.rb b/modules/costs/spec/factories/hourly_rate_factory.rbindex d11ecf9ed53..96bdde3ad78 100644--- a/modules/costs/spec/factories/hourly_rate_factory.rb+++ b/modules/costs/spec/factories/hourly_rate_factory.rb@@ -28,8 +28,8 @@FactoryBot.define dofactory :hourly_rate do- association :user, factory: :user- association :project, factory: :project+ association :user+ association :projectvalid_from { Date.today }rate { 50.0 }enddiff --git a/modules/costs/spec/features/cost_entries/add_cost_entry_spec.rb b/modules/costs/spec/features/cost_entries/add_cost_entry_spec.rbindex 2ef46f0b4f0..a11bcf36324 100644--- a/modules/costs/spec/features/cost_entries/add_cost_entry_spec.rb+++ b/modules/costs/spec/features/cost_entries/add_cost_entry_spec.rb@@ -28,7 +28,7 @@require_relative '../../spec_helper'-RSpec.describe 'Work Package cost fields', js: true do+RSpec.describe 'Work Package cost fields', :js doshared_let(:type_task) { create(:type_task) }shared_let(:status) { create(:status, is_default: true) }shared_let(:priority) { create(:priority, is_default: true) }@@ -79,17 +79,17 @@ RSpec.describe 'Work Package cost fields', js: true do# Set single value, should update suffixselect 'A', from: 'cost_entry_cost_type_id'fill_in 'cost_entry_units', with: '1'- expect(page).to have_selector('#cost_entry_unit_name', text: 'A single')- expect(page).to have_selector('#cost_entry_costs', text: '1.00 EUR')+ expect(page).to have_css('#cost_entry_unit_name', text: 'A single')+ expect(page).to have_css('#cost_entry_costs', text: '1.00 EUR')fill_in 'cost_entry_units', with: '2'- expect(page).to have_selector('#cost_entry_unit_name', text: 'A plural')- expect(page).to have_selector('#cost_entry_costs', text: '2.00 EUR')+ expect(page).to have_css('#cost_entry_unit_name', text: 'A plural')+ expect(page).to have_css('#cost_entry_costs', text: '2.00 EUR')# Switch cost typeselect 'B', from: 'cost_entry_cost_type_id'- expect(page).to have_selector('#cost_entry_unit_name', text: 'B plural')- expect(page).to have_selector('#cost_entry_costs', text: '4.00 EUR')+ expect(page).to have_css('#cost_entry_unit_name', text: 'B plural')+ expect(page).to have_css('#cost_entry_costs', text: '4.00 EUR')# Override costsfind_by_id('cost_entry_costs').click@@ -99,7 +99,7 @@ RSpec.describe 'Work Package cost fields', js: true doclick_on 'Save'# Expect correct costs- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_cost_logged_successfully))+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_cost_logged_successfully))entry = CostEntry.lastexpect(entry.cost_type_id).to eq(cost_type2.id)expect(entry.units).to eq(2.0)@@ -107,7 +107,7 @@ RSpec.describe 'Work Package cost fields', js: true doexpect(entry.real_costs).to eq(15.52)visit edit_cost_entry_path(entry)- expect(page).to have_selector('#cost_entry_costs', text: '15.52 EUR')+ expect(page).to have_css('#cost_entry_costs', text: '15.52 EUR')endcontext 'with german locale' do@@ -125,8 +125,8 @@ RSpec.describe 'Work Package cost fields', js: true doSeleniumHubWaiter.waitfill_in 'cost_entry_units', with: '1,42'select 'B', from: 'cost_entry_cost_type_id'- expect(page).to have_selector('#cost_entry_unit_name', text: 'B plural')- expect(page).to have_selector('#cost_entry_costs', text: '2,84 EUR')+ expect(page).to have_css('#cost_entry_unit_name', text: 'B plural')+ expect(page).to have_css('#cost_entry_costs', text: '2,84 EUR')# Override costsfind_by_id('cost_entry_costs').click@@ -136,7 +136,7 @@ RSpec.describe 'Work Package cost fields', js: true doclick_on I18n.t(:button_save)# Expect correct costs- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_cost_logged_successfully))+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_cost_logged_successfully))entry = CostEntry.lastexpect(entry.cost_type_id).to eq(cost_type2.id)expect(entry.units).to eq(1.42)@@ -145,7 +145,7 @@ RSpec.describe 'Work Package cost fields', js: true do# Can edit the costs againvisit edit_cost_entry_path(entry)- expect(page).to have_selector('#cost_entry_costs', text: '1.350,25 EUR')+ expect(page).to have_css('#cost_entry_costs', text: '1.350,25 EUR')# Toggle the cost buttonSeleniumHubWaiter.wait@@ -156,7 +156,7 @@ RSpec.describe 'Work Package cost fields', js: true dofill_in 'cost_entry_overridden_costs', with: '55.000,55'click_on I18n.t(:button_save)- expect(page).to have_selector('#cost_entry_costs', text: '55.000,55 EUR')+ expect(page).to have_css('#cost_entry_costs', text: '55.000,55 EUR')entry.reloadexpect(entry.units).to eq(1.42)expect(entry.costs).to eq(2.84)@@ -181,8 +181,8 @@ RSpec.describe 'Work Package cost fields', js: true dofind('.menu-item', text: I18n.t(:button_log_costs)).clickSeleniumHubWaiter.wait- expect(page).not_to have_selector('#cost_entry_user_id option', text: placeholder_user.name, visible: :all)- expect(page).to have_selector('#cost_entry_user_id option', text: user.name, visible: :all)+ expect(page).to have_no_css('#cost_entry_user_id option', text: placeholder_user.name, visible: :all)+ expect(page).to have_css('#cost_entry_user_id option', text: user.name, visible: :all)endendenddiff --git a/modules/costs/spec/features/cost_entries/add_entry_without_rate_permission_spec.rb b/modules/costs/spec/features/cost_entries/add_entry_without_rate_permission_spec.rbindex 8c33b65795e..111a666a5ee 100644--- a/modules/costs/spec/features/cost_entries/add_entry_without_rate_permission_spec.rb+++ b/modules/costs/spec/features/cost_entries/add_entry_without_rate_permission_spec.rb@@ -28,7 +28,7 @@require_relative '../../spec_helper'-RSpec.describe 'Create cost entry without rate permissions', js: true do+RSpec.describe 'Create cost entry without rate permissions', :js doshared_let(:type_task) { create(:type_task) }shared_let(:status) { create(:status, is_default: true) }shared_let(:priority) { create(:priority, is_default: true) }@@ -71,13 +71,13 @@ RSpec.describe 'Create cost entry without rate permissions', js: true do# Set single value, should update suffixselect 'A', from: 'cost_entry_cost_type_id'fill_in 'cost_entry_units', with: '1'- expect(page).to have_selector('#cost_entry_unit_name', text: 'A single')- expect(page).not_to have_selector('#cost_entry_costs')+ expect(page).to have_css('#cost_entry_unit_name', text: 'A single')+ expect(page).to have_no_css('#cost_entry_costs')click_on 'Save'# Expect correct costs- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_cost_logged_successfully))+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_cost_logged_successfully))entry = CostEntry.lastexpect(entry.cost_type_id).to eq(cost_type.id)expect(entry.units).to eq(1.0)diff --git a/modules/costs/spec/features/cost_types/create_cost_type_spec.rb b/modules/costs/spec/features/cost_types/create_cost_type_spec.rbindex d8f834cf6bf..6f4cd437db8 100644--- a/modules/costs/spec/features/cost_types/create_cost_type_spec.rb+++ b/modules/costs/spec/features/cost_types/create_cost_type_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'creating a cost type', js: true do+RSpec.describe 'creating a cost type', :js dolet!(:user) { create(:admin) }let!(:cost_type) dotype = create(:cost_type, name: 'Translations')@@ -53,14 +53,14 @@ RSpec.describe 'creating a cost type', js: true doscroll_to_and_click(find('button.-with-icon.icon-checkmark'))expect_angular_frontend_initialized- expect(page).to have_selector '.generic-table', wait: 10+ expect(page).to have_css '.generic-table', wait: 10cost_type_row = find('tr', text: 'Test day rate')- expect(cost_type_row).to have_selector('td a', text: 'Test day rate')- expect(cost_type_row).to have_selector('td', text: 'dayUnit')- expect(cost_type_row).to have_selector('td', text: 'dayUnitPlural')- expect(cost_type_row).to have_selector('td.currency', text: '1,000.25')+ expect(cost_type_row).to have_css('td a', text: 'Test day rate')+ expect(cost_type_row).to have_css('td', text: 'dayUnit')+ expect(cost_type_row).to have_css('td', text: 'dayUnitPlural')+ expect(cost_type_row).to have_css('td.currency', text: '1,000.25')cost_type = CostType.lastexpect(cost_type.name).to eq 'Test day rate'@@ -84,14 +84,14 @@ RSpec.describe 'creating a cost type', js: true doscroll_to_and_click(find('button.-with-icon.icon-checkmark'))expect_angular_frontend_initialized- expect(page).to have_selector '.generic-table', wait: 10+ expect(page).to have_css '.generic-table', wait: 10cost_type_row = find('tr', text: 'Test day rate')- expect(cost_type_row).to have_selector('td a', text: 'Test day rate')- expect(cost_type_row).to have_selector('td', text: 'dayUnit')- expect(cost_type_row).to have_selector('td', text: 'dayUnitPlural')- expect(cost_type_row).to have_selector('td.currency', text: '1.000,25')+ expect(cost_type_row).to have_css('td a', text: 'Test day rate')+ expect(cost_type_row).to have_css('td', text: 'dayUnit')+ expect(cost_type_row).to have_css('td', text: 'dayUnitPlural')+ expect(cost_type_row).to have_css('td.currency', text: '1.000,25')cost_type = CostType.lastexpect(cost_type.name).to eq 'Test day rate'diff --git a/modules/costs/spec/features/cost_types/delete_cost_type_spec.rb b/modules/costs/spec/features/cost_types/delete_cost_type_spec.rbindex 42479aca549..48f61847e2a 100644--- a/modules/costs/spec/features/cost_types/delete_cost_type_spec.rb+++ b/modules/costs/spec/features/cost_types/delete_cost_type_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'deleting a cost type', js: true do+RSpec.describe 'deleting a cost type', :js dolet!(:user) { create(:admin) }let!(:cost_type) dotype = create(:cost_type, name: 'Translations')@@ -49,7 +49,7 @@ RSpec.describe 'deleting a cost type', js: true do# Expect no results if not lockedexpect_angular_frontend_initialized- expect(page).to have_selector '.generic-table--no-results-container', wait: 10+ expect(page).to have_css '.generic-table--no-results-container', wait: 10SeleniumHubWaiter.wait# Show locked@@ -59,7 +59,7 @@ RSpec.describe 'deleting a cost type', js: true do# Expect no results if not lockedexpect(page).to have_text I18n.t(:label_locked_cost_types)- expect(page).to have_selector('.restore_cost_type')- expect(page).to have_selector('.cost-types--list-deleted td', text: 'Translations')+ expect(page).to have_css('.restore_cost_type')+ expect(page).to have_css('.cost-types--list-deleted td', text: 'Translations')endenddiff --git a/modules/costs/spec/features/costs_context_menu_spec.rb b/modules/costs/spec/features/costs_context_menu_spec.rbindex 1cb8cf88e16..48ed7859e98 100644--- a/modules/costs/spec/features/costs_context_menu_spec.rb+++ b/modules/costs/spec/features/costs_context_menu_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Work package table log unit costs', js: true do+RSpec.describe 'Work package table log unit costs', :js dolet(:user) { create(:admin) }let(:work_package) { create(:work_package) }@@ -26,6 +26,6 @@ RSpec.describe 'Work package table log unit costs', js: true doit 'renders the log unit costs menu item' domenu.choose(I18n.t(:label_log_costs))- expect(page).to have_selector('h2', text: I18n.t(:label_log_costs))+ expect(page).to have_css('h2', text: I18n.t(:label_log_costs))endenddiff --git a/modules/costs/spec/features/destroy_work_package_with_cost_entries_spec.rb b/modules/costs/spec/features/destroy_work_package_with_cost_entries_spec.rbindex ee77ac8af19..66874c5d1cb 100644--- a/modules/costs/spec/features/destroy_work_package_with_cost_entries_spec.rb+++ b/modules/costs/spec/features/destroy_work_package_with_cost_entries_spec.rb@@ -28,7 +28,7 @@require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb')-RSpec.describe 'Deleting time entries', js: true do+RSpec.describe 'Deleting time entries', :js dolet(:project) { work_package.project }let(:user) docreate(:user,diff --git a/modules/costs/spec/features/members_hourly_rates_spec.rb b/modules/costs/spec/features/members_hourly_rates_spec.rbindex 9e4ce090f3b..9b37479230e 100644--- a/modules/costs/spec/features/members_hourly_rates_spec.rb+++ b/modules/costs/spec/features/members_hourly_rates_spec.rb@@ -46,7 +46,7 @@ RSpec.describe 'hourly rates on a member', :js dodef expect_current_rate_in_members_table(amount)view_project_members- expect(page).to have_selector("#member-#{member.id} .currency", text: amount)+ expect(page).to have_css("#member-#{member.id} .currency", text: amount)enddef add_rate(rate:, date:)diff --git a/modules/costs/spec/features/time_entries_spec.rb b/modules/costs/spec/features/time_entries_spec.rbindex 1e3875ff259..661e3184ebc 100644--- a/modules/costs/spec/features/time_entries_spec.rb+++ b/modules/costs/spec/features/time_entries_spec.rb@@ -28,7 +28,7 @@require_relative '../spec_helper'-RSpec.describe 'Work Package table cost entries', js: true do+RSpec.describe 'Work Package table cost entries', :js doshared_let(:project) { create(:project_with_types) }shared_let(:user) { create(:admin) }@@ -73,8 +73,8 @@ RSpec.describe 'Work Package table cost entries', js: true doparent_row = wp_table.row(parent)wp_row = wp_table.row(work_package)- expect(parent_row).to have_selector('.inline-edit--container.spentTime', text: '12.5 h')- expect(wp_row).to have_selector('.inline-edit--container.spentTime', text: '2.5 h')+ expect(parent_row).to have_css('.inline-edit--container.spentTime', text: '12.5 h')+ expect(wp_row).to have_css('.inline-edit--container.spentTime', text: '2.5 h')endit 'creates an activity' do@@ -86,7 +86,7 @@ RSpec.describe 'Work Package table cost entries', js: true dowp1 = time_entry1.work_packagewp2 = time_entry2.work_package- expect(page).to have_selector('.op-activity-list--item-title', text: "#{wp1.type.name} ##{wp1.id}: #{wp1.subject}")- expect(page).to have_selector('.op-activity-list--item-title', text: "#{wp2.type.name} ##{wp2.id}: #{wp2.subject}")+ expect(page).to have_css('.op-activity-list--item-title', text: "#{wp1.type.name} ##{wp1.id}: #{wp1.subject}")+ expect(page).to have_css('.op-activity-list--item-title', text: "#{wp2.type.name} ##{wp2.id}: #{wp2.subject}")endenddiff --git a/modules/costs/spec/features/timer_spec.rb b/modules/costs/spec/features/timer_spec.rbindex d22e9b26339..cdbdb22cc11 100644--- a/modules/costs/spec/features/timer_spec.rb+++ b/modules/costs/spec/features/timer_spec.rb@@ -28,7 +28,7 @@require_relative '../spec_helper'-RSpec.describe 'Work Package timer', js: true do+RSpec.describe 'Work Package timer', :js doshared_let(:project) { create(:project_with_types) }shared_let(:work_package_a) { create(:work_package, subject: 'WP A', project:) }@@ -59,8 +59,8 @@ RSpec.describe 'Work Package timer', js: true doexpect(timer_entry.hours).to be_nilpage.find('.op-top-menu-user').click- expect(page).to have_selector('.op-timer-account-menu', wait: 10)- expect(page).to have_selector('.op-timer-account-menu--wp-details', text: "##{work_package_a.id}: WP A")+ expect(page).to have_css('.op-timer-account-menu', wait: 10)+ expect(page).to have_css('.op-timer-account-menu--wp-details', text: "##{work_package_a.id}: WP A")page.find_test_selector('op-timer-account-menu-stop').clicktime_logging_modal.is_visible true@@ -92,7 +92,7 @@ RSpec.describe 'Work Package timer', js: true dotimer_button.start- expect(page).to have_selector('.op-timer-stop-modal')+ expect(page).to have_css('.op-timer-stop-modal')expect(page).to have_text('Tracking time:')active_time_entries = TimeEntry.where(ongoing: true, user:)@@ -163,7 +163,7 @@ RSpec.describe 'Work Package timer', js: true dotimer_button.expect_inactivetimer_button.start- expect(page).to have_selector('.op-timer-stop-modal')+ expect(page).to have_css('.op-timer-stop-modal')expect(page).to have_text('Tracking time:')page.within('.spot-modal') { click_button 'Stop current timer' }@@ -207,7 +207,7 @@ RSpec.describe 'Work Package timer', js: true dowp_view_a.visit!# Wait for another button to be present- expect(page).to have_selector('#watch-button', wait: 10)+ expect(page).to have_css('#watch-button', wait: 10)timer_button.expect_visible visible: falseendenddiff --git a/modules/costs/spec/features/users_hourly_rates_spec.rb b/modules/costs/spec/features/users_hourly_rates_spec.rbindex 00ea8f5bcbb..7d0ab901267 100644--- a/modules/costs/spec/features/users_hourly_rates_spec.rb+++ b/modules/costs/spec/features/users_hourly_rates_spec.rb@@ -28,7 +28,7 @@require_relative '../spec_helper'-RSpec.describe 'hourly rates on user edit', js: true do+RSpec.describe 'hourly rates on user edit', :js dolet(:user) { create(:admin) }def view_rates@@ -73,7 +73,7 @@ RSpec.describe 'hourly rates on user edit', js: true doexpect(page).to have_text /rate history/iexpect(page).to have_text I18n.t('no_results_title_text')- expect(page).not_to have_text 'Current rate'+ expect(page).to have_no_text 'Current rate'endendend@@ -98,8 +98,8 @@ RSpec.describe 'hourly rates on user edit', js: true doview_rates- expect(page).to have_selector('.currency', text: '1,00')- expect(page).to have_selector('.currency', text: '5,12')+ expect(page).to have_css('.currency', text: '1,00')+ expect(page).to have_css('.currency', text: '5,12')endendenddiff --git a/modules/costs/spec/models/cost_entry_spec.rb b/modules/costs/spec/models/cost_entry_spec.rbindex b925339c433..9bcccb733a3 100644--- a/modules/costs/spec/models/cost_entry_spec.rb+++ b/modules/costs/spec/models/cost_entry_spec.rb@@ -108,7 +108,7 @@ RSpec.describe CostEntry docost_entry.save!end- it { expect(CostEntry.visible(user2, project)).to match_array([cost_entry]) }+ it { expect(CostEntry.visible(user2, project)).to contain_exactly(cost_entry) }enddescribe "WHEN not having the view_cost_entries permission@@ -120,7 +120,7 @@ RSpec.describe CostEntry docost_entry.save!end- it { expect(CostEntry.visible(user2, project)).to match_array([]) }+ it { expect(CostEntry.visible(user2, project)).to be_empty }enddescribe "WHEN having the view_own_cost_entries permission@@ -132,7 +132,7 @@ RSpec.describe CostEntry docost_entry.save!end- it { expect(CostEntry.visible(user2, project)).to match_array([]) }+ it { expect(CostEntry.visible(user2, project)).to be_empty }enddescribe "WHEN having the view_own_cost_entries permission@@ -144,7 +144,7 @@ RSpec.describe CostEntry docost_entry2.save!end- it { expect(CostEntry.visible(cost_entry2.user, project)).to match_array([cost_entry2]) }+ it { expect(CostEntry.visible(cost_entry2.user, project)).to contain_exactly(cost_entry2) }endendenddiff --git a/modules/costs/spec/models/projects/scopes/activated_time_activity_spec.rb b/modules/costs/spec/models/projects/scopes/activated_time_activity_spec.rbindex f5f7b9a82ed..15c170ec234 100644--- a/modules/costs/spec/models/projects/scopes/activated_time_activity_spec.rb+++ b/modules/costs/spec/models/projects/scopes/activated_time_activity_spec.rb@@ -40,7 +40,7 @@ RSpec.describe Projects::Scopes::ActivatedTimeActivity docontext 'and being active' doit 'returns all projects' doexpect(subject)- .to match_array [project, other_project]+ .to contain_exactly(project, other_project)endend@@ -65,7 +65,7 @@ RSpec.describe Projects::Scopes::ActivatedTimeActivity docontext 'and being active' doit 'returns the project the activity is activated in' doexpect(subject)- .to match_array [project]+ .to contain_exactly(project)endend@@ -76,7 +76,7 @@ RSpec.describe Projects::Scopes::ActivatedTimeActivity doit 'returns only the projects the activity is activated in' doexpect(subject)- .to match_array [project]+ .to contain_exactly(project)endendenddiff --git a/modules/costs/spec/models/time_entries/scopes/of_user_and_day_spec.rb b/modules/costs/spec/models/time_entries/scopes/of_user_and_day_spec.rbindex 4078396c00e..3629d96f1db 100644--- a/modules/costs/spec/models/time_entries/scopes/of_user_and_day_spec.rb+++ b/modules/costs/spec/models/time_entries/scopes/of_user_and_day_spec.rb@@ -57,7 +57,7 @@ RSpec.describe TimeEntries::Scopes::OfUserAndDay doit 'are all the time entries of the user on the date' doexpect(subject)- .to match_array([time_entry, other_time_entry])+ .to contain_exactly(time_entry, other_time_entry)endcontext 'if excluding a time entry' do@@ -65,7 +65,7 @@ RSpec.describe TimeEntries::Scopes::OfUserAndDay doit 'does not include the time entry' doexpect(subject)- .to match_array([time_entry])+ .to contain_exactly(time_entry)endendenddiff --git a/modules/costs/spec/models/time_entry_activities/scopes/active_in_project_spec.rb b/modules/costs/spec/models/time_entry_activities/scopes/active_in_project_spec.rbindex f4eecce27a2..0bdd14257c8 100644--- a/modules/costs/spec/models/time_entry_activities/scopes/active_in_project_spec.rb+++ b/modules/costs/spec/models/time_entry_activities/scopes/active_in_project_spec.rb@@ -41,7 +41,7 @@ RSpec.describe TimeEntryActivities::Scopes::ActiveInProject docontext 'with the activity being active' doit 'includes the activity' doexpect(subject)- .to match_array [activity, other_activity]+ .to contain_exactly(activity, other_activity)endend@@ -52,7 +52,7 @@ RSpec.describe TimeEntryActivities::Scopes::ActiveInProject doit 'excludes the activity' doexpect(subject)- .to match_array([other_activity])+ .to contain_exactly(other_activity)endendend@@ -64,7 +64,7 @@ RSpec.describe TimeEntryActivities::Scopes::ActiveInProject doit 'includes the activity' doexpect(subject)- .to match_array [activity, other_activity]+ .to contain_exactly(activity, other_activity)endcontext 'with the activity being inactive' do@@ -74,7 +74,7 @@ RSpec.describe TimeEntryActivities::Scopes::ActiveInProject doit 'includes the activity' doexpect(subject)- .to match_array [activity, other_activity]+ .to contain_exactly(activity, other_activity)endendend@@ -86,7 +86,7 @@ RSpec.describe TimeEntryActivities::Scopes::ActiveInProject doit 'includes the activity' doexpect(subject)- .to match_array [activity, other_activity]+ .to contain_exactly(activity, other_activity)endend@@ -97,7 +97,7 @@ RSpec.describe TimeEntryActivities::Scopes::ActiveInProject doit 'excludes the activity' doexpect(subject)- .to match_array [other_activity]+ .to contain_exactly(other_activity)endcontext 'with a project configuration configured to true but for a different project' do@@ -107,7 +107,7 @@ RSpec.describe TimeEntryActivities::Scopes::ActiveInProject doit 'excludes the activity' doexpect(subject)- .to match_array [other_activity]+ .to contain_exactly(other_activity)endendenddiff --git a/modules/costs/spec/services/time_entries/set_attributes_service_spec.rb b/modules/costs/spec/services/time_entries/set_attributes_service_spec.rbindex 8ef8bbb0aac..34b82bfd6c4 100644--- a/modules/costs/spec/services/time_entries/set_attributes_service_spec.rb+++ b/modules/costs/spec/services/time_entries/set_attributes_service_spec.rb@@ -200,7 +200,7 @@ RSpec.describe TimeEntries::SetAttributesService, type: :model docontext 'with an invalid contract' dolet(:contract_valid) { false }let(:expect_time_instance_save) do- expect(time_entry_instance).not_to receive(:save) # rubocop:disable RSpec/MessageSpies+ expect(time_entry_instance).not_to receive(:save) # rubocop:disable RSpec/MessageSpiesendit 'returns failure' dodiff --git a/modules/dashboards/spec/contracts/grids/create_contract_spec.rb b/modules/dashboards/spec/contracts/grids/create_contract_spec.rbindex 7ea452fef89..0da26fb0323 100644--- a/modules/dashboards/spec/contracts/grids/create_contract_spec.rb+++ b/modules/dashboards/spec/contracts/grids/create_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_examples'+require_relative 'shared_examples'RSpec.describe Grids::CreateContract doinclude_context 'grid contract'diff --git a/modules/dashboards/spec/features/custom_text_spec.rb b/modules/dashboards/spec/features/custom_text_spec.rbindex ebecb6fbb13..764a90d5df3 100644--- a/modules/dashboards/spec/features/custom_text_spec.rb+++ b/modules/dashboards/spec/features/custom_text_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'Project description widget on dashboard', js: true do+RSpec.describe 'Project description widget on dashboard', :js dolet!(:type) { create(:type_task, name: 'Task') }let!(:project) docreate(:project, types: [type])@@ -79,7 +79,7 @@ RSpec.describe 'Project description widget on dashboard', js: true doeditor.insert_macro 'Insert create work package button'- expect(page).to have_selector('.spot-modal')+ expect(page).to have_css('.spot-modal')select 'Task', from: 'selected-type'find('.spot-modal--submit-button').click@@ -88,7 +88,7 @@ RSpec.describe 'Project description widget on dashboard', js: true dodashboard_page.expect_and_dismiss_toaster message: I18n.t('js.notice_successful_update')within('#content') do- expect(page).to have_selector("a[href=\"/projects/#{project.identifier}/work_packages/new?type=#{type.id}\"]")+ expect(page).to have_css("a[href=\"/projects/#{project.identifier}/work_packages/new?type=#{type.id}\"]")endend@@ -111,7 +111,7 @@ RSpec.describe 'Project description widget on dashboard', js: true dowithin custom_text_widget.area doexpect(page)- .to have_selector('.inline-edit--display-field', text: 'My own little text')+ .to have_css('.inline-edit--display-field', text: 'My own little text')find('.inplace-editing--container').click@@ -119,7 +119,7 @@ RSpec.describe 'Project description widget on dashboard', js: true dofield.cancel_by_clickexpect(page)- .to have_selector('.inline-edit--display-field', text: 'My own little text')+ .to have_css('.inline-edit--display-field', text: 'My own little text')enddashboard_page.expect_no_toaster message: I18n.t('js.notice_successful_update')@@ -137,7 +137,7 @@ RSpec.describe 'Project description widget on dashboard', js: true dowithin custom_text_widget.area doexpect(page).to have_test_selector('op-attachment-list-item', text: 'image.png')- expect(page).not_to have_selector('notifications-upload-progress')+ expect(page).to have_no_css('notifications-upload-progress')field.save!end@@ -146,7 +146,7 @@ RSpec.describe 'Project description widget on dashboard', js: true dowithin custom_text_widget.area doexpect(page)- .to have_selector('#content img', count: 1)+ .to have_css('#content img', count: 1)expect(page).not_to have_test_selector('op-attachment-list-item', text: 'image.png')@@ -175,7 +175,7 @@ RSpec.describe 'Project description widget on dashboard', js: true do.to have_content(dashboard.widgets.first.options[:text])expect(page)- .not_to have_selector('.inplace-editing--container')+ .to have_no_css('.inplace-editing--container')endendenddiff --git a/modules/dashboards/spec/features/docments_spec.rb b/modules/dashboards/spec/features/docments_spec.rbindex fefcf6e842a..adc46559269 100644--- a/modules/dashboards/spec/features/docments_spec.rb+++ b/modules/dashboards/spec/features/docments_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'Documents widget on dashboard', js: true do+RSpec.describe 'Documents widget on dashboard', :js dolet!(:project) { create(:project) }let!(:other_project) { create(:project) }let!(:visible_document) dodiff --git a/modules/dashboards/spec/features/members_principals_spec.rb b/modules/dashboards/spec/features/members_principals_spec.rbindex 625a4226016..bed0d1f449b 100644--- a/modules/dashboards/spec/features/members_principals_spec.rb+++ b/modules/dashboards/spec/features/members_principals_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'Dashboard page members', js: true do+RSpec.describe 'Dashboard page members', :js doshared_let(:type) { create(:type) }shared_let(:project) { create(:project, types: [type], description: 'My **custom** description') }diff --git a/modules/dashboards/spec/features/members_spec.rb b/modules/dashboards/spec/features/members_spec.rbindex cc038800ce6..4271a970c33 100644--- a/modules/dashboards/spec/features/members_spec.rb+++ b/modules/dashboards/spec/features/members_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'Members widget on dashboard', js: true do+RSpec.describe 'Members widget on dashboard', :js dolet!(:project) { create(:project) }let!(:other_project) { create(:project) }@@ -108,7 +108,7 @@ RSpec.describe 'Members widget on dashboard', js: true doexpect_all_members_visible(members_area.area)expect(page)- .not_to have_content invisible_user.name+ .to have_no_content invisible_user.namewithin members_area.area doexpect(page)@@ -125,7 +125,7 @@ RSpec.describe 'Members widget on dashboard', js: true dowithin members_area.area doexpect(page)- .not_to have_link('Member')+ .to have_no_link('Member')end# A user without view permission will not see any members@@ -143,10 +143,10 @@ RSpec.describe 'Members widget on dashboard', js: true do.to have_content('No visible members')expect(page)- .not_to have_link('Member')+ .to have_no_link('Member')expect(page)- .not_to have_link('View all members')+ .to have_no_link('View all members')endendenddiff --git a/modules/dashboards/spec/features/modifying_with_unallowed_spec.rb b/modules/dashboards/spec/features/modifying_with_unallowed_spec.rbindex 4d8e9850c21..fa7a1d0a8ae 100644--- a/modules/dashboards/spec/features/modifying_with_unallowed_spec.rb+++ b/modules/dashboards/spec/features/modifying_with_unallowed_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'Modifying a dashboard which already has widgets for which permissions are lacking', js: true do+RSpec.describe 'Modifying a dashboard which already has widgets for which permissions are lacking', :js dolet!(:project) docreate(:project)end@@ -90,6 +90,6 @@ RSpec.describe 'Modifying a dashboard which already has widgets for which permisdashboard_page.visit!expect(page)- .not_to have_selector('.grid--area.-widgeted:nth-of-type(2)')+ .to have_no_css('.grid--area.-widgeted:nth-of-type(2)')endenddiff --git a/modules/dashboards/spec/features/navigation_spec.rb b/modules/dashboards/spec/features/navigation_spec.rbindex a1a70270ae2..eabaca0e1bc 100644--- a/modules/dashboards/spec/features/navigation_spec.rb+++ b/modules/dashboards/spec/features/navigation_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Navigate to dashboard', js: true do+RSpec.describe 'Navigate to dashboard', :js dolet(:project) { create(:project) }let(:permissions) { [:view_dashboards] }let(:user) dodiff --git a/modules/dashboards/spec/features/news_spec.rb b/modules/dashboards/spec/features/news_spec.rbindex 7873df17ba5..1c395aa6b68 100644--- a/modules/dashboards/spec/features/news_spec.rb+++ b/modules/dashboards/spec/features/news_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'News widget on dashboard', js: true do+RSpec.describe 'News widget on dashboard', :js dolet!(:project) { create(:project) }let!(:other_project) { create(:project) }let!(:visible_news) dodiff --git a/modules/dashboards/spec/features/project_description_spec.rb b/modules/dashboards/spec/features/project_description_spec.rbindex 3c54560d0d0..f52f5f92527 100644--- a/modules/dashboards/spec/features/project_description_spec.rb+++ b/modules/dashboards/spec/features/project_description_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'Project description widget on dashboard', js: true do+RSpec.describe 'Project description widget on dashboard', :js dolet(:project_description) { "Some text I like to write" }let!(:project) docreate(:project, description: project_description)@@ -112,7 +112,7 @@ RSpec.describe 'Project description widget on dashboard', js: true do# The edit field is toggled and the value saved.expect(page).to have_content('A completely new description which is super cool.')expect(page).to have_selector(field.selector)- expect(page).not_to have_selector(field.input_selector)+ expect(page).to have_no_selector(field.input_selector)endendend@@ -137,7 +137,7 @@ RSpec.describe 'Project description widget on dashboard', js: true doeditor.insert_macro 'Insert create work package button'- expect(page).to have_selector('.spot-modal')+ expect(page).to have_css('.spot-modal')select 'Task', from: 'selected-type'find('.spot-modal--submit-button').click@@ -146,7 +146,7 @@ RSpec.describe 'Project description widget on dashboard', js: true dodashboard_page.expect_and_dismiss_toaster message: I18n.t('js.notice_successful_update')within('#content') do- expect(page).to have_selector("a[href=\"/projects/#{project.identifier}/work_packages/new?type=#{type.id}\"]")+ expect(page).to have_css("a[href=\"/projects/#{project.identifier}/work_packages/new?type=#{type.id}\"]")endendenddiff --git a/modules/dashboards/spec/features/project_details_spec.rb b/modules/dashboards/spec/features/project_details_spec.rbindex 428ac9a6777..5854a2a3a9d 100644--- a/modules/dashboards/spec/features/project_details_spec.rb+++ b/modules/dashboards/spec/features/project_details_spec.rb@@ -111,7 +111,7 @@ RSpec.describe 'Project details widget on dashboard', :js do# The edit field is toggled and the value saved.expect(page).to have_content(new_value)expect(page).to have_selector(cf.selector)- expect(page).not_to have_selector(cf.input_selector)+ expect(page).to have_no_selector(cf.input_selector)endbefore dodiff --git a/modules/dashboards/spec/features/project_status_spec.rb b/modules/dashboards/spec/features/project_status_spec.rbindex 59ced1df618..51e638adc67 100644--- a/modules/dashboards/spec/features/project_status_spec.rb+++ b/modules/dashboards/spec/features/project_status_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'Project status widget on dashboard', js: true do+RSpec.describe 'Project status widget on dashboard', :js dolet!(:project) docreate(:project,status_code: 'on_track',@@ -120,7 +120,7 @@ RSpec.describe 'Project status widget on dashboard', js: true do# The edit field is toggled and the value saved.expect(page).to have_content('AT RISK')expect(page).to have_selector(field.selector)- expect(page).not_to have_selector(field.input_selector)+ expect(page).to have_no_selector(field.input_selector)# Unset the project statusfield.activate!@@ -130,7 +130,7 @@ RSpec.describe 'Project status widget on dashboard', js: true do# The edit field is toggled and the value saved.expect(page).to have_content('NOT SET')expect(page).to have_selector(field.selector)- expect(page).not_to have_selector(field.input_selector)+ expect(page).to have_no_selector(field.input_selector)# Open explanation fieldfield = TextEditorField.new dashboard_page, 'statusExplanation'@@ -145,7 +145,7 @@ RSpec.describe 'Project status widget on dashboard', js: true do# The edit field is toggled and the value saved.expect(page).to have_content('A completely new explanation which is super cool.')expect(page).to have_selector(field.selector)- expect(page).not_to have_selector(field.input_selector)+ expect(page).to have_no_selector(field.input_selector)endendenddiff --git a/modules/dashboards/spec/features/read_only_allowed_spec.rb b/modules/dashboards/spec/features/read_only_allowed_spec.rbindex 3d5e1a26266..200fce2baa3 100644--- a/modules/dashboards/spec/features/read_only_allowed_spec.rb+++ b/modules/dashboards/spec/features/read_only_allowed_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'Read only mode when user lacks edit permission on dashboard', js: true do+RSpec.describe 'Read only mode when user lacks edit permission on dashboard', :js dolet!(:type) { create(:type) }let!(:project) { create(:project, types: [type]) }let!(:work_package) dodiff --git a/modules/dashboards/spec/features/subprojects_spec.rb b/modules/dashboards/spec/features/subprojects_spec.rbindex 50988723b84..998df3e57fe 100644--- a/modules/dashboards/spec/features/subprojects_spec.rb+++ b/modules/dashboards/spec/features/subprojects_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'Subprojects widget on dashboard', js: true do+RSpec.describe 'Subprojects widget on dashboard', :js dolet!(:project) docreate(:project, parent: parent_project)end@@ -89,15 +89,15 @@ RSpec.describe 'Subprojects widget on dashboard', js: true doexpect(page).to have_link(child_project.name)expect(page)- .not_to have_link(archived_child_project.name)+ .to have_no_link(archived_child_project.name)expect(page)- .not_to have_link(grandchild_project.name)+ .to have_no_link(grandchild_project.name)expect(page)- .not_to have_link(invisible_child_project.name)+ .to have_no_link(invisible_child_project.name)expect(page)- .not_to have_link(parent_project.name)+ .to have_no_link(parent_project.name)expect(page)- .not_to have_link(project.name)+ .to have_no_link(project.name)endendend@@ -115,15 +115,15 @@ RSpec.describe 'Subprojects widget on dashboard', js: true doexpect(page).to have_link(child_project.name)expect(page)- .not_to have_link(archived_child_project.name)+ .to have_no_link(archived_child_project.name)expect(page)- .not_to have_link(grandchild_project.name)+ .to have_no_link(grandchild_project.name)expect(page).to have_link(invisible_child_project.name) # admins can see projects they are not a member ofexpect(page)- .not_to have_link(parent_project.name)+ .to have_no_link(parent_project.name)expect(page)- .not_to have_link(project.name)+ .to have_no_link(project.name)endendenddiff --git a/modules/dashboards/spec/features/time_entries_spec.rb b/modules/dashboards/spec/features/time_entries_spec.rbindex 8606ded4b29..8a0216cbe64 100644--- a/modules/dashboards/spec/features/time_entries_spec.rb+++ b/modules/dashboards/spec/features/time_entries_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'Time entries widget on dashboard', js: true do+RSpec.describe 'Time entries widget on dashboard', :js dolet!(:type) { create(:type) }let!(:project) { create(:project, types: [type]) }let!(:other_project) { create(:project, types: [type]) }@@ -108,24 +108,24 @@ RSpec.describe 'Time entries widget on dashboard', js: true doexpect(page).to have_content Date.today.strftime('%m/%d/%Y')expect(page)- .to have_selector('.activity', text: visible_time_entry.activity.name)+ .to have_css('.activity', text: visible_time_entry.activity.name)expect(page)- .to have_selector('.subject', text: "#{project.name} - ##{work_package.id}: #{work_package.subject}")+ .to have_css('.subject', text: "#{project.name} - ##{work_package.id}: #{work_package.subject}")expect(page)- .to have_selector('.comments', text: visible_time_entry.comments)+ .to have_css('.comments', text: visible_time_entry.comments)expect(page)- .to have_selector('.hours', text: visible_time_entry.hours)+ .to have_css('.hours', text: visible_time_entry.hours)expect(page).to have_content((Date.today - 1.day).strftime('%m/%d/%Y'))expect(page)- .to have_selector('.activity', text: other_visible_time_entry.activity.name)+ .to have_css('.activity', text: other_visible_time_entry.activity.name)expect(page)- .to have_selector('.subject', text: "#{project.name} - ##{work_package.id}: #{work_package.subject}")+ .to have_css('.subject', text: "#{project.name} - ##{work_package.id}: #{work_package.subject}")expect(page)- .to have_selector('.comments', text: other_visible_time_entry.comments)+ .to have_css('.comments', text: other_visible_time_entry.comments)expect(page)- .to have_selector('.hours', text: other_visible_time_entry.hours)+ .to have_css('.hours', text: other_visible_time_entry.hours)# Allows to editpage.find_test_selector("edit-time-entry-#{visible_time_entry.id}").click@@ -143,7 +143,7 @@ RSpec.describe 'Time entries widget on dashboard', js: true dotime_logging_modal.is_visible falsewithin spent_time_widget.area do- expect(page).to have_selector('.hours', text: 4)+ expect(page).to have_css('.hours', text: 4)endvisible_time_entry.reloaddiff --git a/modules/dashboards/spec/features/work_package_calendar_spec.rb b/modules/dashboards/spec/features/work_package_calendar_spec.rbindex 4c37913d78c..f217ef8b7f0 100644--- a/modules/dashboards/spec/features/work_package_calendar_spec.rb+++ b/modules/dashboards/spec/features/work_package_calendar_spec.rb@@ -30,8 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'Work package calendar widget on dashboard',- js: true do+RSpec.describe 'Work package calendar widget on dashboard', :js dolet!(:type) { create(:type) }let!(:priority) { create(:default_priority) }let!(:project) { create(:project, types: [type]) }@@ -125,19 +124,19 @@ RSpec.describe 'Work package calendar widget on dashboard',within(calendar_widget.area) doexpect(page)- .to have_selector('.fc-event-title', text: spanning_work_package.subject)+ .to have_css('.fc-event-title', text: spanning_work_package.subject)expect(page)- .to have_selector('.fc-event-title', text: starting_work_package.subject)+ .to have_css('.fc-event-title', text: starting_work_package.subject)expect(page)- .to have_selector('.fc-event-title', text: ending_work_package.subject)+ .to have_css('.fc-event-title', text: ending_work_package.subject)expect(page)- .not_to have_selector('.fc-event-title', text: outdated_work_package.subject)+ .to have_no_css('.fc-event-title', text: outdated_work_package.subject)expect(page)- .not_to have_selector('.fc-event-title', text: other_project_work_package.subject)+ .to have_no_css('.fc-event-title', text: other_project_work_package.subject)endendenddiff --git a/modules/dashboards/spec/features/work_package_graph_overview_spec.rb b/modules/dashboards/spec/features/work_package_graph_overview_spec.rbindex 68ad32eae7c..d4ce90faaf7 100644--- a/modules/dashboards/spec/features/work_package_graph_overview_spec.rb+++ b/modules/dashboards/spec/features/work_package_graph_overview_spec.rb@@ -30,8 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'Work package overview graph widget on dashboard',- js: true do+RSpec.describe 'Work package overview graph widget on dashboard', :js dolet!(:type) { create(:type) }let!(:priority) { create(:default_priority) }let!(:project) { create(:project, types: [type]) }diff --git a/modules/dashboards/spec/features/work_package_graph_spec.rb b/modules/dashboards/spec/features/work_package_graph_spec.rbindex 2b60220e5df..e92115db6a3 100644--- a/modules/dashboards/spec/features/work_package_graph_spec.rb+++ b/modules/dashboards/spec/features/work_package_graph_spec.rb@@ -30,8 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'Arbitrary WorkPackage query graph widget dashboard',- js: true, with_ee: %i[grid_widget_wp_graph] do+RSpec.describe 'Arbitrary WorkPackage query graph widget dashboard', :js, with_ee: %i[grid_widget_wp_graph] dolet!(:type) { create(:type) }let!(:other_type) { create(:type) }let!(:priority) { create(:default_priority) }@@ -172,7 +171,7 @@ RSpec.describe 'Arbitrary WorkPackage query graph widget dashboard',# At this point the add widget modal is openexpect(page)- .not_to have_content("Work packages graph")+ .to have_no_content("Work packages graph")endendenddiff --git a/modules/dashboards/spec/features/work_package_table_spec.rb b/modules/dashboards/spec/features/work_package_table_spec.rbindex ae751a2122a..26165c9f61c 100644--- a/modules/dashboards/spec/features/work_package_table_spec.rb+++ b/modules/dashboards/spec/features/work_package_table_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../support/pages/dashboard'-RSpec.describe 'Arbitrary WorkPackage query table widget dashboard', js: true do+RSpec.describe 'Arbitrary WorkPackage query table widget dashboard', :js dolet!(:type) { create(:type) }let!(:other_type) { create(:type) }let!(:priority) { create(:default_priority) }@@ -98,7 +98,7 @@ RSpec.describe 'Arbitrary WorkPackage query table widget dashboard', js: true do# Using it here as a safeguard to govern speed.wp_area = Components::Grids::GridArea.new('.grid--area.-widgeted:nth-of-type(1)')expect(wp_area)- .to have_selector('.subject', text: type_work_package.subject)+ .to have_css('.subject', text: type_work_package.subject)dashboard_page.add_widget(1, 1, :row, "Work packages table")@@ -108,14 +108,14 @@ RSpec.describe 'Arbitrary WorkPackage query table widget dashboard', js: true do# At the beginning, the default query is displayedexpect(filter_area.area)- .to have_selector('.subject', text: type_work_package.subject, wait: 30)+ .to have_css('.subject', text: type_work_package.subject, wait: 30)expect(filter_area.area)- .to have_selector('.subject', text: other_type_work_package.subject)+ .to have_css('.subject', text: other_type_work_package.subject)# Work packages from other projects are not displayed as the query is project scopedexpect(filter_area.area)- .not_to have_selector('.subject', text: other_project_work_package.subject)+ .to have_no_css('.subject', text: other_project_work_package.subject)# User has the ability to modify the query@@ -131,19 +131,19 @@ RSpec.describe 'Arbitrary WorkPackage query table widget dashboard', js: true docolumns.remove 'Subject'expect(filter_area.area)- .to have_selector('.id', text: type_work_package.id)+ .to have_css('.id', text: type_work_package.id)# as the Subject column is disabledexpect(filter_area.area)- .not_to have_selector('.subject', text: type_work_package.subject)+ .to have_no_css('.subject', text: type_work_package.subject)# As other_type is filtered outexpect(filter_area.area)- .not_to have_selector('.id', text: other_type_work_package.id)+ .to have_no_css('.id', text: other_type_work_package.id)# Work packages from other projects are not displayed as the query is project scopedexpect(filter_area.area)- .not_to have_selector('.subject', text: other_project_work_package.subject)+ .to have_no_css('.subject', text: other_project_work_package.subject)scroll_to_element(filter_area.area)within filter_area.area do@@ -162,19 +162,19 @@ RSpec.describe 'Arbitrary WorkPackage query table widget dashboard', js: true dofilter_area = Components::Grids::GridArea.new('.grid--area.-widgeted:nth-of-type(2)')expect(filter_area.area)- .to have_selector('.id', text: type_work_package.id)+ .to have_css('.id', text: type_work_package.id)# as the Subject column is disabledexpect(filter_area.area)- .not_to have_selector('.subject', text: type_work_package.subject)+ .to have_no_css('.subject', text: type_work_package.subject)# As other_type is filtered outexpect(filter_area.area)- .not_to have_selector('.id', text: other_type_work_package.id)+ .to have_no_css('.id', text: other_type_work_package.id)# Work packages from other projects are not displayed as the query is project scopedexpect(filter_area.area)- .not_to have_selector('.subject', text: other_project_work_package.subject)+ .to have_no_css('.subject', text: other_project_work_package.subject)within filter_area.area doexpect(page).to have_field('editable-toolbar-title', with: 'My WP Filter', wait: 10)diff --git a/modules/dashboards/spec/requests/api/v3/attachments/grid_spec.rb b/modules/dashboards/spec/requests/api/v3/attachments/grid_spec.rbindex 37ca93750de..3a22d712079 100644--- a/modules/dashboards/spec/requests/api/v3/attachments/grid_spec.rb+++ b/modules/dashboards/spec/requests/api/v3/attachments/grid_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require File.join(Rails.root, 'spec', 'requests', 'api', 'v3', 'attachments', 'attachment_resource_shared_examples')+require Rails.root.join("spec/requests/api/v3/attachments/attachment_resource_shared_examples").to_sRSpec.describe "grid attachments" dobefore dodiff --git a/modules/documents/db/migrate/20180323140208_to_v710_aggregated_documents_migrations.rb b/modules/documents/db/migrate/20180323140208_to_v710_aggregated_documents_migrations.rbindex 9c61b1d39b3..0fb548865ca 100644--- a/modules/documents/db/migrate/20180323140208_to_v710_aggregated_documents_migrations.rb+++ b/modules/documents/db/migrate/20180323140208_to_v710_aggregated_documents_migrations.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require Rails.root.join("db", "migrate", "migration_utils", "migration_squasher").to_s+require Rails.root.join("db/migrate/migration_utils/migration_squasher").to_s# This migration aggregates the migrations detailed in MIGRATION_FILESclass ToV710AggregatedDocumentsMigrations < ActiveRecord::Migration[5.1]MIGRATION_FILES = <<-MIGRATIONSdiff --git a/modules/github_integration/lib/open_project/github_integration/hook_handler.rb b/modules/github_integration/lib/open_project/github_integration/hook_handler.rbindex 78fe910053e..13c604b5aee 100644--- a/modules/github_integration/lib/open_project/github_integration/hook_handler.rb+++ b/modules/github_integration/lib/open_project/github_integration/hook_handler.rb@@ -55,7 +55,7 @@ module OpenProject::GithubIntegration'github_event' => event_type,'github_delivery' => event_delivery)- OpenProject::Notifications.send("github.#{event_type}", payload)+ OpenProject::Notifications.send(:"github.#{event_type}", payload)200enddiff --git a/modules/github_integration/lib/open_project/github_integration/notification_handler.rb b/modules/github_integration/lib/open_project/github_integration/notification_handler.rbindex 6bc5619a0df..8efd1e5a51a 100644--- a/modules/github_integration/lib/open_project/github_integration/notification_handler.rb+++ b/modules/github_integration/lib/open_project/github_integration/notification_handler.rb@@ -26,9 +26,9 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './notification_handler/helper'-require_relative './notification_handler/issue_comment'-require_relative './notification_handler/pull_request'+require_relative 'notification_handler/helper'+require_relative 'notification_handler/issue_comment'+require_relative 'notification_handler/pull_request'module OpenProject::GithubIntegration##diff --git a/modules/github_integration/lib/open_project/github_integration/services.rb b/modules/github_integration/lib/open_project/github_integration/services.rbindex 6156062f7a7..edecc0f94e1 100644--- a/modules/github_integration/lib/open_project/github_integration/services.rb+++ b/modules/github_integration/lib/open_project/github_integration/services.rb@@ -26,6 +26,6 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './services/upsert_check_run'-require_relative './services/upsert_github_user'-require_relative './services/upsert_pull_request'+require_relative 'services/upsert_check_run'+require_relative 'services/upsert_github_user'+require_relative 'services/upsert_pull_request'diff --git a/modules/github_integration/spec/features/work_package_activity_spec.rb b/modules/github_integration/spec/features/work_package_activity_spec.rbindex df38f3f0095..108889c1cdd 100644--- a/modules/github_integration/spec/features/work_package_activity_spec.rb+++ b/modules/github_integration/spec/features/work_package_activity_spec.rb@@ -114,7 +114,7 @@ RSpec.describe 'Work Package Activity Tab',github_user_link: pull_request_merging_user.github_login)}GITHUB_MERGE_COMMENT- expect(page).to have_selector('.user-comment > .message', text: expected_merge_comment)+ expect(page).to have_css('.user-comment > .message', text: expected_merge_comment)endendend@@ -148,7 +148,7 @@ RSpec.describe 'Work Package Activity Tab',github_user_link: pull_request_author.github_login)}GITHUB_REFERENCED_COMMENT- expect(page).to have_selector('.user-comment > .message', text: expected_referenced_comment)+ expect(page).to have_css('.user-comment > .message', text: expected_referenced_comment)endendend@@ -182,7 +182,7 @@ RSpec.describe 'Work Package Activity Tab',github_user_link: pull_request_author.github_login)}GITHUB_READY_FOR_REVIEW_COMMENT- expect(page).to have_selector('.user-comment > .message', text: expected_action_comment)+ expect(page).to have_css('.user-comment > .message', text: expected_action_comment)endendenddiff --git a/modules/github_integration/spec/features/work_package_github_tab_spec.rb b/modules/github_integration/spec/features/work_package_github_tab_spec.rbindex 1ee143ac188..d035f53baaa 100644--- a/modules/github_integration/spec/features/work_package_github_tab_spec.rb+++ b/modules/github_integration/spec/features/work_package_github_tab_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require_relative '../support/pages/work_package_github_tab'-RSpec.describe 'Open the GitHub tab', js: true do+RSpec.describe 'Open the GitHub tab', :js dolet(:user) docreate(:user,member_with_roles: { project => role })diff --git a/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/issue_comment_spec.rb b/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/issue_comment_spec.rbindex b1b79cf99c3..c3734768753 100644--- a/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/issue_comment_spec.rb+++ b/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/issue_comment_spec.rb@@ -95,7 +95,7 @@ RSpec.describe OpenProject::GithubIntegration::NotificationHandler::IssueCommentexpect(received_payload.to_h).to eql payloadexpect(work_packages)- .to match_array [work_package]+ .to contain_exactly(work_package)endendenddiff --git a/modules/github_integration/spec/models/github_pull_request_spec.rb b/modules/github_integration/spec/models/github_pull_request_spec.rbindex d65bbf2a29b..f8da27d1565 100644--- a/modules/github_integration/spec/models/github_pull_request_spec.rb+++ b/modules/github_integration/spec/models/github_pull_request_spec.rb@@ -71,7 +71,7 @@ RSpec.describe GithubPullRequest dobefore { pull_request }- it { is_expected.to match_array([pull_request]) }+ it { is_expected.to contain_exactly(pull_request) }context 'when the pr is linked to a work_package' dolet(:work_packages) { create_list(:work_package, 1) }diff --git a/modules/github_integration/spec/support/pages/work_package_github_tab.rb b/modules/github_integration/spec/support/pages/work_package_github_tab.rbindex 1d5b83efad5..d4657329b7b 100644--- a/modules/github_integration/spec/support/pages/work_package_github_tab.rb+++ b/modules/github_integration/spec/support/pages/work_package_github_tab.rb@@ -56,7 +56,7 @@ module Pagesenddef expect_tab_not_present- expect(page).not_to have_selector('.op-tab-row--link', text: 'GITHUB')+ expect(page).to have_no_css('.op-tab-row--link', text: 'GITHUB')endprivatediff --git a/modules/github_integration/spec/workers/cron/clear_old_pull_requests_job_spec.rb b/modules/github_integration/spec/workers/cron/clear_old_pull_requests_job_spec.rbindex 2f644508e1a..beb5cc6fbbd 100644--- a/modules/github_integration/spec/workers/cron/clear_old_pull_requests_job_spec.rb+++ b/modules/github_integration/spec/workers/cron/clear_old_pull_requests_job_spec.rb@@ -48,6 +48,6 @@ RSpec.describe Cron::ClearOldPullRequestsJob, type: :job doexpect { job.perform }.to change(GithubPullRequest, :count).by(-1).and(change(GithubCheckRun, :count).by(-1))expect(GithubPullRequest.all)- .to match_array([pull_request_with_work_package])+ .to contain_exactly(pull_request_with_work_package)endenddiff --git a/modules/grids/spec/contracts/grids/create_contract_spec.rb b/modules/grids/spec/contracts/grids/create_contract_spec.rbindex a5885a2517d..c5a04e7623b 100644--- a/modules/grids/spec/contracts/grids/create_contract_spec.rb+++ b/modules/grids/spec/contracts/grids/create_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_examples'+require_relative 'shared_examples'RSpec.describe Grids::CreateContract doinclude_context 'grid contract'@@ -95,7 +95,7 @@ RSpec.describe Grids::CreateContract do.and_return(false)expect(instance.assignable_values(:widgets, user))- .to match_array [:widget1]+ .to contain_exactly(:widget1)endenddiff --git a/modules/grids/spec/contracts/grids/shared_examples.rb b/modules/grids/spec/contracts/grids/shared_examples.rbindex 94a6189d7a8..9c05ad4841f 100644--- a/modules/grids/spec/contracts/grids/shared_examples.rb+++ b/modules/grids/spec/contracts/grids/shared_examples.rb@@ -49,7 +49,7 @@ RSpec.shared_context 'grid contract' doinstance.validateexpect(instance.errors.details[attribute])- .to match_array [{ error: :greater_than, count: 0 }]+ .to contain_exactly({ error: :greater_than, count: 0 })endend@@ -60,7 +60,7 @@ RSpec.shared_context 'grid contract' doinstance.validateexpect(instance.errors.details[attribute])- .to match_array [{ error: :blank }]+ .to contain_exactly({ error: :blank })endendend@@ -86,7 +86,7 @@ RSpec.shared_examples_for 'shared grid contract attributes' doit 'notes the error' doinstance.validateexpect(instance.errors.details[:row_count])- .to match_array [{ error: :greater_than, count: 0 }]+ .to contain_exactly({ error: :greater_than, count: 0 })endendend@@ -107,7 +107,7 @@ RSpec.shared_examples_for 'shared grid contract attributes' doit 'notes the error' doinstance.validateexpect(instance.errors.details[:column_count])- .to match_array [{ error: :greater_than, count: 0 }]+ .to contain_exactly({ error: :greater_than, count: 0 })endendend@@ -124,7 +124,7 @@ RSpec.shared_examples_for 'shared grid contract attributes' doit 'is invalid for the grid superclass itself' doexpect(instance.errors.details[:scope])- .to match_array [{ error: :inclusion }]+ .to contain_exactly({ error: :inclusion })endendend@@ -160,7 +160,7 @@ RSpec.shared_examples_for 'shared grid contract attributes' doinstance.validateexpect(instance.errors.details[:widgets])- .to match_array [{ error: :inclusion }]+ .to contain_exactly({ error: :inclusion })endenddiff --git a/modules/grids/spec/contracts/grids/update_contract_spec.rb b/modules/grids/spec/contracts/grids/update_contract_spec.rbindex c3d9e784499..6bb5114b3d9 100644--- a/modules/grids/spec/contracts/grids/update_contract_spec.rb+++ b/modules/grids/spec/contracts/grids/update_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_examples'+require_relative 'shared_examples'RSpec.describe Grids::UpdateContract doinclude_context 'model contract'@@ -49,7 +49,7 @@ RSpec.describe Grids::UpdateContract doinstance.validate# scope because that is what type is called on the outside for gridsexpect(instance.errors.details[:scope])- .to match_array [{ error: :error_readonly }, { error: :inclusion }]+ .to contain_exactly({ error: :error_readonly }, { error: :inclusion })endenddiff --git a/modules/grids/spec/models/grids/grid_spec.rb b/modules/grids/spec/models/grids/grid_spec.rbindex de6a117124b..a1edc503f0a 100644--- a/modules/grids/spec/models/grids/grid_spec.rb+++ b/modules/grids/spec/models/grids/grid_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_model'+require_relative 'shared_model'RSpec.describe Grids::Grid dolet(:instance) { Grids::Grid.new column_count: 5, row_count: 5 }diff --git a/modules/grids/spec/support/pages/grid.rb b/modules/grids/spec/support/pages/grid.rbindex bbb98dc4ca2..b0772d00601 100644--- a/modules/grids/spec/support/pages/grid.rb+++ b/modules/grids/spec/support/pages/grid.rb@@ -43,7 +43,7 @@ module Pagesdef expect_no_help_modeexpect(page)- .not_to have_selector('.toolbar-item .icon-add')+ .to have_no_css('.toolbar-item .icon-add')enddef expect_unable_to_add_widget(row_number, column_number, location, name = nil)@@ -60,7 +60,7 @@ module Pages.to have_content(I18n.t('js.grid.add_widget'))expect(page)- .to have_selector('.op-toast.-ee-upsale', text: I18n.t('js.upsale.ee_only'))+ .to have_css('.op-toast.-ee-upsale', text: I18n.t('js.upsale.ee_only'))endend@@ -99,7 +99,7 @@ module Pagesarea.hoverexpect(area)- .not_to have_selector('.grid--widget-add')+ .to have_no_css('.grid--widget-add')enddef expect_specific_widget_unaddable(row_number, column_number, location, name)@@ -108,7 +108,7 @@ module Pages.to have_content(I18n.t('js.grid.add_widget'))expect(page)- .not_to have_selector('[data-test-selector="op-grid--addable-widget"]', text: Regexp.new("^#{name}$"))+ .to have_no_css('[data-test-selector="op-grid--addable-widget"]', text: Regexp.new("^#{name}$"))endendenddiff --git a/modules/job_status/spec/features/job_status_spec.rb b/modules/job_status/spec/features/job_status_spec.rbindex e2bc1bc4e54..4e6002ae374 100644--- a/modules/job_status/spec/features/job_status_spec.rb+++ b/modules/job_status/spec/features/job_status_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Job status', js: true do+RSpec.describe 'Job status', :js doshared_let(:admin) { create(:admin) }before do@@ -38,7 +38,7 @@ RSpec.describe 'Job status', js: true doit 'renders a descriptive error in case of 404' dovisit '/job_statuses/something-that-does-not-exist'- expect(page).to have_selector('.icon-big.icon-help', wait: 10)+ expect(page).to have_css('.icon-big.icon-help', wait: 10)expect(page).to have_content I18n.t('js.job_status.generic_messages.not_found')end@@ -49,12 +49,12 @@ RSpec.describe 'Job status', js: true dostatus.update! payload: { errors: ['Some error', 'Another error'] }end- it 'will show a list of these errors' do+ it 'shows a list of these errors' dovisit "/job_statuses/#{status.job_id}"- expect(page).to have_selector('.job-status--modal-additional-errors', text: 'Some errors have occurred', wait: 10)- expect(page).to have_selector('ul li', text: 'Some error')- expect(page).to have_selector('ul li', text: 'Another error')+ expect(page).to have_css('.job-status--modal-additional-errors', text: 'Some errors have occurred', wait: 10)+ expect(page).to have_css('ul li', text: 'Some error')+ expect(page).to have_css('ul li', text: 'Another error')endend@@ -65,12 +65,12 @@ RSpec.describe 'Job status', js: true dostatus.update! payload: { redirect: home_url, errors: ['Some error'] }end- it 'will not automatically redirect' do+ it 'does not automatically redirect' dovisit "/job_statuses/#{status.job_id}"- expect(page).to have_selector('.job-status--modal-additional-errors', text: 'Some errors have occurred', wait: 10)- expect(page).to have_selector('ul li', text: 'Some error')- expect(page).to have_selector("a[href='#{home_url}']", text: 'Please click here to continue')+ expect(page).to have_css('.job-status--modal-additional-errors', text: 'Some errors have occurred', wait: 10)+ expect(page).to have_css('ul li', text: 'Some error')+ expect(page).to have_css("a[href='#{home_url}']", text: 'Please click here to continue')endendenddiff --git a/modules/ldap_groups/spec/features/administration_spec.rb b/modules/ldap_groups/spec/features/administration_spec.rbindex 0ed808dff07..37b94cfafc2 100644--- a/modules/ldap_groups/spec/features/administration_spec.rb+++ b/modules/ldap_groups/spec/features/administration_spec.rb@@ -1,6 +1,6 @@require_relative '../spec_helper'-RSpec.describe 'LDAP group sync administration spec', js: true do+RSpec.describe 'LDAP group sync administration spec', :js dolet(:admin) { create(:admin) }before do@@ -10,7 +10,7 @@ RSpec.describe 'LDAP group sync administration spec', js: true docontext 'without EE' doit 'shows upsale' do- expect(page).to have_selector('.upsale-notification')+ expect(page).to have_css('.upsale-notification')endend@@ -19,7 +19,7 @@ RSpec.describe 'LDAP group sync administration spec', js: true dolet!(:auth_source) { create(:ldap_auth_source, name: 'ldap') }it 'allows synced group administration flow' do- expect(page).not_to have_selector('.upsale-notification')+ expect(page).to have_no_css('.upsale-notification')# Create groupfind('.button', text: I18n.t('ldap_groups.synchronized_groups.singular')).click@@ -31,16 +31,16 @@ RSpec.describe 'LDAP group sync administration spec', js: true docheck 'synchronized_group_sync_users'click_on 'Create'- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_create))- expect(page).to have_selector('td.dn', text: 'cn=foo,ou=groups,dc=example,dc=com')- expect(page).to have_selector('td.ldap_auth_source', text: 'ldap')- expect(page).to have_selector('td.group', text: 'foo')- expect(page).to have_selector('td.users', text: '0')+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_successful_create))+ expect(page).to have_css('td.dn', text: 'cn=foo,ou=groups,dc=example,dc=com')+ expect(page).to have_css('td.ldap_auth_source', text: 'ldap')+ expect(page).to have_css('td.group', text: 'foo')+ expect(page).to have_css('td.users', text: '0')# Show entrySeleniumHubWaiter.waitfind('td.dn a').click- expect(page).to have_selector '.generic-table--empty-row'+ expect(page).to have_css '.generic-table--empty-row'# Check created groupsync = LdapGroups::SynchronizedGroup.last@@ -51,7 +51,7 @@ RSpec.describe 'LDAP group sync administration spec', js: true do# Assume we have a membershipsync.users.create user_id: admin.idvisit ldap_groups_synchronized_group_path(sync)- expect(page).to have_selector 'td.user', text: admin.name+ expect(page).to have_css 'td.user', text: admin.namememberships = sync.users.pluck(:id)@@ -65,8 +65,8 @@ RSpec.describe 'LDAP group sync administration spec', js: true doSeleniumHubWaiter.waitclick_on 'Delete'- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_delete))- expect(page).to have_selector '.generic-table--empty-row'+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_successful_delete))+ expect(page).to have_css '.generic-table--empty-row'expect(LdapGroups::Membership.where(id: memberships)).to be_emptyenddiff --git a/modules/ldap_groups/spec/features/filter_administration_spec.rb b/modules/ldap_groups/spec/features/filter_administration_spec.rbindex 1f5beada2e6..c8a73e803e2 100644--- a/modules/ldap_groups/spec/features/filter_administration_spec.rb+++ b/modules/ldap_groups/spec/features/filter_administration_spec.rb@@ -1,6 +1,6 @@require_relative '../spec_helper'-RSpec.describe 'LDAP group filter administration spec', js: true do+RSpec.describe 'LDAP group filter administration spec', :js dolet(:admin) { create(:admin) }before do@@ -40,8 +40,8 @@ RSpec.describe 'LDAP group filter administration spec', js: true dopage.find('td.name a', text: 'bar').clickexpect(page).to have_text I18n.t(:label_seeded_from_env_warning)- expect(page).not_to have_link 'Edit'- expect(page).not_to have_link 'Delete'+ expect(page).to have_no_link 'Edit'+ expect(page).to have_no_link 'Delete'endendenddiff --git a/modules/ldap_groups/spec/services/synchronization_spec.rb b/modules/ldap_groups/spec/services/synchronization_spec.rbindex 464e33c8cad..2b4bfb5da2d 100644--- a/modules/ldap_groups/spec/services/synchronization_spec.rb+++ b/modules/ldap_groups/spec/services/synchronization_spec.rb@@ -155,7 +155,7 @@ RSpec.describe LdapGroups::SynchronizeGroupsService, with_ee: %i[ldap_groups] doexpect { synced_foo.reload }.to raise_error ActiveRecord::RecordNotFoundexpect(group_bar.users)- .to match_array([user_aa729.reload, user_bb459.reload, user_cc414.reload])+ .to contain_exactly(user_aa729.reload, user_bb459.reload, user_cc414.reload)expect(LdapGroups::Membership.where(group_id: synced_foo_id)).to be_emptyenddiff --git a/modules/ldap_groups/spec/services/synchronize_filter_spec.rb b/modules/ldap_groups/spec/services/synchronize_filter_spec.rbindex 08022540f09..77cc5457eed 100644--- a/modules/ldap_groups/spec/services/synchronize_filter_spec.rb+++ b/modules/ldap_groups/spec/services/synchronize_filter_spec.rb@@ -56,8 +56,8 @@ RSpec.describe LdapGroups::SynchronizeFilterService, with_ee: %i[ldap_groups] do# Expect two synchronized groups addedexpect(filter_foo_bar.groups.count).to eq 2- expect(filter_foo_bar.groups.map(&:dn)).to match_array ['cn=foo,ou=groups,dc=example,dc=com',- 'cn=bar,ou=groups,dc=example,dc=com']+ expect(filter_foo_bar.groups.map(&:dn)).to contain_exactly('cn=foo,ou=groups,dc=example,dc=com',+ 'cn=bar,ou=groups,dc=example,dc=com')# Expect two actual groups addedop_foo_group = Group.find_by(lastname: 'foo')diff --git a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rb b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rbindex 039642b0121..88a711c49b0 100644--- a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rb+++ b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rb@@ -89,7 +89,8 @@ module MeetingAgendaItemsdef add_note_action_item(menu)menu.with_item(label: t("label_agenda_item_add_notes"),- href: edit_meeting_agenda_item_path(@meeting_agenda_item.meeting, @meeting_agenda_item, display_notes_input: true),+ href: edit_meeting_agenda_item_path(@meeting_agenda_item.meeting, @meeting_agenda_item,+ display_notes_input: true),content_arguments: {data: { 'turbo-stream': true }}) do |item|diff --git a/modules/meeting/app/components/meetings/sidebar/details_component.rb b/modules/meeting/app/components/meetings/sidebar/details_component.rbindex ad0df4a3c10..d4d930ccc79 100644--- a/modules/meeting/app/components/meetings/sidebar/details_component.rb+++ b/modules/meeting/app/components/meetings/sidebar/details_component.rb@@ -47,6 +47,7 @@ module Meetingsendendend+def render_meeting_attribute_row(icon, &)flex_layout(align_items: :center, justify_content: :space_between) do |flex|flex.with_column dodiff --git a/modules/meeting/app/forms/meeting_agenda_item/meeting_form.rb b/modules/meeting/app/forms/meeting_agenda_item/meeting_form.rbindex 719c53c44b2..40b19297e2b 100644--- a/modules/meeting/app/forms/meeting_agenda_item/meeting_form.rb+++ b/modules/meeting/app/forms/meeting_agenda_item/meeting_form.rb@@ -38,7 +38,7 @@ class MeetingAgendaItem::MeetingForm < ApplicationFormcaption: I18n.t("label_meeting_selection_caption"),autocomplete_options: {multiple: false,- decorated: true,+ decorated: true}) do |select|MeetingAgendaItems::CreateContractdiff --git a/modules/meeting/app/helpers/meeting_contents_helper.rb b/modules/meeting/app/helpers/meeting_contents_helper.rbindex f62eb60699f..e3ab854a459 100644--- a/modules/meeting/app/helpers/meeting_contents_helper.rb+++ b/modules/meeting/app/helpers/meeting_contents_helper.rb@@ -97,7 +97,7 @@ module MeetingContentsHelperendend- def meeting_content_edit_link(content_type)+ def meeting_content_edit_link(_content_type)content_tag :li, '', class: 'toolbar-item' dolink_to '',class: 'button button--edit-agenda',diff --git a/modules/meeting/app/helpers/meetings_helper.rb b/modules/meeting/app/helpers/meetings_helper.rbindex f69267c7459..a7f7fc1f73f 100644--- a/modules/meeting/app/helpers/meetings_helper.rb+++ b/modules/meeting/app/helpers/meetings_helper.rb@@ -142,7 +142,7 @@ module MeetingsHelperreturn '' if journal.initial?journal_content = render_journal_details(journal, :label_updated_time_by, model, options)- content_tag 'div', journal_content, id: "change-#{journal.id}", class: 'journal'+ content_tag 'div', journal_content, id: "change-#{journal.id}", class: 'journal'end# This renders a journal entry with a header and detailsdiff --git a/modules/meeting/app/mailers/meeting_mailer.rb b/modules/meeting/app/mailers/meeting_mailer.rbindex 74b0435252c..7def8247802 100644--- a/modules/meeting/app/mailers/meeting_mailer.rb+++ b/modules/meeting/app/mailers/meeting_mailer.rb@@ -74,7 +74,6 @@ class MeetingMailer < UserMailerdef with_attached_ics(meeting, user)User.execute_as(user) do-call = ::Meetings::ICalService.new(user:, meeting: @meeting).calldiff --git a/modules/meeting/app/models/meeting.rb b/modules/meeting/app/models/meeting.rbindex 0a96881f119..add973eda07 100644--- a/modules/meeting/app/models/meeting.rb+++ b/modules/meeting/app/models/meeting.rb@@ -109,7 +109,7 @@ class Meeting < ApplicationRecordenddef start_time=(value)- super value&.to_datetime+ super(value&.to_datetime)enddef start_month@@ -154,7 +154,7 @@ class Meeting < ApplicationRecorddef all_changeable_participantschangeable_participants = participants.select(&:invited).collect(&:user)changeable_participants = changeable_participants + participants.select(&:attended).collect(&:user)- changeable_participants = changeable_participants + \+ changeable_participants = changeable_participants +User.allowed_members(:view_meetings, project)changeable_participantsdiff --git a/modules/meeting/app/models/meeting_agenda_item.rb b/modules/meeting/app/models/meeting_agenda_item.rbindex f60f50286f4..c0811dfc67b 100644--- a/modules/meeting/app/models/meeting_agenda_item.rb+++ b/modules/meeting/app/models/meeting_agenda_item.rb@@ -35,7 +35,7 @@ class MeetingAgendaItem < ApplicationRecordenum item_type: ITEM_TYPES- belongs_to :meeting, foreign_key: 'meeting_id', class_name: 'StructuredMeeting'+ belongs_to :meeting, class_name: 'StructuredMeeting'belongs_to :work_package, class_name: '::WorkPackage'has_one :project, through: :meetingbelongs_to :author, class_name: 'User', optional: falsediff --git a/modules/meeting/db/migrate/20180323135408_to_v710_aggregated_meeting_migrations.rb b/modules/meeting/db/migrate/20180323135408_to_v710_aggregated_meeting_migrations.rbindex d808b4d44f2..9aa249ad92c 100644--- a/modules/meeting/db/migrate/20180323135408_to_v710_aggregated_meeting_migrations.rb+++ b/modules/meeting/db/migrate/20180323135408_to_v710_aggregated_meeting_migrations.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require Rails.root.join("db", "migrate", "migration_utils", "migration_squasher").to_s+require Rails.root.join("db/migrate/migration_utils/migration_squasher").to_s# This migration aggregates the migrations detailed in MIGRATION_FILESclass ToV710AggregatedMeetingMigrations < ActiveRecord::Migration[5.1]MIGRATION_FILES = <<-MIGRATIONSdiff --git a/modules/meeting/spec/controllers/meetings_controller_spec.rb b/modules/meeting/spec/controllers/meetings_controller_spec.rbindex 7a59f6944c8..4771ef8cb50 100644--- a/modules/meeting/spec/controllers/meetings_controller_spec.rb+++ b/modules/meeting/spec/controllers/meetings_controller_spec.rb@@ -177,8 +177,8 @@ RSpec.describe MeetingsController doexpect(response).to have_http_status :okexpect(response).to render_template :newexpect(response.body)- .to have_selector '#errorExplanation li',- text: "Date #{I18n.t('activerecord.errors.messages.not_an_iso_date')}"+ .to have_css '#errorExplanation li',+ text: "Date #{I18n.t('activerecord.errors.messages.not_an_iso_date')}"endend@@ -191,8 +191,8 @@ RSpec.describe MeetingsController doexpect(response).to have_http_status :okexpect(response).to render_template :newexpect(response.body)- .to have_selector '#errorExplanation li',- text: "Starting time #{I18n.t('activerecord.errors.messages.invalid_time_format')}"+ .to have_css '#errorExplanation li',+ text: "Starting time #{I18n.t('activerecord.errors.messages.invalid_time_format')}"endendend@@ -204,8 +204,8 @@ RSpec.describe MeetingsController doexpect(response).to have_http_status :okexpect(response).to render_template :newexpect(response.body)- .to have_selector '#errorExplanation li',- text: "Project #{I18n.t('activerecord.errors.messages.blank')}"+ .to have_css '#errorExplanation li',+ text: "Project #{I18n.t('activerecord.errors.messages.blank')}"endend@@ -217,8 +217,8 @@ RSpec.describe MeetingsController doexpect(response).to have_http_status :okexpect(response).to render_template :newexpect(response.body)- .to have_selector '#errorExplanation li',- text: "Project #{I18n.t('activerecord.errors.messages.blank')}"+ .to have_css '#errorExplanation li',+ text: "Project #{I18n.t('activerecord.errors.messages.blank')}"endendenddiff --git a/modules/meeting/spec/features/meetings_activity_spec.rb b/modules/meeting/spec/features/meetings_activity_spec.rbindex 4edbaeb6520..7c623f90905 100644--- a/modules/meeting/spec/features/meetings_activity_spec.rb+++ b/modules/meeting/spec/features/meetings_activity_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Meetings', js: true do+RSpec.describe 'Meetings', :js dolet(:project) { create(:project, enabled_module_names: %w[meetings activity]) }let(:user) { create(:admin) }@@ -47,9 +47,9 @@ RSpec.describe 'Meetings', js: true docheck 'Meetings'click_on 'Apply'- expect(page).to have_selector('.op-activity-list--item-title', text: 'Minutes: Awesome meeting!')- expect(page).to have_selector('.op-activity-list--item-title', text: 'Agenda: Awesome meeting!')- expect(page).to have_selector('.op-activity-list--item-title', text: 'Meeting: Awesome meeting!')+ expect(page).to have_css('.op-activity-list--item-title', text: 'Minutes: Awesome meeting!')+ expect(page).to have_css('.op-activity-list--item-title', text: 'Agenda: Awesome meeting!')+ expect(page).to have_css('.op-activity-list--item-title', text: 'Meeting: Awesome meeting!')endendenddiff --git a/modules/meeting/spec/features/meetings_attachments_spec.rb b/modules/meeting/spec/features/meetings_attachments_spec.rbindex eb9e9b0c536..e1ed93526f3 100644--- a/modules/meeting/spec/features/meetings_attachments_spec.rb+++ b/modules/meeting/spec/features/meetings_attachments_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'require 'features/page_objects/notification'-RSpec.describe 'Add an attachment to a meeting (agenda)', js: true, with_cuprite: false do+RSpec.describe 'Add an attachment to a meeting (agenda)', :js, with_cuprite: false dolet(:role) docreate(:project_role, permissions: %i[view_meetings edit_meetings create_meeting_agendas])end@@ -49,7 +49,7 @@ RSpec.describe 'Add an attachment to a meeting (agenda)', js: true, with_cupritecontent = find_test_selector('op-meeting--meeting_agenda')- expect(content).to have_selector('img')+ expect(content).to have_css('img')expect(content).to have_content('Some image caption')endenddiff --git a/modules/meeting/spec/features/meetings_close_spec.rb b/modules/meeting/spec/features/meetings_close_spec.rbindex 438fca6eabb..b0fb0a47d1d 100644--- a/modules/meeting/spec/features/meetings_close_spec.rb+++ b/modules/meeting/spec/features/meetings_close_spec.rb@@ -46,7 +46,7 @@ RSpec.describe 'Meetings close' dologin_as(user)end- context 'with permission to close meetings', js: true do+ context 'with permission to close meetings', :js dolet(:permissions) { %i[view_meetings close_meeting_agendas] }it 'can delete own and other`s meetings' do@@ -57,7 +57,7 @@ RSpec.describe 'Meetings close' do# Go to minutes, expect uneditablefind('.op-tab-row--link', text: 'MINUTES').click- expect(page).to have_selector('.button', text: 'Close the agenda to begin the Minutes')+ expect(page).to have_css('.button', text: 'Close the agenda to begin the Minutes')# Close the meetingfind('.op-tab-row--link', text: 'AGENDA').click@@ -66,17 +66,17 @@ RSpec.describe 'Meetings close' doend# Expect to be on minutes- expect(page).to have_selector('.op-tab-row--link_selected', text: 'MINUTES')+ expect(page).to have_css('.op-tab-row--link_selected', text: 'MINUTES')# Copies the text- expect(page).to have_selector('#tab-content-minutes', text: 'asdf')+ expect(page).to have_css('#tab-content-minutes', text: 'asdf')# Go back to agenda, expect we can open it againfind('.op-tab-row--link', text: 'AGENDA').clickaccept_confirm dofind('.button', text: 'Open').clickend- expect(page).to have_selector('.button', text: 'Close')+ expect(page).to have_css('.button', text: 'Close')endend@@ -87,7 +87,7 @@ RSpec.describe 'Meetings close' dovisit meetings_path(project)expect(page)- .not_to have_link 'Close'+ .to have_no_link 'Close'endendenddiff --git a/modules/meeting/spec/features/meetings_copy_spec.rb b/modules/meeting/spec/features/meetings_copy_spec.rbindex 8c4c4a098eb..48de9243edf 100644--- a/modules/meeting/spec/features/meetings_copy_spec.rb+++ b/modules/meeting/spec/features/meetings_copy_spec.rb@@ -73,7 +73,7 @@ RSpec.describe 'Meetings copy', :js, :with_cuprite dologin_as userend- it 'copying a meeting' do+ it 'copying a meeting' dovisit project_meetings_path(project)click_link meeting.title@@ -99,7 +99,7 @@ RSpec.describe 'Meetings copy', :js, :with_cuprite doclick_button "Create"# Be on the new meeting's page with copied over attributes- expect(page).not_to have_current_path meeting_path(meeting.id)+ expect(page).to have_no_current_path meeting_path(meeting.id)expect(page).to have_content("Added by #{user.name}")@@ -116,7 +116,7 @@ RSpec.describe 'Meetings copy', :js, :with_cuprite do# Does not copy the attendeesexpect(page)- .not_to have_content "Attendees: #{other_user.name}"+ .to have_no_content "Attendees: #{other_user.name}"expect(page).to have_content "Attendees:"diff --git a/modules/meeting/spec/features/meetings_delete_spec.rb b/modules/meeting/spec/features/meetings_delete_spec.rbindex 62ea1b68837..bfc9ec1d067 100644--- a/modules/meeting/spec/features/meetings_delete_spec.rb+++ b/modules/meeting/spec/features/meetings_delete_spec.rb@@ -48,7 +48,7 @@ RSpec.describe 'Meetings deletion' dologin_as(user)end- context 'with permission to delete meetings', js: true do+ context 'with permission to delete meetings', :js dolet(:permissions) { %i[view_meetings delete_meetings] }it "can delete own and other's meetings" do@@ -85,13 +85,13 @@ RSpec.describe 'Meetings deletion' doclick_link meeting.titleexpect(page)- .not_to have_link 'Delete'+ .to have_no_link 'Delete'visit index_pathclick_link other_meeting.titleexpect(page)- .not_to have_link 'Delete'+ .to have_no_link 'Delete'endendenddiff --git a/modules/meeting/spec/features/meetings_global_menu_item_spec.rb b/modules/meeting/spec/features/meetings_global_menu_item_spec.rbindex 27acea56141..047878b2482 100644--- a/modules/meeting/spec/features/meetings_global_menu_item_spec.rb+++ b/modules/meeting/spec/features/meetings_global_menu_item_spec.rb@@ -57,7 +57,7 @@ RSpec.describe 'Meetings global menu item',specify '"Upcoming meetings" is the default filter set' dowithin '#main-menu' do- expect(page).to have_selector('.selected', text: I18n.t(:label_upcoming_meetings))+ expect(page).to have_css('.selected', text: I18n.t(:label_upcoming_meetings))endendend@@ -71,7 +71,7 @@ RSpec.describe 'Meetings global menu item',it 'does not render' dowithin '#main-menu' do- expect(page).not_to have_link(meetings_label)+ expect(page).to have_no_link(meetings_label)endendenddiff --git a/modules/meeting/spec/features/meetings_locking_spec.rb b/modules/meeting/spec/features/meetings_locking_spec.rbindex 0fd7aab4008..cf4dbac72dc 100644--- a/modules/meeting/spec/features/meetings_locking_spec.rb+++ b/modules/meeting/spec/features/meetings_locking_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Meetings locking', js: true do+RSpec.describe 'Meetings locking', :js dolet(:project) { create(:project, enabled_module_names: %w[meetings]) }let(:user) { create(:admin) }let!(:meeting) { create(:meeting) }diff --git a/modules/meeting/spec/features/meetings_search_spec.rb b/modules/meeting/spec/features/meetings_search_spec.rbindex 489db2ee2ac..dfd6e4165c1 100644--- a/modules/meeting/spec/features/meetings_search_spec.rb+++ b/modules/meeting/spec/features/meetings_search_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Meeting search', js: true do+RSpec.describe 'Meeting search', :js doinclude Components::Autocompleter::NgSelectAutocompleteHelperslet(:project) { create(:project) }let(:role) { create(:project_role, permissions: %i(view_meetings view_work_packages)) }diff --git a/modules/meeting/spec/features/meetings_show_spec.rb b/modules/meeting/spec/features/meetings_show_spec.rbindex 28da09a860e..7715a4c020f 100644--- a/modules/meeting/spec/features/meetings_show_spec.rb+++ b/modules/meeting/spec/features/meetings_show_spec.rb@@ -29,8 +29,7 @@require 'spec_helper'require_relative '../support/pages/meetings/show'--RSpec.describe 'Meetings', js: true do+RSpec.describe 'Meetings', :js dolet(:project) { create(:project, enabled_module_names: %w[meetings]) }let(:role) { create(:project_role, permissions:) }let(:user) do@@ -50,10 +49,10 @@ RSpec.describe 'Meetings', js: true dovisit meetings_path(project)find('td.title a', text: 'Awesome meeting!', wait: 10).click- expect(page).to have_selector('h2', text: 'Meeting: Awesome meeting!')+ expect(page).to have_css('h2', text: 'Meeting: Awesome meeting!')expect(page).to have_test_selector('op-meeting--meeting_agenda',- text: 'There is currently nothing to display')+ text: 'There is currently nothing to display')endcontext 'with a location' do@@ -85,12 +84,12 @@ RSpec.describe 'Meetings', js: true doit 'shows the agenda' dovisit meeting_path(meeting)expect(page).to have_test_selector('op-meeting--meeting_agenda',- text: 'foo')+ text: 'foo')# May not edit- expect(page).not_to have_selector('.button--edit-agenda')+ expect(page).to have_no_css('.button--edit-agenda')expect(page).not_to have_test_selector('op-meeting--meeting_agenda',- text: 'Edit')+ text: 'Edit')endit 'can view history' do@@ -139,7 +138,7 @@ RSpec.describe 'Meetings', js: true doclick_link 'Minutes'expect(page).not_to have_test_selector('op-meeting--meeting_minutes', text: 'Edit')expect(page).to have_test_selector('op-meeting--meeting_minutes',- text: 'There is currently nothing to display')+ text: 'There is currently nothing to display')endendend@@ -149,9 +148,9 @@ RSpec.describe 'Meetings', js: true doit 'shows the minutes when visiting' dovisit meeting_path(meeting)- expect(page).not_to have_selector('h2', text: 'Agenda')- expect(page).not_to have_selector('#meeting_minutes_text')- expect(page).to have_selector('h2', text: 'Minutes')+ expect(page).to have_no_css('h2', text: 'Agenda')+ expect(page).to have_no_css('#meeting_minutes_text')+ expect(page).to have_css('h2', text: 'Minutes')endcontext 'and edit permissions' do@@ -170,8 +169,8 @@ RSpec.describe 'Meetings', js: true doclick_button 'Save'expect(page)- .to have_selector('.op-uc-container',- text: 'This is what we talked about')+ .to have_css('.op-uc-container',+ text: 'This is what we talked about')endendenddiff --git a/modules/meeting/spec/features/structured_meetings/mobile_structure_meeting_spec.rb b/modules/meeting/spec/features/structured_meetings/mobile_structure_meeting_spec.rbindex 00e85a41406..f951b91ba4c 100644--- a/modules/meeting/spec/features/structured_meetings/mobile_structure_meeting_spec.rb+++ b/modules/meeting/spec/features/structured_meetings/mobile_structure_meeting_spec.rb@@ -95,7 +95,7 @@ RSpec.describe 'Structured meetings CRUD',show_page.expect_participant(user, invited: true, attended: false, editable: false)show_page.expect_participant(other_user, invited: true, attended: false, editable: false)show_page.expect_available_participants(count: 2)- expect(page).not_to have_button('Save')+ expect(page).to have_no_button('Save')endshow_page.close_dialog@@ -110,7 +110,7 @@ RSpec.describe 'Structured meetings CRUD',show_page.expect_participant(user, invited: true, attended: false, editable: false)show_page.expect_participant(other_user, invited: true, attended: false, editable: false)show_page.expect_available_participants(count: 2)- expect(page).not_to have_button('Save')+ expect(page).to have_no_button('Save')endendenddiff --git a/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rb b/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rbindex 77a0d6e59a9..000556b07c4 100644--- a/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rb+++ b/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rb@@ -193,7 +193,7 @@ RSpec.describe 'Structured meetings CRUD',login_as other_usershow_page.visit!- expect(page).not_to have_css('#meeting-agenda-items-new-button-component')+ expect(page).to have_no_css('#meeting-agenda-items-new-button-component')expect(page).not_to have_test_selector('op-meeting-agenda-actions')end@@ -293,7 +293,7 @@ RSpec.describe 'Structured meetings CRUD',show_page.visit!show_page.expect_undisclosed_agenda_link agenda_item- expect(page).not_to have_text 'Private task'+ expect(page).to have_no_text 'Private task'endendenddiff --git a/modules/meeting/spec/features/structured_meetings/work_package_meetings_tab_spec.rb b/modules/meeting/spec/features/structured_meetings/work_package_meetings_tab_spec.rbindex 106a8b8fdb7..babcc0349d7 100644--- a/modules/meeting/spec/features/structured_meetings/work_package_meetings_tab_spec.rb+++ b/modules/meeting/spec/features/structured_meetings/work_package_meetings_tab_spec.rb@@ -122,8 +122,8 @@ RSpec.describe 'Open the Meetings tab', :js doexpect(page).to have_content(visible_meeting.title)expect(page).to have_content(meeting_agenda_item_of_visible_meeting.notes)- expect(page).not_to have_content(invisible_meeting.title)- expect(page).not_to have_content(meeting_agenda_item_of_invisible_meeting.notes)+ expect(page).to have_no_content(invisible_meeting.title)+ expect(page).to have_no_content(meeting_agenda_item_of_invisible_meeting.notes)endendend@@ -354,7 +354,7 @@ RSpec.describe 'Open the Meetings tab', :js domeetings_tab.open_add_to_meeting_dialogfill_in('meeting_agenda_item_meeting_id', with: past_meeting.title)- expect(page).not_to have_css('.ng-option-marked', text: past_meeting.title)+ expect(page).to have_no_css('.ng-option-marked', text: past_meeting.title)endit 'does not enable the user to select a closed, upcoming meeting' do@@ -364,7 +364,7 @@ RSpec.describe 'Open the Meetings tab', :js domeetings_tab.open_add_to_meeting_dialogfill_in('meeting_agenda_item_meeting_id', with: closed_upcoming_meeting.title)- expect(page).not_to have_css('.ng-option-marked', text: closed_upcoming_meeting.title)+ expect(page).to have_no_css('.ng-option-marked', text: closed_upcoming_meeting.title)endit 'requires a meeting to be selected' dodiff --git a/modules/meeting/spec/models/meeting_acts_as_journalized_spec.rb b/modules/meeting/spec/models/meeting_acts_as_journalized_spec.rbindex e677d5b1180..73e3e7d3c32 100644--- a/modules/meeting/spec/models/meeting_acts_as_journalized_spec.rb+++ b/modules/meeting/spec/models/meeting_acts_as_journalized_spec.rb@@ -92,15 +92,15 @@ RSpec.describe Meeting dodescribe 'agenda_items' dolet(:work_package) { nil }+ let(:agenda_item_attributes) { {} }+ let(:agenda_item) { meeting.agenda_items.first }+ let(:agenda_item_journals) { meeting.journals.last.agenda_item_journals }+before domeeting.agenda_items << create(:meeting_agenda_item, meeting:, work_package:, **agenda_item_attributes)meeting.saveend- let(:agenda_item_attributes) { {} }- let(:agenda_item) { meeting.agenda_items.first }- let(:agenda_item_journals) { meeting.journals.last.agenda_item_journals }-context 'for a new agenda item within aggregation time' doit { expect(meeting.journals.count).to eq(1) }it { expect(agenda_item_journals.count).to eq(1) }diff --git a/modules/meeting/spec/support/pages/meetings/edit.rb b/modules/meeting/spec/support/pages/meetings/edit.rbindex ec0b0c8e4d3..92552b59b30 100644--- a/modules/meeting/spec/support/pages/meetings/edit.rb+++ b/modules/meeting/spec/support/pages/meetings/edit.rb@@ -26,8 +26,8 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './base'-require_relative './show'+require_relative 'base'+require_relative 'show'module Pages::Meetingsclass Edit < Base@@ -44,7 +44,7 @@ module Pages::Meetingsdef expect_not_available_participant(user)expect(page)- .not_to have_field("#{user} invited")+ .to have_no_field("#{user} invited")enddef invite(user)diff --git a/modules/meeting/spec/support/pages/meetings/index.rb b/modules/meeting/spec/support/pages/meetings/index.rbindex 971b904434d..2df01c40d59 100644--- a/modules/meeting/spec/support/pages/meetings/index.rb+++ b/modules/meeting/spec/support/pages/meetings/index.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './new'+require_relative 'new'module Pages::Meetingsclass Index < Pages::Page@@ -47,34 +47,34 @@ module Pages::Meetingsenddef expect_no_main_menu- expect(page).not_to have_selector '#main-menu'+ expect(page).to have_no_css '#main-menu'enddef expect_no_create_new_buttonwithin '.toolbar-items' do- expect(page).not_to have_selector '#add-meeting-button'+ expect(page).to have_no_css '#add-meeting-button'endenddef expect_no_create_new_buttonswithin '.toolbar-items' do- expect(page).not_to have_selector '#add-meeting-button'+ expect(page).to have_no_css '#add-meeting-button'endwithin '#main-menu' do- expect(page).not_to have_button 'Meeting'+ expect(page).to have_no_button 'Meeting'endenddef expect_create_new_buttonwithin '.toolbar-items' do- expect(page).to have_selector '#add-meeting-button'+ expect(page).to have_css '#add-meeting-button'endenddef expect_create_new_buttonswithin '.toolbar-items' do- expect(page).to have_selector '#add-meeting-button'+ expect(page).to have_css '#add-meeting-button'endwithin '#main-menu' do@@ -106,8 +106,8 @@ module Pages::Meetingsdef expect_meetings_listed(*meetings)within '.generic-table tbody' domeetings.each do |meeting|- expect(page).to have_selector("td.title",- text: meeting.title)+ expect(page).to have_css("td.title",+ text: meeting.title)endendend@@ -115,8 +115,8 @@ module Pages::Meetingsdef expect_meetings_not_listed(*meetings)within '#content-wrapper' domeetings.each do |meeting|- expect(page).not_to have_selector("td.title",- text: meeting.title)+ expect(page).to have_no_css("td.title",+ text: meeting.title)endendend@@ -132,8 +132,8 @@ module Pages::Meetingsdef expect_plaintext_meeting_location(meeting)within '#content-wrapper' dowithin row_for(meeting) do- expect(page).to have_selector('td.location', text: meeting.location)- expect(page).not_to have_link meeting.location+ expect(page).to have_css('td.location', text: meeting.location)+ expect(page).to have_no_link meeting.locationendendend@@ -141,15 +141,15 @@ module Pages::Meetingsdef expect_no_meeting_location(meeting)within '#content-wrapper' dowithin row_for(meeting) do- expect(page).to have_selector('td.location', text: '')+ expect(page).to have_css('td.location', text: '')endendenddef expect_to_be_on_page(number)expect(page)- .to have_selector('.op-pagination--item_current',- text: number)+ .to have_css('.op-pagination--item_current',+ text: number)enddef to_page(number)diff --git a/modules/meeting/spec/support/pages/meetings/new.rb b/modules/meeting/spec/support/pages/meetings/new.rbindex ee027f8f047..712f9667f3f 100644--- a/modules/meeting/spec/support/pages/meetings/new.rb+++ b/modules/meeting/spec/support/pages/meetings/new.rb@@ -26,15 +26,15 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './base'-require_relative './show'+require_relative 'base'+require_relative 'show'module Pages::Meetingsclass New < Baseinclude Components::Autocompleter::NgSelectAutocompleteHelpersdef expect_no_main_menu- expect(page).not_to have_selector '#main-menu'+ expect(page).to have_no_css '#main-menu'enddef click_create@@ -74,7 +74,7 @@ module Pages::Meetingsenddef set_start_time(time)- input = page.find('#meeting-form-start-time')+ input = page.find_by_id('meeting-form-start-time')page.execute_script("arguments[0].value = arguments[1]", input.native, time)enddiff --git a/modules/meeting/spec/support/pages/meetings/show.rb b/modules/meeting/spec/support/pages/meetings/show.rbindex 087659afb70..3a321847559 100644--- a/modules/meeting/spec/support/pages/meetings/show.rb+++ b/modules/meeting/spec/support/pages/meetings/show.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require_relative './base'+require_relative 'base'module Pages::Meetingsclass Show < Base@@ -59,7 +59,7 @@ module Pages::Meetingsusers.each do |user|within(meeting_details_container) doexpect(page)- .not_to have_link(user.name)+ .to have_no_link(user.name)endendend@@ -77,7 +77,7 @@ module Pages::Meetingsdef expect_plaintext_location(location)within(meeting_details_container) do- expect(page).not_to have_link location+ expect(page).to have_no_link locationexpect(page).to have_text(location)endenddiff --git a/modules/meeting/spec/support/pages/structured_meeting/show.rb b/modules/meeting/spec/support/pages/structured_meeting/show.rbindex 2481fcc5a6a..14e43b50cf1 100644--- a/modules/meeting/spec/support/pages/structured_meeting/show.rb+++ b/modules/meeting/spec/support/pages/structured_meeting/show.rb@@ -33,7 +33,7 @@ module Pages::StructuredMeetinginclude ::Components::Autocompleter::NgSelectAutocompleteHelpersdef expect_empty- expect(page).not_to have_css('[id^="meeting-agenda-items-item-component"]')+ expect(page).to have_no_css('[id^="meeting-agenda-items-item-component"]')enddef add_agenda_item(type: MeetingAgendaItem, &)@@ -51,14 +51,14 @@ module Pages::StructuredMeetingdef cancel_add_formpage.within('#meeting-agenda-items-new-component') doclick_link I18n.t(:button_cancel)- expect(page).not_to have_link I18n.t(:button_cancel)+ expect(page).to have_no_link I18n.t(:button_cancel)endenddef cancel_edit_form(item)page.within("#meeting-agenda-items-item-component-#{item.id}") doclick_link I18n.t(:button_cancel)- expect(page).not_to have_link I18n.t(:button_cancel)+ expect(page).to have_no_link I18n.t(:button_cancel)endend@@ -89,7 +89,7 @@ module Pages::StructuredMeetingif item.is_a?(WorkPackage)expect(page).to have_css("[id^='meeting-agenda-items-item-component-']", text: item.subject)else- expect(page).to have_selector("#meeting-agenda-items-item-component-#{item.id}", text: item.work_package.subject)+ expect(page).to have_css("#meeting-agenda-items-item-component-#{item.id}", text: item.work_package.subject)endend@@ -98,8 +98,8 @@ module Pages::StructuredMeetingenddef expect_undisclosed_agenda_link(item)- expect(page).to have_selector("#meeting-agenda-items-item-component-#{item.id}",- text: I18n.t(:label_agenda_item_undisclosed_wp, id: item.work_package_id))+ expect(page).to have_css("#meeting-agenda-items-item-component-#{item.id}",+ text: I18n.t(:label_agenda_item_undisclosed_wp, id: item.work_package_id))enddef expect_no_agenda_item(title:)@@ -115,7 +115,7 @@ module Pages::StructuredMeetingendpage.within('.Overlay') do- click_on action # rubocop:disable Capybara/ClickLinkOrButtonStyle+ click_on actionendenddiff --git a/modules/meeting/spec/support/pages/work_package_meetings_tab.rb b/modules/meeting/spec/support/pages/work_package_meetings_tab.rbindex f133c216820..4010698bc9e 100644--- a/modules/meeting/spec/support/pages/work_package_meetings_tab.rb+++ b/modules/meeting/spec/support/pages/work_package_meetings_tab.rb@@ -51,7 +51,7 @@ module Pagesenddef expect_tab_not_present- expect(page).not_to have_css('.op-tab-row--link', text: 'MEETINGS')+ expect(page).to have_no_css('.op-tab-row--link', text: 'MEETINGS')enddef expect_tab_content_rendered@@ -100,7 +100,7 @@ module Pagesdef fill_and_submit_meeting_dialog(meeting, notes)fill_in('meeting_agenda_item_meeting_id', with: meeting.title)- expect(page).to have_selector('.ng-option-marked', text: meeting.title) # wait for selection+ expect(page).to have_css('.ng-option-marked', text: meeting.title) # wait for selectionpage.find('.ng-option-marked').clickpage.find('.ck-editor__editable').set(notes)diff --git a/modules/my_page/lib/my_page/engine.rb b/modules/my_page/lib/my_page/engine.rbindex b56c68ab706..9da20e2359e 100644--- a/modules/my_page/lib/my_page/engine.rb+++ b/modules/my_page/lib/my_page/engine.rb@@ -7,7 +7,7 @@ module MyPageendinitializer 'my_page.conversion' do- require Rails.root.join('config', 'constants', 'ar_to_api_conversions')+ require Rails.root.join("config/constants/ar_to_api_conversions")Constants::ARToAPIConversions.add('grids/my_page': 'grid')enddiff --git a/modules/my_page/spec/contracts/grids/create_contract_spec.rb b/modules/my_page/spec/contracts/grids/create_contract_spec.rbindex 094d134526f..0e49aadc67a 100644--- a/modules/my_page/spec/contracts/grids/create_contract_spec.rb+++ b/modules/my_page/spec/contracts/grids/create_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_examples'+require_relative 'shared_examples'RSpec.describe Grids::CreateContract doinclude_context 'grid contract'diff --git a/modules/my_page/spec/contracts/grids/shared_examples.rb b/modules/my_page/spec/contracts/grids/shared_examples.rbindex 43f56051a49..00634fc9793 100644--- a/modules/my_page/spec/contracts/grids/shared_examples.rb+++ b/modules/my_page/spec/contracts/grids/shared_examples.rb@@ -76,7 +76,7 @@ RSpec.shared_examples_for 'shared grid contract attributes' doit 'notes the error' doinstance.validateexpect(instance.errors.details[:widgets])- .to match_array [{ error: :inclusion }]+ .to contain_exactly({ error: :inclusion })endend@@ -102,7 +102,7 @@ RSpec.shared_examples_for 'shared grid contract attributes' doit 'notes the error' doinstance.validateexpect(instance.errors.details[:widgets])- .to match_array [{ error: :overlaps }, { error: :overlaps }]+ .to contain_exactly({ error: :overlaps }, { error: :overlaps })endend@@ -163,7 +163,7 @@ RSpec.shared_examples_for 'shared grid contract attributes' doit 'notes the error' doinstance.validateexpect(instance.errors.details[:widgets])- .to match_array [{ error: :outside }]+ .to contain_exactly({ error: :outside })endend@@ -184,7 +184,7 @@ RSpec.shared_examples_for 'shared grid contract attributes' doit 'notes the error' doinstance.validateexpect(instance.errors.details[:widgets])- .to match_array [{ error: :outside }]+ .to contain_exactly({ error: :outside })endend@@ -220,7 +220,7 @@ RSpec.shared_examples_for 'shared grid contract attributes' doit 'notes the error' doinstance.validateexpect(instance.errors.details[:widgets])- .to match_array [{ error: :end_before_start }]+ .to contain_exactly({ error: :end_before_start })endend@@ -241,7 +241,7 @@ RSpec.shared_examples_for 'shared grid contract attributes' doit 'notes the error' doinstance.validateexpect(instance.errors.details[:widgets])- .to match_array [{ error: :end_before_start }]+ .to contain_exactly({ error: :end_before_start })endend@@ -262,7 +262,7 @@ RSpec.shared_examples_for 'shared grid contract attributes' doit 'notes the error' doinstance.validateexpect(instance.errors.details[:widgets])- .to match_array [{ error: :end_before_start }]+ .to contain_exactly({ error: :end_before_start })endend@@ -283,7 +283,7 @@ RSpec.shared_examples_for 'shared grid contract attributes' doit 'notes the error' doinstance.validateexpect(instance.errors.details[:widgets])- .to match_array [{ error: :end_before_start }]+ .to contain_exactly({ error: :end_before_start })endendend@@ -311,7 +311,7 @@ RSpec.shared_examples_for 'shared grid contract attributes' doit 'is invalid for the grid superclass itself' doexpect(instance.errors.details[:scope])- .to match_array [{ error: :inclusion }]+ .to contain_exactly({ error: :inclusion })endendenddiff --git a/modules/my_page/spec/contracts/grids/update_contract_spec.rb b/modules/my_page/spec/contracts/grids/update_contract_spec.rbindex d1ada5c0a78..028653ec539 100644--- a/modules/my_page/spec/contracts/grids/update_contract_spec.rb+++ b/modules/my_page/spec/contracts/grids/update_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_examples'+require_relative 'shared_examples'RSpec.describe Grids::UpdateContract doinclude_context 'model contract'diff --git a/modules/my_page/spec/features/my/accountable_spec.rb b/modules/my_page/spec/features/my/accountable_spec.rbindex 1febcf70633..a73ec008d80 100644--- a/modules/my_page/spec/features/my/accountable_spec.rb+++ b/modules/my_page/spec/features/my/accountable_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../../support/pages/my/page'-RSpec.describe 'Accountable widget on my page', js: true do+RSpec.describe 'Accountable widget on my page', :js dolet!(:type) { create(:type) }let!(:priority) { create(:default_priority) }let!(:project) { create(:project, types: [type]) }@@ -82,7 +82,7 @@ RSpec.describe 'Accountable widget on my page', js: true do# The page starts with a "wp created widget".created_area = Components::Grids::GridArea.new('.grid--area.-widgeted:nth-of-type(2)')expect(created_area.area)- .to have_selector('.subject', text: accountable_work_package.subject)+ .to have_css('.subject', text: accountable_work_package.subject)# Add widget below existing widgetsmy_page.add_widget(2, 2, :row, "Work packages I am accountable for")@@ -110,12 +110,12 @@ RSpec.describe 'Accountable widget on my page', js: true doaccountable_area.expect_to_span(2, 1, 3, 2)expect(accountable_area.area)- .to have_selector('.subject', text: accountable_work_package.subject)+ .to have_css('.subject', text: accountable_work_package.subject)expect(accountable_area.area)- .not_to have_selector('.subject', text: accountable_by_other_work_package.subject)+ .to have_no_css('.subject', text: accountable_by_other_work_package.subject)expect(accountable_area.area)- .not_to have_selector('.subject', text: accountable_but_invisible_work_package.subject)+ .to have_no_css('.subject', text: accountable_but_invisible_work_package.subject)endenddiff --git a/modules/my_page/spec/features/my/assigned_to_me_spec.rb b/modules/my_page/spec/features/my/assigned_to_me_spec.rbindex 35960b7fd43..9c3cbcea941 100644--- a/modules/my_page/spec/features/my/assigned_to_me_spec.rb+++ b/modules/my_page/spec/features/my/assigned_to_me_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../../support/pages/my/page'-RSpec.describe 'Assigned to me embedded query on my page', js: true do+RSpec.describe 'Assigned to me embedded query on my page', :js dolet!(:type) { create(:type) }let!(:priority) { create(:default_priority) }let!(:project) { create(:project, types: [type]) }@@ -134,10 +134,10 @@ RSpec.describe 'Assigned to me embedded query on my page', js: true doassigned_area.expect_to_existexpect(assigned_area.area)- .to have_selector('.subject', text: assigned_work_package.subject)+ .to have_css('.subject', text: assigned_work_package.subject)expect(assigned_area.area)- .not_to have_selector('.subject', text: assigned_to_other_work_package.subject)+ .to have_no_css('.subject', text: assigned_to_other_work_package.subject)embedded_table.click_inline_create@@ -177,16 +177,16 @@ RSpec.describe 'Assigned to me embedded query on my page', js: true dowithin assigned_area.area doexpect(page)- .to have_selector('.subject', text: assigned_work_package.subject)+ .to have_css('.subject', text: assigned_work_package.subject)expect(page)- .not_to have_selector('.subject', text: assigned_work_package_2.subject)+ .to have_no_css('.subject', text: assigned_work_package_2.subject)page.find('.op-pagination--item button', text: '2').clickexpect(page)- .not_to have_selector('.subject', text: assigned_work_package.subject)+ .to have_no_css('.subject', text: assigned_work_package.subject)expect(page)- .to have_selector('.subject', text: assigned_work_package_2.subject)+ .to have_css('.subject', text: assigned_work_package_2.subject)endassigned_area.resize_to(1, 2)diff --git a/modules/my_page/spec/features/my/custom_text_spec.rb b/modules/my_page/spec/features/my/custom_text_spec.rbindex 8dd60733188..78d99a34bd5 100644--- a/modules/my_page/spec/features/my/custom_text_spec.rb+++ b/modules/my_page/spec/features/my/custom_text_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../../support/pages/my/page'-RSpec.describe 'Custom text widget on my page', js: true do+RSpec.describe 'Custom text widget on my page', :js dolet(:permissions) do[]end@@ -72,13 +72,13 @@ RSpec.describe 'Custom text widget on my page', js: true dowithin custom_text_widget.area dofind('.inplace-editing--container').click- expect(page).to have_selector('.op-uc-container_editing', wait: 10)+ expect(page).to have_css('.op-uc-container_editing', wait: 10)field.set_value('My own little text')field.save!expect(page)- .to have_selector('.inline-edit--display-field', text: 'My own little text')+ .to have_css('.inline-edit--display-field', text: 'My own little text')find('.inplace-editing--container').click@@ -86,7 +86,7 @@ RSpec.describe 'Custom text widget on my page', js: true dofield.cancel_by_clickexpect(page)- .to have_selector('.inline-edit--display-field', text: 'My own little text')+ .to have_css('.inline-edit--display-field', text: 'My own little text')# adding an imagefind('.inplace-editing--container').click@@ -100,12 +100,12 @@ RSpec.describe 'Custom text widget on my page', js: true dowithin custom_text_widget.area doexpect(page).to have_test_selector('op-attachment-list-item', text: 'image.png')- expect(page).not_to have_selector('notifications-upload-progress')+ expect(page).to have_no_css('notifications-upload-progress')field.save!expect(page)- .to have_selector('#content img', count: 1)+ .to have_css('#content img', count: 1)expect(page).not_to have_test_selector('op-attachment-list-item', text: 'image.png')diff --git a/modules/my_page/spec/features/my/documents_spec.rb b/modules/my_page/spec/features/my/documents_spec.rbindex e53616a10ed..f451ccb68ed 100644--- a/modules/my_page/spec/features/my/documents_spec.rb+++ b/modules/my_page/spec/features/my/documents_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../../support/pages/my/page'-RSpec.describe 'My page documents widget', js: true do+RSpec.describe 'My page documents widget', :js dolet!(:project) { create(:project) }let!(:other_project) { create(:project) }let!(:visible_document) dodiff --git a/modules/my_page/spec/features/my/my_spent_time_widget_with_a_negative_time_zone_spec.rb b/modules/my_page/spec/features/my/my_spent_time_widget_with_a_negative_time_zone_spec.rbindex 2a73339e305..02117ee5c7a 100644--- a/modules/my_page/spec/features/my/my_spent_time_widget_with_a_negative_time_zone_spec.rb+++ b/modules/my_page/spec/features/my/my_spent_time_widget_with_a_negative_time_zone_spec.rb@@ -86,11 +86,11 @@ RSpec.describe 'My spent time widget with a negative time zone', :js,my_page.expect_and_dismiss_toaster message: I18n.t(:notice_successful_update)aggregate_failures("non-working days are displayed properly") do- expect(page).not_to have_css('.fc-day-mon.fc-non-working-day', wait: 0)+ expect(page).to have_no_css('.fc-day-mon.fc-non-working-day', wait: 0)expect(page).to have_css('.fc-day-tue.fc-non-working-day', wait: 0)- expect(page).not_to have_css('.fc-day-wed.fc-non-working-day', wait: 0)- expect(page).not_to have_css('.fc-day-thu.fc-non-working-day', wait: 0)- expect(page).not_to have_css('.fc-day-fri.fc-non-working-day', wait: 0)+ expect(page).to have_no_css('.fc-day-wed.fc-non-working-day', wait: 0)+ expect(page).to have_no_css('.fc-day-thu.fc-non-working-day', wait: 0)+ expect(page).to have_no_css('.fc-day-fri.fc-non-working-day', wait: 0)expect(page).to have_css('.fc-day-sat.fc-non-working-day', wait: 0)expect(page).to have_css('.fc-day-sun.fc-non-working-day', wait: 0)enddiff --git a/modules/my_page/spec/features/my/news_spec.rb b/modules/my_page/spec/features/my/news_spec.rbindex dc87f73bb6b..a55e7c16f3f 100644--- a/modules/my_page/spec/features/my/news_spec.rb+++ b/modules/my_page/spec/features/my/news_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../../support/pages/my/page'-RSpec.describe 'My page news widget spec', js: true do+RSpec.describe 'My page news widget spec', :js dolet!(:project) { create(:project) }let!(:other_project) { create(:project) }let!(:visible_news) dodiff --git a/modules/my_page/spec/features/my/time_entries_current_user_spec.rb b/modules/my_page/spec/features/my/time_entries_current_user_spec.rbindex f7c2052b24e..8827bb28897 100644--- a/modules/my_page/spec/features/my/time_entries_current_user_spec.rb+++ b/modules/my_page/spec/features/my/time_entries_current_user_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../../support/pages/my/page'-RSpec.describe 'My page time entries current user widget spec', js: true do+RSpec.describe 'My page time entries current user widget spec', :js dolet!(:type) { create(:type) }let!(:project) { create(:project, types: [type]) }let!(:activity) { create(:time_entry_activity) }@@ -130,13 +130,13 @@ RSpec.describe 'My page time entries current user widget spec', js: true doentries_area.expect_to_span(1, 1, 2, 2)- expect(page).not_to have_selector('.fc-day-mon.fc-non-working-day')- expect(page).not_to have_selector('.fc-day-tue.fc-non-working-day')- expect(page).not_to have_selector('.fc-day-wed.fc-non-working-day')- expect(page).not_to have_selector('.fc-day-thu.fc-non-working-day')- expect(page).not_to have_selector('.fc-day-fri.fc-non-working-day')- expect(page).to have_selector('.fc-day-sat.fc-non-working-day')- expect(page).to have_selector('.fc-day-sun.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-mon.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-tue.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-wed.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-thu.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-fri.fc-non-working-day')+ expect(page).to have_css('.fc-day-sat.fc-non-working-day')+ expect(page).to have_css('.fc-day-sun.fc-non-working-day')expect(page).to have_content "Total: 6 h"@@ -144,12 +144,12 @@ RSpec.describe 'My page time entries current user widget spec', js: true doexpect(page).to have_content visible_time_entry.spent_on.strftime('%-m/%-d')expect(page)- .to have_selector('.fc-event .fc-event-title', text: "#{project.name} - ##{work_package.id}: #{work_package.subject}")+ .to have_css('.fc-event .fc-event-title', text: "#{project.name} - ##{work_package.id}: #{work_package.subject}")expect(page).to have_content(other_visible_time_entry.spent_on.strftime('%-m/%-d'))expect(page)- .to have_selector('.fc-event .fc-event-title', text: "#{project.name} - ##{work_package.id}: #{work_package.subject}")+ .to have_css('.fc-event .fc-event-title', text: "#{project.name} - ##{work_package.id}: #{work_package.subject}")# go to last weekwithin entries_area.area do@@ -162,7 +162,7 @@ RSpec.describe 'My page time entries current user widget spec', js: true doexpect(page).to have_content(last_week_visible_time_entry.spent_on.strftime('%-m/%-d'))expect(page)- .to have_selector('.fc-event .fc-event-title', text: "#{project.name} - ##{work_package.id}: #{work_package.subject}")+ .to have_css('.fc-event .fc-event-title', text: "#{project.name} - ##{work_package.id}: #{work_package.subject}")# go to today againwithin entries_area.area do@@ -177,7 +177,7 @@ RSpec.describe 'My page time entries current user widget spec', js: true doendexpect(page)- .to have_selector('.ui-tooltip', text: "Project: #{project.name}")+ .to have_css('.ui-tooltip', text: "Project: #{project.name}")# Adding a time entry@@ -195,7 +195,7 @@ RSpec.describe 'My page time entries current user widget spec', js: true dotime_logging_modal.shows_field 'user', falseexpect(page)- .not_to have_selector('.ng-spinner-loader')+ .to have_no_css('.ng-spinner-loader')# Expect filtering workstime_logging_modal.work_package_field.autocomplete work_package.subject, select: false@@ -222,8 +222,8 @@ RSpec.describe 'My page time entries current user widget spec', js: true dowithin entries_area.area doexpect(page)- .to have_selector("td.fc-timegrid-col:nth-of-type(5) .te-calendar--time-entry",- text: other_work_package.subject)+ .to have_css("td.fc-timegrid-col:nth-of-type(5) .te-calendar--time-entry",+ text: other_work_package.subject)endexpect(page)@@ -263,16 +263,16 @@ RSpec.describe 'My page time entries current user widget spec', js: true doendexpect(page)- .to have_selector('.ui-tooltip', text: "Work package: ##{other_work_package.id}: #{other_work_package.subject}")+ .to have_css('.ui-tooltip', text: "Work package: ##{other_work_package.id}: #{other_work_package.subject}")expect(page)- .to have_selector('.ui-tooltip', text: "Hours: 6 h")+ .to have_css('.ui-tooltip', text: "Hours: 6 h")expect(page)- .to have_selector('.ui-tooltip', text: "Activity: #{other_activity.name}")+ .to have_css('.ui-tooltip', text: "Activity: #{other_activity.name}")expect(page)- .to have_selector('.ui-tooltip', text: "Comment: Some comment")+ .to have_css('.ui-tooltip', text: "Comment: Some comment")expect(page).to have_content "Total: 13 h"@@ -286,9 +286,9 @@ RSpec.describe 'My page time entries current user widget spec', js: true dowithin entries_area.area doexpect(page)- .not_to have_selector('.fc-day-header', text: 'Mon')+ .to have_no_css('.fc-day-header', text: 'Mon')expect(page)- .not_to have_selector('.fc-duration', text: "6 h")+ .to have_no_css('.fc-duration', text: "6 h")end## Removing the time entry@@ -307,7 +307,7 @@ RSpec.describe 'My page time entries current user widget spec', js: true dowithin entries_area.area doexpect(page)- .not_to have_selector("td.fc-timegrid-col:nth-of-type(5) .te-calendar--time-entry")+ .to have_no_css("td.fc-timegrid-col:nth-of-type(5) .te-calendar--time-entry")endexpect(TimeEntry.where(id: other_visible_time_entry.id))@@ -322,10 +322,10 @@ RSpec.describe 'My page time entries current user widget spec', js: true do.to have_content(/#{Regexp.escape(I18n.t('js.grid.widgets.time_entries_current_user.title'))}/i)expect(page)- .to have_selector(".te-calendar--time-entry", count: 1)+ .to have_css(".te-calendar--time-entry", count: 1)expect(page)- .not_to have_selector('.fc-col-header-cell', text: 'Mon')+ .to have_no_css('.fc-col-header-cell', text: 'Mon')end# Removing the widget@@ -338,7 +338,7 @@ RSpec.describe 'My page time entries current user widget spec', js: true dowithin nucleus_area.area doexpect(page)- .to have_selector(".grid--widget-add")+ .to have_css(".grid--widget-add")endendenddiff --git a/modules/my_page/spec/features/my/work_package_table_spec.rb b/modules/my_page/spec/features/my/work_package_table_spec.rbindex eb7ac2a9dd1..05b3b564014 100644--- a/modules/my_page/spec/features/my/work_package_table_spec.rb+++ b/modules/my_page/spec/features/my/work_package_table_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../../support/pages/my/page'-RSpec.describe 'Arbitrary WorkPackage query table widget on my page', js: true do+RSpec.describe 'Arbitrary WorkPackage query table widget on my page', :js dolet!(:type) { create(:type) }let!(:other_type) { create(:type) }let!(:priority) { create(:default_priority) }@@ -78,7 +78,7 @@ RSpec.describe 'Arbitrary WorkPackage query table widget on my page', js: true d# Using it here as a safeguard to govern speed.created_by_me_area = Components::Grids::GridArea.new('.grid--area.-widgeted:nth-of-type(2)')expect(created_by_me_area.area)- .to have_selector('.subject', text: type_work_package.subject)+ .to have_css('.subject', text: type_work_package.subject)my_page.add_widget(1, 2, :column, "Work packages table")@@ -94,10 +94,10 @@ RSpec.describe 'Arbitrary WorkPackage query table widget on my page', js: true d# At the beginning, the default query is displayedexpect(filter_area.area)- .to have_selector('.subject', text: type_work_package.subject)+ .to have_css('.subject', text: type_work_package.subject)expect(filter_area.area)- .to have_selector('.subject', text: other_type_work_package.subject)+ .to have_css('.subject', text: other_type_work_package.subject)# User has the ability to modify the query@@ -113,15 +113,15 @@ RSpec.describe 'Arbitrary WorkPackage query table widget on my page', js: true dcolumns.remove 'Subject'expect(filter_area.area)- .to have_selector('.id', text: type_work_package.id)+ .to have_css('.id', text: type_work_package.id)# as the Subject column is disabledexpect(filter_area.area)- .not_to have_selector('.subject', text: type_work_package.subject)+ .to have_no_css('.subject', text: type_work_package.subject)# As other_type is filtered outexpect(filter_area.area)- .not_to have_selector('.id', text: other_type_work_package.id)+ .to have_no_css('.id', text: other_type_work_package.id)scroll_to_element(filter_area.area)within filter_area.area do@@ -142,15 +142,15 @@ RSpec.describe 'Arbitrary WorkPackage query table widget on my page', js: true dfilter_area = Components::Grids::GridArea.new('.grid--area.-widgeted:nth-of-type(3)')expect(filter_area.area)- .to have_selector('.id', text: type_work_package.id)+ .to have_css('.id', text: type_work_package.id)# as the Subject column is disabledexpect(filter_area.area)- .not_to have_selector('.subject', text: type_work_package.subject)+ .to have_no_css('.subject', text: type_work_package.subject)# As other_type is filtered outexpect(filter_area.area)- .not_to have_selector('.id', text: other_type_work_package.id)+ .to have_no_css('.id', text: other_type_work_package.id)within filter_area.area doexpect(page).to have_field('editable-toolbar-title', with: 'My WP Filter', wait: 10)diff --git a/modules/my_page/spec/models/grids/my_page_spec.rb b/modules/my_page/spec/models/grids/my_page_spec.rbindex df79c23d3aa..c6e763ec938 100644--- a/modules/my_page/spec/models/grids/my_page_spec.rb+++ b/modules/my_page/spec/models/grids/my_page_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-require_relative './shared_model'+require_relative 'shared_model'RSpec.describe Grids::MyPage dolet(:instance) { described_class.new(row_count: 5, column_count: 5) }diff --git a/modules/my_page/spec/queries/grids/query_integration_spec.rb b/modules/my_page/spec/queries/grids/query_integration_spec.rbindex e373376d9e7..1197ed5c1bd 100644--- a/modules/my_page/spec/queries/grids/query_integration_spec.rb+++ b/modules/my_page/spec/queries/grids/query_integration_spec.rb@@ -46,7 +46,7 @@ RSpec.describe Grids::Query, type: :model docontext 'without a filter' dodescribe '#results' doit 'is the same as getting all the grids visible to the user' do- expect(instance.results).to match_array [my_page_grid]+ expect(instance.results).to contain_exactly(my_page_grid)endendend@@ -58,7 +58,7 @@ RSpec.describe Grids::Query, type: :model dodescribe '#results' doit 'is the same as handwriting the query' do- expect(instance.results).to match_array [my_page_grid]+ expect(instance.results).to contain_exactly(my_page_grid)endenddiff --git a/modules/my_page/spec/requests/api/v3/grids/grids_resource_spec.rb b/modules/my_page/spec/requests/api/v3/grids/grids_resource_spec.rbindex 9e954eb3a06..7ab52ed79da 100644--- a/modules/my_page/spec/requests/api/v3/grids/grids_resource_spec.rb+++ b/modules/my_page/spec/requests/api/v3/grids/grids_resource_spec.rb@@ -252,8 +252,7 @@ RSpec.describe 'API v3 Grids resource', content_type: :json doexpect(subject.status).to eq 422expect(JSON.parse(subject.body)['_embedded']['errors'].map { |e| e['message'] })- .to match_array ["Widgets is outside of the grid.",- "Number of rows must be greater than 0."]+ .to contain_exactly("Widgets is outside of the grid.", "Number of rows must be greater than 0.")endit 'does not persist the changes to widgets' do@@ -380,9 +379,8 @@ RSpec.describe 'API v3 Grids resource', content_type: :json do.at_path('_type')expect(JSON.parse(subject.body)['_embedded']['errors'].map { |e| e['message'] })- .to match_array ["Widgets is outside of the grid.",- "Number of rows must be greater than 0.",- "Number of columns must be greater than 0."]+ .to contain_exactly("Widgets is outside of the grid.", "Number of rows must be greater than 0.",+ "Number of columns must be greater than 0.")endendenddiff --git a/modules/openid_connect/lib/open_project/openid_connect/hooks/hook.rb b/modules/openid_connect/lib/open_project/openid_connect/hooks/hook.rbindex e951af3648b..c3411f64c7d 100644--- a/modules/openid_connect/lib/open_project/openid_connect/hooks/hook.rb+++ b/modules/openid_connect/lib/open_project/openid_connect/hooks/hook.rb@@ -24,7 +24,7 @@# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.## See COPYRIGHT and LICENSE files for more details.-#++# +module OpenProject::OpenIDConnectmodule Hooksdiff --git a/modules/openid_connect/spec/requests/openid_connect_spec.rb b/modules/openid_connect/spec/requests/openid_connect_spec.rbindex 7cda8236786..9b5f4687973 100644--- a/modules/openid_connect/spec/requests/openid_connect_spec.rb+++ b/modules/openid_connect/spec/requests/openid_connect_spec.rb@@ -33,8 +33,7 @@ RSpec.configure do |c|c.include OpenIDConnectSpecHelpersend-RSpec.describe 'OpenID Connect',- skip_2fa_stage: true, # Prevent redirects to 2FA stage+RSpec.describe 'OpenID Connect', :skip_2fa_stage, # Prevent redirects to 2FA stagetype: :rails_request,with_ee: %i[openid_providers] dolet(:host) { OmniAuth::OpenIDConnect::Heroku.new('foo', {}).host }@@ -180,7 +179,7 @@ RSpec.describe 'OpenID Connect',)end- it 'will show no option unless EE', with_ee: false do+ it 'shows no option unless EE', with_ee: false doget '/login'expect(response.body).not_to match /Google/iexpect(response.body).not_to match /Azure/idiff --git a/modules/overviews/spec/features/low_permissions_page_creation_spec.rb b/modules/overviews/spec/features/low_permissions_page_creation_spec.rbindex 078928a6f52..283c24cc60e 100644--- a/modules/overviews/spec/features/low_permissions_page_creation_spec.rb+++ b/modules/overviews/spec/features/low_permissions_page_creation_spec.rb@@ -30,8 +30,7 @@ require 'spec_helper'require_relative '../support/pages/overview'-RSpec.describe 'Overview page on the fly creation if user lacks :mange_overview permission',- js: true do+RSpec.describe 'Overview page on the fly creation if user lacks :mange_overview permission', :js dolet!(:type) { create(:type) }let!(:project) { create(:project, types: [type]) }let!(:open_status) { create(:default_status) }diff --git a/modules/overviews/spec/features/managing_overview_page_spec.rb b/modules/overviews/spec/features/managing_overview_page_spec.rbindex 7445fa80aa5..22fe1ae5da6 100644--- a/modules/overviews/spec/features/managing_overview_page_spec.rb+++ b/modules/overviews/spec/features/managing_overview_page_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative '../support/pages/overview'-RSpec.describe 'Overview page managing', js: true do+RSpec.describe 'Overview page managing', :js dolet!(:type) { create(:type) }let!(:project) { create(:project, types: [type], description: 'My **custom** description') }let!(:open_status) { create(:default_status) }diff --git a/modules/overviews/spec/features/navigation_spec.rb b/modules/overviews/spec/features/navigation_spec.rbindex b9a595db258..3390a8719b6 100644--- a/modules/overviews/spec/features/navigation_spec.rb+++ b/modules/overviews/spec/features/navigation_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Navigate to overview', js: true do+RSpec.describe 'Navigate to overview', :js dolet(:project) { create(:project) }let(:permissions) { [] }let(:user) dodiff --git a/modules/recaptcha/app/controllers/recaptcha/request_controller.rb b/modules/recaptcha/app/controllers/recaptcha/request_controller.rbindex 5e5115469ee..162b29141d2 100644--- a/modules/recaptcha/app/controllers/recaptcha/request_controller.rb+++ b/modules/recaptcha/app/controllers/recaptcha/request_controller.rb@@ -44,13 +44,13 @@ module ::Recaptchaprivate- def set_captcha_settings(&block)+ def set_captcha_settings(&)if OpenProject::Recaptcha::Configuration.use_hcaptcha?Recaptcha.with_configuration(verify_url: OpenProject::Recaptcha.hcaptcha_verify_url,api_server_url: OpenProject::Recaptcha.hcaptcha_api_server_url,- &block)+ &)else- block.call+ yieldendenddiff --git a/modules/recaptcha/lib/open_project/recaptcha/engine.rb b/modules/recaptcha/lib/open_project/recaptcha/engine.rbindex e283b4a3d14..312cc01b444 100644--- a/modules/recaptcha/lib/open_project/recaptcha/engine.rb+++ b/modules/recaptcha/lib/open_project/recaptcha/engine.rb@@ -12,7 +12,7 @@ module OpenProject::Recaptchasettings: {default: {recaptcha_type: ::OpenProject::Recaptcha::TYPE_DISABLED,- response_limit: 5000,+ response_limit: 5000}},bundled: true dodiff --git a/modules/reporting/app/controllers/cost_reports_controller.rb b/modules/reporting/app/controllers/cost_reports_controller.rbindex 8713085fe52..f6afb7d2c62 100644--- a/modules/reporting/app/controllers/cost_reports_controller.rb+++ b/modules/reporting/app/controllers/cost_reports_controller.rb@@ -117,7 +117,7 @@ class CostReportsController < ApplicationControllerdef create@query.name = params[:query_name].presence || ::I18n.t(:label_default)@query.public! if make_query_public?- @query.send("#{user_key}=", current_user.id)+ @query.send(:"#{user_key}=", current_user.id)@query.save!redirect_params = { action: 'show', id: @query.id }@@ -466,7 +466,7 @@ class CostReportsController < ApplicationControllerrows = params[:groups]['rows']columns = params[:groups]['columns']end- { rows: (rows || []), columns: (columns || []) }+ { rows: rows || [], columns: columns || [] }end##diff --git a/modules/reporting/app/models/cost_query.rb b/modules/reporting/app/models/cost_query.rbindex 1b327ad6b06..795b1798cfa 100644--- a/modules/reporting/app/models/cost_query.rb+++ b/modules/reporting/app/models/cost_query.rb@@ -87,7 +87,7 @@ class CostQuery < ApplicationRecorddef serialize# have to take the reverse group_bys to retain the original order when deserializing- self.serialized = { filters: (filters.map(&:serialize).reject(&:nil?).sort_by(&:first)),+ self.serialized = { filters: filters.map(&:serialize).reject(&:nil?).sort_by(&:first),group_bys: group_bys.map(&:serialize).reject(&:nil?).reverse }end@@ -215,7 +215,7 @@ class CostQuery < ApplicationRecorddef cache_keydeserialize unless @chainparts = [self.class.table_name.sub('_reports', '')]- parts.concat [filters.sort, group_bys].map { |l| l.map(&:cache_key).join(' ') }+ parts.concat([filters.sort, group_bys].map { |l| l.map(&:cache_key).join(' ') })parts.join '/'enddiff --git a/modules/reporting/app/models/cost_query/filter/user_id.rb b/modules/reporting/app/models/cost_query/filter/user_id.rbindex c0c5b1bad45..215e593850c 100644--- a/modules/reporting/app/models/cost_query/filter/user_id.rb+++ b/modules/reporting/app/models/cost_query/filter/user_id.rb@@ -39,7 +39,6 @@ class CostQuery::Filter::UserId < Report::Filter::Base# Map the special 'me' valuesuper.filter_map { |val| replace_me_value(val) }-enddef replace_me_value(value)diff --git a/modules/reporting/app/models/cost_query/sql_statement.rb b/modules/reporting/app/models/cost_query/sql_statement.rbindex fd48cba0b00..d7ebfd3d2a8 100644--- a/modules/reporting/app/models/cost_query/sql_statement.rb+++ b/modules/reporting/app/models/cost_query/sql_statement.rb@@ -93,7 +93,7 @@ class CostQuery::SqlStatement < Report::SqlStatement})# FIXME: build this subquery from a sql_statementquery.from "(SELECT *, #{typed :text, model.model_name.to_s} AS type FROM #{table}) AS #{table}"- send("unify_#{table}", query)+ send(:"unify_#{table}", query)endenddiff --git a/modules/reporting/app/models/entry.rb b/modules/reporting/app/models/entry.rbindex 5ef2975e0f7..17a4f515aad 100644--- a/modules/reporting/app/models/entry.rb+++ b/modules/reporting/app/models/entry.rb@@ -42,9 +42,9 @@ module EntryTimeEntry === obj or CostEntry === objend- def calculate(type, *args)- a = TimeEntry.calculate(type, *args)- b = CostEntry.calculate(type, *args)+ def calculate(type, *)+ a = TimeEntry.calculate(type, *)+ b = CostEntry.calculate(type, *)case typewhen :sum, :count then a + bwhen :avg then (a + b) / 2@@ -81,16 +81,16 @@ module Entrydef find_from_ids(_args, options) find_many :find_from_ids, options end- def find_one(*args)- TimeEntry.send(*args) || CostEntry.send(*args)+ def find_one(*)+ TimeEntry.send(*) || CostEntry.send(*)end- def find_many(*args)- TimeEntry.send(*args) + CostEntry.send(*args)+ def find_many(*)+ TimeEntry.send(*) + CostEntry.send(*)end- def send_all(*args)- [TimeEntry.send(*args), CostEntry.send(*args)]+ def send_all(*)+ [TimeEntry.send(*), CostEntry.send(*)]endendenddiff --git a/modules/reporting/db/migrate/20180323130704_to_v710_aggregated_reporting_migrations.rb b/modules/reporting/db/migrate/20180323130704_to_v710_aggregated_reporting_migrations.rbindex 5495ac51f42..7b4b581cea3 100644--- a/modules/reporting/db/migrate/20180323130704_to_v710_aggregated_reporting_migrations.rb+++ b/modules/reporting/db/migrate/20180323130704_to_v710_aggregated_reporting_migrations.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require Rails.root.join("db", "migrate", "migration_utils", "migration_squasher").to_s+require Rails.root.join("db/migrate/migration_utils/migration_squasher").to_s# This migration aggregates the migrations detailed in MIGRATION_FILESclass ToV710AggregatedReportingMigrations < ActiveRecord::Migration[5.1]MIGRATION_FILES = <<-MIGRATIONSdiff --git a/modules/reporting/lib/open_project/reporting/patches/custom_fields_controller_patch.rb b/modules/reporting/lib/open_project/reporting/patches/custom_fields_controller_patch.rbindex cf3e93130bf..213b275ec3b 100644--- a/modules/reporting/lib/open_project/reporting/patches/custom_fields_controller_patch.rb+++ b/modules/reporting/lib/open_project/reporting/patches/custom_fields_controller_patch.rb@@ -73,7 +73,7 @@ module OpenProject::Reporting::Patchesenddef remove_custom_field_from_session(id)- custom_field_name = "custom_field#{id}".to_sym+ custom_field_name = :"custom_field#{id}"report_engine_name = CostQuery.name.underscore.to_symcookie = session[report_engine_name]diff --git a/modules/reporting/lib/report/chainable.rb b/modules/reporting/lib/report/chainable.rbindex 1634fa74e48..ebf31f7b80d 100644--- a/modules/reporting/lib/report/chainable.rb+++ b/modules/reporting/lib/report/chainable.rb@@ -176,7 +176,7 @@ module Reportunless self.class.extra_options.include? keyraise ArgumentError, "may not set #{key}" unless engine.accepted_properties.include? key.to_s- send "#{key}=", value+ send :"#{key}=", valueendendif child@@ -218,14 +218,14 @@ module Reportendend- def chain_collect(name, *args, &)- top.subchain_collect(name, *args, &)+ def chain_collect(name, *, &)+ top.subchain_collect(name, *, &)end# See #chain_collect- def subchain_collect(name, *args, &)- subchain = child.subchain_collect(name, *args, &) unless bottom?- [* send(name, *args, &)].push(*subchain).compact.uniq+ def subchain_collect(name, *, &)+ subchain = child.subchain_collect(name, *, &) unless bottom?+ [* send(name, *, &)].push(*subchain).compact.uniqend# overwrite in subclass to maintain constisten statediff --git a/modules/reporting/lib/report/inherited_attribute.rb b/modules/reporting/lib/report/inherited_attribute.rbindex d64936ebb87..cae9aef5dac 100644--- a/modules/reporting/lib/report/inherited_attribute.rb+++ b/modules/reporting/lib/report/inherited_attribute.rb@@ -43,7 +43,7 @@ module Report::InheritedAttributereturn get_inherited_attribute(name, default, list, uniq) if values.empty?if list- old = instance_variable_get("@#{name}") if merge+ old = instance_variable_get(:"@#{name}") if mergeold ||= []return set_inherited_attribute(name, values.map(&map) + old)end@@ -58,13 +58,13 @@ module Report::InheritedAttributedef define_singleton_method(name, &)singleton_class.send :attr_writer, namesingleton_class.class_eval { define_method(name, &) }- define_method(name) { instance_variable_get("@#{name}") or singleton_class.send(name) }+ define_method(name) { instance_variable_get(:"@#{name}") or singleton_class.send(name) }enddef get_inherited_attribute(name, default = nil, list = false, uniq = false)return get_inherited_attribute(name, default, list, false).uniq if list and uniq- result = instance_variable_get("@#{name}")+ result = instance_variable_get(:"@#{name}")super_result = superclass.get_inherited_attribute(name, default, list) if inherit? nameif result.nil?super_result || default@@ -86,6 +86,6 @@ module Report::InheritedAttributeenddef set_inherited_attribute(name, value)- instance_variable_set "@#{name}", value+ instance_variable_set :"@#{name}", valueendenddiff --git a/modules/reporting/lib/report/operator.rb b/modules/reporting/lib/report/operator.rbindex 8fb161bab2e..35654636dbe 100644--- a/modules/reporting/lib/report/operator.rb+++ b/modules/reporting/lib/report/operator.rb@@ -60,7 +60,7 @@ class Report::Operatornew '>t-', label: :label_less_than_ago doinclude DateRangedef modify(query, field, value)- super query, field, -value.to_i, 0+ super(query, field, -value.to_i, 0)endend@@ -82,7 +82,7 @@ class Report::Operatornew 't+', label: :label_in doinclude DateRangedef modify(query, field, *values)- super query, field, values.first.to_i, values.first.to_i+ super(query, field, values.first.to_i, values.first.to_i)endend@@ -101,7 +101,7 @@ class Report::Operatornew 't-', label: :label_ago doinclude DateRangedef modify(query, field, *values)- super query, field, -values.first.to_i, -values.first.to_i+ super(query, field, -values.first.to_i, -values.first.to_i)endend@@ -137,14 +137,14 @@ class Report::Operatornew '<t+', label: :label_in_less_than doinclude DateRangedef modify(query, field, value)- super query, field, 0, value.to_i+ super(query, field, 0, value.to_i)endendnew 't', label: :label_today doinclude DateRangedef modify(query, field)- super query, field, 0, 0+ super(query, field, 0, 0)endend@@ -155,14 +155,14 @@ class Report::Operatornew '<t-', label: :label_more_than_ago doinclude DateRangedef modify(query, field, value)- super query, field, nil, -value.to_i+ super(query, field, nil, -value.to_i)endendnew '>t+', label: :label_in_more_than doinclude DateRangedef modify(query, field, value)- super query, field, value.to_i, nil+ super(query, field, value.to_i, nil)endenddiff --git a/modules/reporting/lib/report/result.rb b/modules/reporting/lib/report/result.rbindex 445860c23f8..7b3375f25a6 100644--- a/modules/reporting/lib/report/result.rb+++ b/modules/reporting/lib/report/result.rb@@ -42,8 +42,8 @@ class Report::Result@value = valueend- def recursive_each_with_level(level = 0, _depth_first = true, &block)- block.call(level, self)+ def recursive_each_with_level(level = 0, _depth_first = true)+ yield(level, self)enddef recursive_each@@ -229,10 +229,10 @@ class Report::Result@sum_for[field] ||= sum { |v| v.send(field) || 0 }end- def recursive_each_with_level(level = 0, depth_first = true, &block)+ def recursive_each_with_level(level = 0, depth_first = true, &)if depth_firstsuper- each { |c| c.recursive_each_with_level(level + 1, depth_first, &block) }+ each { |c| c.recursive_each_with_level(level + 1, depth_first, &) }else # width-firstto_evaluate = [self]lvl = level@@ -240,7 +240,7 @@ class Report::Result# evaluate all stored results and find the results we need to evaluate soonto_evaluate_soon = []to_evaluate.each do |r|- block.call(lvl, r)+ yield(lvl, r)to_evaluate_soon.concat r.values if r.size > 0end# take new results to evaluate@@ -292,9 +292,9 @@ class Report::Resultdef self.new(value, fields = {}, type = nil, important_fields = [])result = case value- when ActiveRecord::Result, Array then engine::Result::WrappedResult.new value.map { |e|+ when ActiveRecord::Result, Array then engine::Result::WrappedResult.new(value.map do |e|new e, {}, nil, important_fields- }+ end)when Hash then engine::Result::DirectResult.new value.with_indifferent_accesswhen Base then valueelse raise ArgumentError, "Cannot create Result from #{value.inspect}"diff --git a/modules/reporting/lib/report/sql_statement.rb b/modules/reporting/lib/report/sql_statement.rbindex 3553c7b99c2..00417cbe07d 100644--- a/modules/reporting/lib/report/sql_statement.rb+++ b/modules/reporting/lib/report/sql_statement.rb@@ -214,7 +214,7 @@ class Report::SqlStatementif f.size == 2 and f.first.respond_to? :table_name then select field_name_for(f)else select(*f)end- when Hash then select f.map { |k, v| "#{field_name_for v} as #{field_name_for k}" }+ when Hash then select(f.map { |k, v| "#{field_name_for v} as #{field_name_for k}" })when String, Symbol then @select << field_name_for(f)when engine::SqlStatement then @select << f.to_selse raise ArgumentError, "cannot handle #{f.inspect}"diff --git a/modules/reporting/lib/widget/filters/operators.rb b/modules/reporting/lib/widget/filters/operators.rbindex 65f241ebdbd..91057075a24 100644--- a/modules/reporting/lib/widget/filters/operators.rb+++ b/modules/reporting/lib/widget/filters/operators.rb@@ -29,7 +29,7 @@class Widget::Filters::Operators < Widget::Filters::Basedef renderwrite(content_tag(:div, class: 'advanced-filters--filter-operator') do- hide_select_box = (filter_class.available_operators.count == 1 || filter_class.heavy?)+ hide_select_box = filter_class.available_operators.count == 1 || filter_class.heavy?options = { class: 'advanced-filters--select filters-select filter_operator',id: "operators[#{filter_class.underscore_name}]",name: "operators[#{filter_class.underscore_name}]",diff --git a/modules/reporting/lib/widget/filters/option.rb b/modules/reporting/lib/widget/filters/option.rbindex cf0642a60e6..194dd4ecc74 100644--- a/modules/reporting/lib/widget/filters/option.rb+++ b/modules/reporting/lib/widget/filters/option.rb@@ -37,7 +37,7 @@ class Widget::Filters::Option < Widget::Filters::Baseoptions = args.first || {} # optional configuration for valueslevel = options[:level] # nesting_level is optional for valuesname = I18n.t(name) if name.is_a? Symbol- name = name.empty? ? I18n.t(:label_none) : name+ name = I18n.t(:label_none) if name.empty?name_prefix = (level && level > 0 ? ((' ' * 2 * level) + '> ') : '')if options[:optgroup]tag :optgroup, label: I18n.t(:label_sector)diff --git a/modules/reporting/lib/widget/reporting_widget.rb b/modules/reporting/lib/widget/reporting_widget.rbindex e73b96f4353..d894bd98195 100644--- a/modules/reporting/lib/widget/reporting_widget.rb+++ b/modules/reporting/lib/widget/reporting_widget.rb@@ -52,8 +52,8 @@ class Widget::ReportingWidget < ActionView::Basefalseend- def method_missing(name, *args, &)- controller.send(name, *args, &)+ def method_missing(name, *, &)+ controller.send(name, *, &)rescue NoMethodErrorraise NoMethodError, "undefined method `#{name}' for #<#{self.class}:0x#{object_id}>"enddiff --git a/modules/reporting/spec/factories/cost_query_factory.rb b/modules/reporting/spec/factories/cost_query_factory.rbindex a1e12900ae4..e407fc5e841 100644--- a/modules/reporting/spec/factories/cost_query_factory.rb+++ b/modules/reporting/spec/factories/cost_query_factory.rb@@ -28,8 +28,8 @@FactoryBot.define dofactory :cost_query do- association :user, factory: :user- association :project, factory: :project+ association :user+ association :projectsequence(:name) { |n| "Cost Query #{n}" }factory :private_cost_query dois_public { false }diff --git a/modules/reporting/spec/features/custom_fields_spec.rb b/modules/reporting/spec/features/custom_fields_spec.rbindex 1cd7456f3bd..45314078722 100644--- a/modules/reporting/spec/features/custom_fields_spec.rb+++ b/modules/reporting/spec/features/custom_fields_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Custom fields reporting', js: true do+RSpec.describe 'Custom fields reporting', :js dolet(:type) { create(:type) }let(:project) { create(:project, types: [type]) }@@ -90,24 +90,24 @@ RSpec.describe 'Custom fields reporting', js: true doendit 'filters by the multi CF' do- expect(page).to have_selector('#add_filter_select option', text: 'List CF')+ expect(page).to have_css('#add_filter_select option', text: 'List CF')select 'List CF', from: 'add_filter_select'# Adds filter to page, filtering out the time entries on the work package- expect(page).to have_selector("label##{cf_id}")+ expect(page).to have_css("label##{cf_id}")custom_field_selector = "##{cf_id}_arg_1_val"select = find(custom_field_selector)- expect(select).to have_selector('option', text: 'First option')- expect(select).to have_selector('option', text: 'Second option')+ expect(select).to have_css('option', text: 'First option')+ expect(select).to have_css('option', text: 'Second option')select.find('option', text: 'Second option').select_optionclick_link 'Apply'# Expect empty result tablewithin('#result-table') do- expect(page).not_to have_selector('.top.result', text: '12.50 hours')+ expect(page).to have_no_css('.top.result', text: '12.50 hours')end- expect(page).to have_selector('.generic-table--no-results-title')+ expect(page).to have_css('.generic-table--no-results-title')# Update filter to value the work package hasselect = find(custom_field_selector)@@ -116,13 +116,13 @@ RSpec.describe 'Custom fields reporting', js: true do# Expect row of work packagewithin('#result-table') do- expect(page).to have_selector('.top.result', text: '12.50 hours')+ expect(page).to have_css('.top.result', text: '12.50 hours')endendit 'groups by the multi CF (Regression #26050)' do- expect(page).to have_selector('#group-by--add-columns')- expect(page).to have_selector('#group-by--add-rows')+ expect(page).to have_css('#group-by--add-columns')+ expect(page).to have_css('#group-by--add-rows')select 'List CF', from: 'group-by--add-columns'select 'Work package', from: 'group-by--add-rows'@@ -131,13 +131,13 @@ RSpec.describe 'Custom fields reporting', js: true do# Expect row of work packagewithin('#result-table') do- expect(page).to have_selector('a.work_package', text: "#{work_package.type} ##{work_package.id}")+ expect(page).to have_css('a.work_package', text: "#{work_package.type} ##{work_package.id}")# There used to be additional and unwanted text after the option name being rendered.- expect(page).to have_selector('th.inner', text: /^First option$/)- expect(page).not_to have_selector('th.inner', text: 'Second option')+ expect(page).to have_css('th.inner', text: /^First option$/)+ expect(page).to have_no_css('th.inner', text: 'Second option')# Only first option should have content for the work package- expect(page).to have_selector('table.report tbody tr', count: 1)+ expect(page).to have_css('table.report tbody tr', count: 1)row_elements = page.all('table.report tr.odd th')expect(row_elements[0].text).to eq(project.name)@@ -183,8 +183,8 @@ RSpec.describe 'Custom fields reporting', js: true doit 'groups by the raw values when an invalid value exists' doexpect(work_package2.send(custom_field_2.attribute_getter)).to eq(['invalid not found'])- expect(page).to have_selector('#group-by--add-columns')- expect(page).to have_selector('#group-by--add-rows')+ expect(page).to have_css('#group-by--add-columns')+ expect(page).to have_css('#group-by--add-rows')select 'Invalid List CF', from: 'group-by--add-columns'select 'Work package', from: 'group-by--add-rows'@@ -194,9 +194,9 @@ RSpec.describe 'Custom fields reporting', js: true do# Expect row of work packagewithin('#result-table') do- expect(page).to have_selector('a.work_package', text: "#{work_package.type} ##{work_package.id}")- expect(page).to have_selector('th.inner', text: '1')- expect(page).not_to have_selector('th.inner', text: 'invalid!')+ expect(page).to have_css('a.work_package', text: "#{work_package.type} ##{work_package.id}")+ expect(page).to have_css('th.inner', text: '1')+ expect(page).to have_no_css('th.inner', text: 'invalid!')endendend@@ -217,8 +217,8 @@ RSpec.describe 'Custom fields reporting', js: true doendit 'groups by a text CF' do- expect(page).to have_selector('#group-by--add-columns')- expect(page).to have_selector('#group-by--add-rows')+ expect(page).to have_css('#group-by--add-columns')+ expect(page).to have_css('#group-by--add-rows')select 'Text CF', from: 'group-by--add-columns'select 'Work package', from: 'group-by--add-rows'@@ -227,12 +227,12 @@ RSpec.describe 'Custom fields reporting', js: true do# Expect row of work packagewithin('#result-table') do- expect(page).to have_selector('a.work_package', text: "#{work_package.type} ##{work_package.id}")- expect(page).to have_selector('th.inner', text: 'foo')- expect(page).not_to have_selector('th.inner', text: 'None')+ expect(page).to have_css('a.work_package', text: "#{work_package.type} ##{work_package.id}")+ expect(page).to have_css('th.inner', text: 'foo')+ expect(page).to have_no_css('th.inner', text: 'None')# Only first option should have content for the work package- expect(page).to have_selector('table.report tbody tr', count: 1)+ expect(page).to have_css('table.report tbody tr', count: 1)row_elements = page.all('table.report tr.odd th')expect(row_elements[0].text).to eq(project.name)diff --git a/modules/reporting/spec/features/export_cost_report_spec.rb b/modules/reporting/spec/features/export_cost_report_spec.rbindex b4f2fcb84ba..aac374de311 100644--- a/modules/reporting/spec/features/export_cost_report_spec.rb+++ b/modules/reporting/spec/features/export_cost_report_spec.rb@@ -29,7 +29,7 @@require_relative '../spec_helper'require_relative 'support/pages/cost_report_page'-RSpec.describe "Cost reports XLS export", js: true do+RSpec.describe "Cost reports XLS export", :js doshared_let(:project) { create(:project) }shared_let(:user) { create(:admin) }shared_let(:cost_type) { create(:cost_type, name: 'Post-war', unit: 'cap', unit_plural: 'caps') }diff --git a/modules/reporting/spec/features/filter_spec.rb b/modules/reporting/spec/features/filter_spec.rbindex 503e84111d0..708398e9176 100644--- a/modules/reporting/spec/features/filter_spec.rb+++ b/modules/reporting/spec/features/filter_spec.rb@@ -23,32 +23,32 @@ RSpec.describe 'Cost report calculations', :js, :with_cuprite doit 'provides filtering' do# Then filter "spent_on" should be visible# And filter "user_id" should be visible- expect(page).to have_selector("#filter_project_id")- expect(page).to have_selector("#filter_spent_on")- expect(page).to have_selector("#filter_user_id")+ expect(page).to have_css("#filter_project_id")+ expect(page).to have_css("#filter_spent_on")+ expect(page).to have_css("#filter_user_id")# Regression #48633# Remove filter:# And I click on the filter's "Clear" buttonclear_project_filter# Then filter "project_id" should not be visible- expect(page).not_to have_selector('#filter_project_id')+ expect(page).to have_no_css('#filter_project_id')# Remove filters:# And I click on "Clear"click_on 'Clear'# Then filter "spent_on" should not be visible# And filter "user_id" should not be visible- expect(page).not_to have_selector("#filter_spent_on")- expect(page).not_to have_selector("#filter_user_id")+ expect(page).to have_no_css("#filter_spent_on")+ expect(page).to have_no_css("#filter_user_id")# Reload restores the query# And the user with the login "developer" should be selected for "User Value"# And "!" should be selected for "User Operator Open this filter with 'ALT' and arrow keys."reload_page- expect(page).to have_selector("#filter_spent_on")- expect(page).to have_selector("#filter_user_id")+ expect(page).to have_css("#filter_spent_on")+ expect(page).to have_css("#filter_user_id")- expect(page).to have_selector("#user_id_arg_1_val", text: 'me')+ expect(page).to have_css("#user_id_arg_1_val", text: 'me')endenddiff --git a/modules/reporting/spec/features/main_menu_item_spec.rb b/modules/reporting/spec/features/main_menu_item_spec.rbindex f22025a6eba..1a90c2f992d 100644--- a/modules/reporting/spec/features/main_menu_item_spec.rb+++ b/modules/reporting/spec/features/main_menu_item_spec.rb@@ -73,7 +73,7 @@ RSpec.describe 'Cost and Reports Main Menu Item', :js, :with_cuprite doit 'is not rendered' dowithin '#main-menu' do- expect(page).not_to have_link(I18n.t(:cost_reports_title))+ expect(page).to have_no_link(I18n.t(:cost_reports_title))endendenddiff --git a/modules/reporting/spec/features/me_value_spec.rb b/modules/reporting/spec/features/me_value_spec.rbindex 6355cc4c470..7c969b0c225 100644--- a/modules/reporting/spec/features/me_value_spec.rb+++ b/modules/reporting/spec/features/me_value_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Cost report showing my own times', js: true do+RSpec.describe 'Cost report showing my own times', :js dolet(:project) { create(:project) }let(:user) { create(:admin) }let(:user2) { create(:admin) }@@ -39,9 +39,9 @@ RSpec.describe 'Cost report showing my own times', js: true docheck 'query_is_public'find_by_id('query-icon-save-button').click# wait until the save is complete- expect(page).to have_selector('h2', text: 'Query ME value')+ expect(page).to have_css('h2', text: 'Query ME value')- expect(page).to have_selector('.report', text: '10.00')+ expect(page).to have_css('.report', text: '10.00')report = nilretry_block do@@ -57,8 +57,8 @@ RSpec.describe 'Cost report showing my own times', js: true do# Create and save cost reportvisit cost_report_path(report.id, project_id: project.identifier)- expect(page).not_to have_selector('.report', text: '10.00')- expect(page).to have_selector('.report', text: '15.00')+ expect(page).to have_no_css('.report', text: '10.00')+ expect(page).to have_css('.report', text: '15.00')expect(page).to have_field(filter_selector, text: 'me')enddiff --git a/modules/reporting/spec/features/menu_spec.rb b/modules/reporting/spec/features/menu_spec.rbindex ad472424c00..7813f0117ab 100644--- a/modules/reporting/spec/features/menu_spec.rb+++ b/modules/reporting/spec/features/menu_spec.rb@@ -98,7 +98,7 @@ RSpec.describe 'project menu' dofind("#main-menu #{test_selector('op-menu--item-action')}", text: 'Time and costs').click# to make sure we're not seeing the project cost reports:- expect(page).not_to have_text('Ponyo')+ expect(page).to have_no_text('Ponyo')endenddiff --git a/modules/reporting/spec/features/my_time_spec.rb b/modules/reporting/spec/features/my_time_spec.rbindex e232bc3ef35..f3d6e42c4d1 100644--- a/modules/reporting/spec/features/my_time_spec.rb+++ b/modules/reporting/spec/features/my_time_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Cost report showing my own times', js: true do+RSpec.describe 'Cost report showing my own times', :js dolet(:project) { create(:project) }let(:user) { create(:admin) }let(:user2) { create(:admin) }@@ -25,7 +25,7 @@ RSpec.describe 'Cost report showing my own times', js: true dolet(:current_user) { user }it 'shows my time' do- expect(page).to have_selector('.report', text: '10.0')+ expect(page).to have_css('.report', text: '10.0')endend@@ -33,9 +33,9 @@ RSpec.describe 'Cost report showing my own times', js: true dolet(:current_user) { user2 }it 'shows my time' do- expect(page).not_to have_selector('.report')- expect(page).to have_selector('.generic-table--no-results-title')- expect(page).not_to have_text '10.0' # 1 EUR x 10+ expect(page).to have_no_css('.report')+ expect(page).to have_css('.generic-table--no-results-title')+ expect(page).to have_no_text '10.0' # 1 EUR x 10endendenddiff --git a/modules/reporting/spec/features/permissions_spec.rb b/modules/reporting/spec/features/permissions_spec.rbindex d90e78bbf05..1567a9889fb 100644--- a/modules/reporting/spec/features/permissions_spec.rb+++ b/modules/reporting/spec/features/permissions_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'require_relative 'support/pages/cost_report_page'-RSpec.describe 'Cost report calculations', js: true do+RSpec.describe 'Cost report calculations', :js dolet(:project) { create(:project) }let(:admin) { create(:admin) }@@ -86,7 +86,7 @@ RSpec.describe 'Cost report calculations', js: true doexpect(page).to have_content '5.00 hours'expect(page).to have_content '10.00 hours'report_page.switch_to_type 'Translations'- expect(page).to have_selector('td.units', text: '3.0 plural_unit', wait: 10)+ expect(page).to have_css('td.units', text: '3.0 plural_unit', wait: 10)endend@@ -107,9 +107,9 @@ RSpec.describe 'Cost report calculations', js: true doit 'shows his own costs' doexpect(page).to have_content '5.00 hours'- expect(page).not_to have_content '10.00 hours'+ expect(page).to have_no_content '10.00 hours'report_page.switch_to_type 'Translations'- expect(page).to have_selector('td.units', text: '3.0 plural_unit', wait: 10)+ expect(page).to have_css('td.units', text: '3.0 plural_unit', wait: 10)endend@@ -121,11 +121,11 @@ RSpec.describe 'Cost report calculations', js: true doit 'shows his own time only' doexpect(page).to have_content '5.00 hours'- expect(page).not_to have_content '10.00 hours'+ expect(page).to have_no_content '10.00 hours'report_page.switch_to_type 'Translations'- expect(page).to have_selector('.generic-table--no-results-title')- expect(page).not_to have_selector('td.unit', text: '3.0 plural_unit')+ expect(page).to have_css('.generic-table--no-results-title')+ expect(page).to have_no_css('td.unit', text: '3.0 plural_unit')endend@@ -136,11 +136,11 @@ RSpec.describe 'Cost report calculations', js: true doendit 'shows his own costs' do- expect(page).to have_selector('.generic-table--no-results-title')- expect(page).not_to have_content '5.00 hours'- expect(page).not_to have_content '10.00 hours'+ expect(page).to have_css('.generic-table--no-results-title')+ expect(page).to have_no_content '5.00 hours'+ expect(page).to have_no_content '10.00 hours'report_page.switch_to_type 'Translations'- expect(page).not_to have_selector('td.unit', text: '3.0 plural_unit')+ expect(page).to have_no_css('td.unit', text: '3.0 plural_unit')endendenddiff --git a/modules/reporting/spec/features/project_context_spec.rb b/modules/reporting/spec/features/project_context_spec.rbindex 806e57d9067..a28f9ffc94e 100644--- a/modules/reporting/spec/features/project_context_spec.rb+++ b/modules/reporting/spec/features/project_context_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'require_relative 'support/pages/cost_report_page'-RSpec.describe 'Cost report project context', js: true do+RSpec.describe 'Cost report project context', :js dolet(:project1) { create(:project) }let(:project2) { create(:project) }let(:admin) { create(:admin) }@@ -16,9 +16,9 @@ RSpec.describe 'Cost report project context', js: true doit "switches the project context when visiting another project's cost report" dovisit cost_reports_path(project1)- expect(page).to have_selector('.ng-value-label', text: project1.name)+ expect(page).to have_css('.ng-value-label', text: project1.name)visit cost_reports_path(project2)- expect(page).to have_selector('.ng-value-label', text: project2.name)+ expect(page).to have_css('.ng-value-label', text: project2.name)endenddiff --git a/modules/reporting/spec/features/saving_spec.rb b/modules/reporting/spec/features/saving_spec.rbindex 564701d88b6..7351eb6bcb7 100644--- a/modules/reporting/spec/features/saving_spec.rb+++ b/modules/reporting/spec/features/saving_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'require_relative 'support/pages/cost_report_page'-RSpec.describe 'Cost report saving', js: true do+RSpec.describe 'Cost report saving', :js dolet(:project) { create(:project) }let(:user) { create(:admin) }@@ -21,9 +21,9 @@ RSpec.describe 'Cost report saving', js: true doreport_page.save as: 'Testreport'# Check if the category is displayed- expect(page).to have_selector('.op-sidemenu--title', text: I18n.t(:label_private_report_plural).upcase)+ expect(page).to have_css('.op-sidemenu--title', text: I18n.t(:label_private_report_plural).upcase)# Check if the new report is displayed- expect(page).to have_selector('.op-sidemenu--item-title', text: 'Testreport')+ expect(page).to have_css('.op-sidemenu--item-title', text: 'Testreport')report_page.expect_column_element 'Work package'report_page.expect_row_element 'Project'@@ -38,9 +38,9 @@ RSpec.describe 'Cost report saving', js: true doreport_page.save as: 'Public report', public: true# Check if the category is displayed- expect(page).to have_selector('.op-sidemenu--title', text: I18n.t(:label_public_report_plural).upcase)+ expect(page).to have_css('.op-sidemenu--title', text: I18n.t(:label_public_report_plural).upcase)# Check if the new report is displayed- expect(page).to have_selector('.op-sidemenu--item-title', text: 'Public report')+ expect(page).to have_css('.op-sidemenu--item-title', text: 'Public report')report_page.expect_column_element 'Work package'report_page.expect_row_element 'Project'@@ -54,7 +54,7 @@ RSpec.describe 'Cost report saving', js: true doendit 'cannot save reports' do- expect(page).not_to have_selector('.buttons', text: 'Save')+ expect(page).to have_no_css('.buttons', text: 'Save')endendenddiff --git a/modules/reporting/spec/features/subproject_spec.rb b/modules/reporting/spec/features/subproject_spec.rbindex b28cac3c4df..8e32ca47c97 100644--- a/modules/reporting/spec/features/subproject_spec.rb+++ b/modules/reporting/spec/features/subproject_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Cost report in subproject', js: true do+RSpec.describe 'Cost report in subproject', :js dolet!(:project) { create(:project) }let!(:subproject) { create(:project, parent: project) }diff --git a/modules/reporting/spec/features/support/components/cost_reports_base_table.rb b/modules/reporting/spec/features/support/components/cost_reports_base_table.rbindex 86d81194e74..8bda2bb010b 100644--- a/modules/reporting/spec/features/support/components/cost_reports_base_table.rb+++ b/modules/reporting/spec/features/support/components/cost_reports_base_table.rb@@ -39,19 +39,19 @@ module Componentsenddef rows_count(count)- expect(page).to have_selector('#result-table tbody tr', count:)+ expect(page).to have_css('#result-table tbody tr', count:)enddef expect_action_icon(icon, row, present: true)if present- expect(page).to have_selector("#{row_selector(row)} .icon-#{icon}")+ expect(page).to have_css("#{row_selector(row)} .icon-#{icon}")else- expect(page).not_to have_selector("#{row_selector(row)} .icon-#{icon}")+ expect(page).to have_no_css("#{row_selector(row)} .icon-#{icon}")endenddef expect_value(value, row)- expect(page).to have_selector("#{row_selector(row)} .units", text: value)+ expect(page).to have_css("#{row_selector(row)} .units", text: value)enddef edit_time_entry(new_value, row)@@ -78,7 +78,7 @@ module ComponentsSeleniumHubWaiter.waitfill_in('cost_entry_units', with: new_value)click_button 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')enddef delete_entry(row)diff --git a/modules/reporting/spec/features/support/pages/cost_report_page.rb b/modules/reporting/spec/features/support/pages/cost_report_page.rbindex 740ffd940b4..2cb80cbe168 100644--- a/modules/reporting/spec/features/support/pages/cost_report_page.rb+++ b/modules/reporting/spec/features/support/pages/cost_report_page.rb@@ -14,7 +14,7 @@ module Pages# Safeguard to force waiting for the form to be clearedexpect(page)- .not_to have_selector('.group-by--selected-element')+ .to have_no_css('.group-by--selected-element')endend@@ -65,25 +65,25 @@ module Pagesdef expect_row_element(text, present: true)if present- expect(page).to have_selector('#group-by--selected-rows .group-by--selected-element', text:)+ expect(page).to have_css('#group-by--selected-rows .group-by--selected-element', text:)else- expect(page).not_to have_selector('#group-by--selected-rows .group-by--selected-element', text:)+ expect(page).to have_no_css('#group-by--selected-rows .group-by--selected-element', text:)endenddef expect_column_element(text, present: true)if present- expect(page).to have_selector('#group-by--selected-columns .group-by--selected-element', text:)+ expect(page).to have_css('#group-by--selected-columns .group-by--selected-element', text:)else- expect(page).not_to have_selector('#group-by--selected-columns .group-by--selected-element', text:)+ expect(page).to have_no_css('#group-by--selected-columns .group-by--selected-element', text:)endenddef show_loading_indicator(present: true)if present- expect(page).to have_selector('#ajax-indicator')+ expect(page).to have_css('#ajax-indicator')else- expect(page).not_to have_selector('#ajax-indicator')+ expect(page).to have_no_css('#ajax-indicator')endenddiff --git a/modules/reporting/spec/features/top_menu_item_spec.rb b/modules/reporting/spec/features/top_menu_item_spec.rbindex f77915cf93e..dfac4711d12 100644--- a/modules/reporting/spec/features/top_menu_item_spec.rb+++ b/modules/reporting/spec/features/top_menu_item_spec.rb@@ -43,7 +43,7 @@ RSpec.describe 'Top menu items', :js dodef expect_no_menu_item(*labels)within '.op-app-header' dolabels.each do |l|- expect(page).not_to have_link(l)+ expect(page).to have_no_link(l)endendend@@ -53,7 +53,7 @@ RSpec.describe 'Top menu items', :js do# the click might be ignoredwithin '.op-app-menu--item_has-dropdown .op-app-menu--dropdown[aria-expanded=true]' do- expect(page).not_to have_css('[style~=overflow]')+ expect(page).to have_no_css('[style~=overflow]')page.click_link(title)enddiff --git a/modules/reporting/spec/features/update_cost_report_spec.rb b/modules/reporting/spec/features/update_cost_report_spec.rbindex 4550780b3ea..1c2ef81a5c3 100644--- a/modules/reporting/spec/features/update_cost_report_spec.rb+++ b/modules/reporting/spec/features/update_cost_report_spec.rb@@ -29,7 +29,7 @@require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb')require_relative 'support/pages/cost_report_page'-RSpec.describe "updating a cost report's cost type", js: true do+RSpec.describe "updating a cost report's cost type", :js dolet(:project) { create(:project_with_types, members: { user => create(:project_role) }) }let(:user) docreate(:admin)diff --git a/modules/reporting/spec/features/update_entries_spec.rb b/modules/reporting/spec/features/update_entries_spec.rbindex e72d6f2a458..d3c2ae2fe84 100644--- a/modules/reporting/spec/features/update_entries_spec.rb+++ b/modules/reporting/spec/features/update_entries_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require_relative 'support/pages/cost_report_page'require_relative 'support/components/cost_reports_base_table'-RSpec.describe 'Updating entries within the cost report', js: true do+RSpec.describe 'Updating entries within the cost report', :js dolet(:project) { create(:project) }let(:user) { create(:admin, member_with_permissions: { project => %i[work_package_assigned] }) }let(:work_package) { create(:work_package, project:) }diff --git a/modules/reporting/spec/features/work_package_costlog_spec.rb b/modules/reporting/spec/features/work_package_costlog_spec.rbindex 85b8daa9e01..8bb034a5b29 100644--- a/modules/reporting/spec/features/work_package_costlog_spec.rb+++ b/modules/reporting/spec/features/work_package_costlog_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Cost report showing my own times', js: true do+RSpec.describe 'Cost report showing my own times', :js dolet(:project) { create(:project) }let(:user) docreate(:user, member_with_roles: { project => role })@@ -38,9 +38,9 @@ RSpec.describe 'Cost report showing my own times', js: true doendwithin_window new_window do- expect(page).to have_selector('#query_saved_name', text: 'New cost report')+ expect(page).to have_css('#query_saved_name', text: 'New cost report')expect(page).to have_field('values[work_package_id][]', with: work_package.id)- expect(page).to have_selector('td.units', text: '10.0 Foobars')+ expect(page).to have_css('td.units', text: '10.0 Foobars')endendenddiff --git a/modules/reporting/spec/models/cost_query/chaining_spec.rb b/modules/reporting/spec/models/cost_query/chaining_spec.rbindex f75e9b9ed34..65cd5d4f238 100644--- a/modules/reporting/spec/models/cost_query/chaining_spec.rb+++ b/modules/reporting/spec/models/cost_query/chaining_spec.rb@@ -28,7 +28,7 @@require File.expand_path("#{File.dirname(__FILE__)}/../../spec_helper")-RSpec.describe CostQuery, reporting_query_helper: true do+RSpec.describe CostQuery, :reporting_query_helper dolet(:project) { create(:project) }minimal_querydiff --git a/modules/reporting/spec/models/cost_query/group_by_spec.rb b/modules/reporting/spec/models/cost_query/group_by_spec.rbindex 7b683f20323..4fbb9c0d451 100644--- a/modules/reporting/spec/models/cost_query/group_by_spec.rb+++ b/modules/reporting/spec/models/cost_query/group_by_spec.rb@@ -29,7 +29,7 @@require File.expand_path("#{File.dirname(__FILE__)}/../../spec_helper")require File.join(File.dirname(__FILE__), '..', '..', 'support', 'custom_field_filter')-RSpec.describe CostQuery, reporting_query_helper: true do+RSpec.describe CostQuery, :reporting_query_helper dolet!(:type) { create(:type) }let!(:project1) { create(:project_with_types, types: [type]) }let!(:work_package1) { create(:work_package, project: project1, type:) }diff --git a/modules/reporting/spec/models/cost_query/integration_spec.rb b/modules/reporting/spec/models/cost_query/integration_spec.rbindex ff836f13797..3af98ccf1df 100644--- a/modules/reporting/spec/models/cost_query/integration_spec.rb+++ b/modules/reporting/spec/models/cost_query/integration_spec.rb@@ -28,7 +28,7 @@require File.expand_path("#{File.dirname(__FILE__)}/../../spec_helper")-RSpec.describe CostQuery, reporting_query_helper: true do+RSpec.describe CostQuery, :reporting_query_helper dominimal_querylet!(:project1) { create(:project_with_types) }diff --git a/modules/reporting/spec/models/cost_query/operator_spec.rb b/modules/reporting/spec/models/cost_query/operator_spec.rbindex ab90a132ee1..0adef7845b0 100644--- a/modules/reporting/spec/models/cost_query/operator_spec.rb+++ b/modules/reporting/spec/models/cost_query/operator_spec.rb@@ -28,7 +28,7 @@require File.expand_path("#{File.dirname(__FILE__)}/../../spec_helper")-RSpec.describe CostQuery, reporting_query_helper: true do+RSpec.describe CostQuery, :reporting_query_helper dominimal_querylet!(:project1) { create(:project, name: "project1", created_at: 5.minutes.ago) }@@ -261,7 +261,7 @@ RSpec.describe CostQuery, reporting_query_helper: true do# y/n seem are for filtering overridden costsit "does y" do- expect(query_on_entries('overridden_costs', 'y').size).to eq(Entry.all.count { |e| !(e.overridden_costs.nil?) })+ expect(query_on_entries('overridden_costs', 'y').size).to eq(Entry.all.count { |e| !e.overridden_costs.nil? })endit "does n" dodiff --git a/modules/reporting/spec/models/cost_query/result_spec.rb b/modules/reporting/spec/models/cost_query/result_spec.rbindex 99036a6e615..28f6c3c3842 100644--- a/modules/reporting/spec/models/cost_query/result_spec.rb+++ b/modules/reporting/spec/models/cost_query/result_spec.rb@@ -28,7 +28,7 @@require File.expand_path("#{File.dirname(__FILE__)}/../../spec_helper")-RSpec.describe CostQuery, reporting_query_helper: true do+RSpec.describe CostQuery, :reporting_query_helper dobefore docreate(:admin)project = create(:project_with_types)diff --git a/modules/reporting/spec/models/cost_query/walker_spec.rb b/modules/reporting/spec/models/cost_query/walker_spec.rbindex 0cb342f2597..a157fb26cb6 100644--- a/modules/reporting/spec/models/cost_query/walker_spec.rb+++ b/modules/reporting/spec/models/cost_query/walker_spec.rb@@ -28,7 +28,7 @@require File.expand_path("#{File.dirname(__FILE__)}/../../spec_helper")-RSpec.describe CostQuery, reporting_query_helper: true do+RSpec.describe CostQuery, :reporting_query_helper dominimal_querybefore dodiff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/folder_files_file_ids_deep_query.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/folder_files_file_ids_deep_query.rbindex 1ebe250557c..3da2b94fe5e 100644--- a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/folder_files_file_ids_deep_query.rb+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/folder_files_file_ids_deep_query.rb@@ -30,7 +30,6 @@module Storages::Peripherals::StorageInteraction::Nextcloudclass FolderFilesFileIdsDeepQuery-def self.call(storage:, path:)::Storages::Peripherals::Registry.resolve("queries.nextcloud.propfind")diff --git a/modules/storages/app/validator/nextcloud_compatible_host_validator.rb b/modules/storages/app/validator/nextcloud_compatible_host_validator.rbindex 51cdcb0f080..206045b4ae8 100644--- a/modules/storages/app/validator/nextcloud_compatible_host_validator.rb+++ b/modules/storages/app/validator/nextcloud_compatible_host_validator.rb@@ -150,10 +150,8 @@ class NextcloudCompatibleHostValidator < ActiveModel::EachValidatorenddef json_response_with_version?(response)- (- response['content-type'].split(';').first.strip.downcase == 'application/json' \- && read_version(response)- )+ response['content-type'].split(';').first.strip.downcase == 'application/json' \+ && read_version(response)rescue JSON::ParserErrorfalseenddiff --git a/modules/storages/spec/components/project_storages/row_component_spec.rb b/modules/storages/spec/components/project_storages/row_component_spec.rbindex 8e0e706a773..b4bc90554af 100644--- a/modules/storages/spec/components/project_storages/row_component_spec.rb+++ b/modules/storages/spec/components/project_storages/row_component_spec.rb@@ -41,7 +41,7 @@ RSpec.describe Storages::ProjectStorages::RowComponent,render_inline(component)- expect(page).not_to have_css('a.icon.icon-group')+ expect(page).to have_no_css('a.icon.icon-group')expect(page).to have_css('a.icon.icon-edit')expect(page).to have_css('a.icon.icon-delete')enddiff --git a/modules/storages/spec/contracts/storages/storages/one_drive_contract_spec.rb b/modules/storages/spec/contracts/storages/storages/one_drive_contract_spec.rbindex d8ada082ce7..befc0362011 100644--- a/modules/storages/spec/contracts/storages/storages/one_drive_contract_spec.rb+++ b/modules/storages/spec/contracts/storages/storages/one_drive_contract_spec.rb@@ -31,7 +31,7 @@require 'spec_helper'require_module_spec_helper-RSpec.describe Storages::Storages::NextcloudContract, :storage_server_helpers, webmock: true do+RSpec.describe Storages::Storages::NextcloudContract, :storage_server_helpers, :webmock dolet(:current_user) { create(:admin) }let(:storage) { build(:one_drive_storage) }diff --git a/modules/storages/spec/factories/storage_file_info_factory.rb b/modules/storages/spec/factories/storage_file_info_factory.rbindex a10cbdc0374..fee2918c3eb 100644--- a/modules/storages/spec/factories/storage_file_info_factory.rb+++ b/modules/storages/spec/factories/storage_file_info_factory.rb@@ -30,7 +30,6 @@ FactoryBot.define dofactory :storage_file_info, class: '::Storages::StorageFileInfo' dostatus { "OK" }status_code { 200 }- sequence(:id) { |n| "20000#{n}" }sequence(:name) { |n| "file_name_#{n}.txt" }last_modified_at { Time.zone.now }created_at { Time.zone.now }diff --git a/modules/storages/spec/factories/webdav_data_factory.rb b/modules/storages/spec/factories/webdav_data_factory.rbindex cda554278a4..02e50453f22 100644--- a/modules/storages/spec/factories/webdav_data_factory.rb+++ b/modules/storages/spec/factories/webdav_data_factory.rb@@ -55,7 +55,7 @@ FactoryBot.define doxml['oc'].size('20028269')xml['d'].getlastmodified('Fri, 28 Oct 2022 14:27:36 GMT')xml['oc'].permissions('RGDNVCK')- xml['oc'].send(:"owner-display-name", url_safe_user_id)+ xml['oc'].send(:'owner-display-name', url_safe_user_id)endxml['d'].status('HTTP/1.1 200 OK')end@@ -74,7 +74,7 @@ FactoryBot.define doxml['oc'].size('6592')xml['d'].getlastmodified('Fri, 28 Oct 2022 14:31:26 GMT')xml['oc'].permissions('RGDNVCK')- xml['oc'].send(:"owner-display-name", url_safe_user_id)+ xml['oc'].send(:'owner-display-name', url_safe_user_id)endxml['d'].status('HTTP/1.1 200 OK')end@@ -93,7 +93,7 @@ FactoryBot.define doxml['oc'].size('8592')xml['d'].getlastmodified('Fri, 28 Oct 2022 14:43:26 GMT')xml['oc'].permissions('RGDNV')- xml['oc'].send(:"owner-display-name", url_safe_user_id)+ xml['oc'].send(:'owner-display-name', url_safe_user_id)endxml['d'].status('HTTP/1.1 200 OK')end@@ -113,7 +113,7 @@ FactoryBot.define doxml['d'].getcontenttype('text/markdown')xml['d'].getlastmodified('Thu, 14 Jul 2022 08:42:15 GMT')xml['oc'].permissions('RGDNVW')- xml['oc'].send(:"owner-display-name", url_safe_user_id)+ xml['oc'].send(:'owner-display-name', url_safe_user_id)endxml['d'].status('HTTP/1.1 200 OK')end@@ -127,7 +127,7 @@ FactoryBot.define doxml['d'].getcontenttype('application/pdf')xml['d'].getlastmodified('Thu, 14 Jul 2022 08:42:15 GMT')xml['oc'].permissions('RGDNV')- xml['oc'].send(:"owner-display-name", url_safe_user_id)+ xml['oc'].send(:'owner-display-name', url_safe_user_id)endxml['d'].status('HTTP/1.1 200 OK')end@@ -156,7 +156,7 @@ FactoryBot.define doxml['oc'].size('6592')xml['d'].getlastmodified('Fri, 28 Oct 2022 14:31:26 GMT')xml['oc'].permissions('RGDNVCK')- xml['oc'].send(:"owner-display-name", 'admin')+ xml['oc'].send(:'owner-display-name', 'admin')endxml['d'].status('HTTP/1.1 200 OK')end@@ -176,7 +176,7 @@ FactoryBot.define doxml['d'].getcontenttype('image/png')xml['d'].getlastmodified('Fri, 28 Oct 2022 14:31:26 GMT')xml['oc'].permissions('RGDNVW')- xml['oc'].send(:"owner-display-name", 'admin')+ xml['oc'].send(:'owner-display-name', 'admin')endxml['d'].status('HTTP/1.1 200 OK')end@@ -190,7 +190,7 @@ FactoryBot.define doxml['d'].getcontenttype('audio/ogg')xml['d'].getlastmodified('Fri, 28 Oct 2022 14:31:26 GMT')xml['oc'].permissions('RGDNVW')- xml['oc'].send(:"owner-display-name", 'admin')+ xml['oc'].send(:'owner-display-name', 'admin')endxml['d'].status('HTTP/1.1 200 OK')end@@ -204,7 +204,7 @@ FactoryBot.define doxml['d'].getcontenttype('text/plain')xml['d'].getlastmodified('Fri, 28 Oct 2022 14:31:26 GMT')xml['oc'].permissions('RGDNVW')- xml['oc'].send(:"owner-display-name", 'admin')+ xml['oc'].send(:'owner-display-name', 'admin')endxml['d'].status('HTTP/1.1 200 OK')enddiff --git a/modules/storages/spec/features/admin_storages_spec.rb b/modules/storages/spec/features/admin_storages_spec.rbindex c164e675aaa..4fd4776462e 100644--- a/modules/storages/spec/features/admin_storages_spec.rb+++ b/modules/storages/spec/features/admin_storages_spec.rb@@ -401,7 +401,7 @@ RSpec.describe 'Admin storages',storage_delete_button.click- expect(page).not_to have_text("Foo Nextcloud")+ expect(page).to have_no_text("Foo Nextcloud")expect(page).to have_text('Successful deletion.')expect(page).to have_current_path(admin_settings_storages_path)enddiff --git a/modules/storages/spec/features/create_file_links_spec.rb b/modules/storages/spec/features/create_file_links_spec.rbindex cad0b66038a..c7d23aa4422 100644--- a/modules/storages/spec/features/create_file_links_spec.rb+++ b/modules/storages/spec/features/create_file_links_spec.rb@@ -31,7 +31,7 @@require 'spec_helper'require_module_spec_helper-RSpec.describe 'Managing file links in work package', js: true, webmock: true do+RSpec.describe 'Managing file links in work package', :js, :webmock dolet(:permissions) { %i(view_work_packages edit_work_packages view_file_links manage_file_links) }let(:project) { create(:project) }let(:current_user) { create(:user, member_with_permissions: { project => permissions }) }diff --git a/modules/storages/spec/features/delete_project_storage_and_file_links_spec.rb b/modules/storages/spec/features/delete_project_storage_and_file_links_spec.rbindex b34711d1939..c5000e2e331 100644--- a/modules/storages/spec/features/delete_project_storage_and_file_links_spec.rb+++ b/modules/storages/spec/features/delete_project_storage_and_file_links_spec.rb@@ -76,8 +76,8 @@ RSpec.describe 'Delete ProjectStorage with FileLinks', :js, :webmock dopage.find('.icon.icon-delete').click# Danger zone confirmation flow- expect(page).to have_selector('.form--section-title', text: "DELETE FILE STORAGE")- expect(page).to have_selector('.danger-zone--warning', text: "Deleting a file storage is an irreversible action.")+ expect(page).to have_css('.form--section-title', text: "DELETE FILE STORAGE")+ expect(page).to have_css('.danger-zone--warning', text: "Deleting a file storage is an irreversible action.")expect(page).to have_button('Delete', disabled: true)# Cancel Confirmationdiff --git a/modules/storages/spec/features/manage_project_storage_spec.rb b/modules/storages/spec/features/manage_project_storage_spec.rbindex bb0012d0582..f022db3f0f5 100644--- a/modules/storages/spec/features/manage_project_storage_spec.rb+++ b/modules/storages/spec/features/manage_project_storage_spec.rb@@ -153,14 +153,14 @@ RSpec.describe 'Activation of storages in projects', :js, :webmock, with_settingexpect(page).to have_current_path edit_project_settings_project_storage_path(project_id: project,id: Storages::ProjectStorage.last)expect(page).to have_text('Edit the file storage to this project')- expect(page).not_to have_select('storages_project_storage_storage_id')+ expect(page).to have_no_select('storages_project_storage_storage_id')expect(page).to have_text(storage.name)expect(page).to have_checked_field('storages_project_storage_project_folder_mode_manual')expect(page).to have_text('Folder1')# Change the project folder mode to inactive, project folder is hidden but retainedpage.find_by_id('storages_project_storage_project_folder_mode_inactive').click- expect(page).not_to have_text('Folder1')+ expect(page).to have_no_text('Folder1')page.click_button('Save')# The list of enabled file storages should still contain Storage 1@@ -207,7 +207,7 @@ RSpec.describe 'Activation of storages in projects', :js, :webmock, with_settingit 'automatic option is not available' dovisit edit_project_settings_project_storage_path(project_id: project, id: project_storage)- expect(page).not_to have_content('New folder with automatically managed permissions')+ expect(page).to have_no_content('New folder with automatically managed permissions')endend@@ -236,8 +236,8 @@ RSpec.describe 'Activation of storages in projects', :js, :webmock, with_settingaggregate_failures 'select field options' doexpect(page).to have_select('storages_project_storage_storage_id',options: ["#{configured_storage.name} (#{configured_storage.short_provider_type})"])- expect(page).not_to have_select('storages_project_storage_storage_id',- options: ["#{unconfigured_storage.name} (#{unconfigured_storage.short_provider_type})"])+ expect(page).to have_no_select('storages_project_storage_storage_id',+ options: ["#{unconfigured_storage.name} (#{unconfigured_storage.short_provider_type})"])endendenddiff --git a/modules/storages/spec/features/show_file_links_spec.rb b/modules/storages/spec/features/show_file_links_spec.rbindex 2a126c669b0..449a675832f 100644--- a/modules/storages/spec/features/show_file_links_spec.rb+++ b/modules/storages/spec/features/show_file_links_spec.rb@@ -31,7 +31,7 @@require 'spec_helper'require_module_spec_helper-RSpec.describe 'Showing of file links in work package', js: true do+RSpec.describe 'Showing of file links in work package', :js dolet(:permissions) { %i(view_work_packages edit_work_packages view_file_links manage_file_links) }let(:project) { create(:project) }let(:current_user) { create(:user, member_with_permissions: { project => permissions }) }diff --git a/modules/storages/spec/features/storages_menu_links_spec.rb b/modules/storages/spec/features/storages_menu_links_spec.rbindex 0abeac527d1..3a076332ced 100644--- a/modules/storages/spec/features/storages_menu_links_spec.rb+++ b/modules/storages/spec/features/storages_menu_links_spec.rb@@ -56,8 +56,8 @@ RSpec.describe 'Storage links in project menu', :js doexpect(page).to have_link(storage_configured_linked1.name, href: ensure_connection_path(project_storage1))expect(page).to have_link(storage_configured_linked2.name, href: ensure_connection_path(project_storage2))- expect(page).not_to have_link(storage_configured_unlinked.name)- expect(page).not_to have_link(storage_unconfigured_linked.name)+ expect(page).to have_no_link(storage_configured_unlinked.name)+ expect(page).to have_no_link(storage_unconfigured_linked.name)endcontext 'if user is an admin but not a member of the project' do@@ -66,10 +66,10 @@ RSpec.describe 'Storage links in project menu', :js doit 'has no links to enabled storage' dovisit(project_path(id: project.id))- expect(page).not_to have_link(storage_configured_linked1.name)- expect(page).not_to have_link(storage_configured_linked2.name)- expect(page).not_to have_link(storage_configured_unlinked.name)- expect(page).not_to have_link(storage_unconfigured_linked.name)+ expect(page).to have_no_link(storage_configured_linked1.name)+ expect(page).to have_no_link(storage_configured_linked2.name)+ expect(page).to have_no_link(storage_configured_unlinked.name)+ expect(page).to have_no_link(storage_unconfigured_linked.name)endendend@@ -80,10 +80,10 @@ RSpec.describe 'Storage links in project menu', :js doit 'has no links to enabled storages' dovisit(project_path(id: project.id))- expect(page).not_to have_link(storage_configured_linked1.name)- expect(page).not_to have_link(storage_configured_linked2.name)- expect(page).not_to have_link(storage_configured_unlinked.name)- expect(page).not_to have_link(storage_unconfigured_linked.name)+ expect(page).to have_no_link(storage_configured_linked1.name)+ expect(page).to have_no_link(storage_configured_linked2.name)+ expect(page).to have_no_link(storage_configured_unlinked.name)+ expect(page).to have_no_link(storage_unconfigured_linked.name)endendenddiff --git a/modules/storages/spec/features/storages_module_spec.rb b/modules/storages/spec/features/storages_module_spec.rbindex 4e7fc9b13d4..5b17f8fe2d2 100644--- a/modules/storages/spec/features/storages_module_spec.rb+++ b/modules/storages/spec/features/storages_module_spec.rb@@ -31,7 +31,7 @@require 'spec_helper'require_module_spec_helper-RSpec.describe 'Storages module', js: true do+RSpec.describe 'Storages module', :js docurrent_user { create(:admin) }let(:role) { create(:project_role, permissions: %i[manage_storages_in_project select_project_modules edit_project]) }@@ -137,7 +137,7 @@ RSpec.describe 'Storages module', js: true doendit 'mustn\'t show the page' do- expect(page).not_to have_text(I18n.t('storages.page_titles.project_settings.index'))+ expect(page).to have_no_text(I18n.t('storages.page_titles.project_settings.index'))endendenddiff --git a/modules/storages/spec/features/view_project_storage_members_spec.rb b/modules/storages/spec/features/view_project_storage_members_spec.rbindex e7a1647a7da..24a2f9d4438 100644--- a/modules/storages/spec/features/view_project_storage_members_spec.rb+++ b/modules/storages/spec/features/view_project_storage_members_spec.rb@@ -53,7 +53,7 @@ RSpec.describe 'Project storage members connection status view' dovisit project_settings_project_storage_members_path(project, project_storage_id: project_storage.id)expect(page).to have_title('Sign in | OpenProject')- expect(page).not_to have_text('Members connection status')+ expect(page).to have_no_text('Members connection status')endit 'lists project members connection statuses' do@@ -78,8 +78,8 @@ RSpec.describe 'Project storage members connection status view' do[connected_no_permissions_user, 'User role has no storages permissions'],[disconnected_user, 'Not connected. The user should login to the storage via the following link.']].each do |(principal, status)|- expect(page).to have_selector("#member-#{principal.id} .name", text: principal.name)- expect(page).to have_selector("#member-#{principal.id} .status", text: status)+ expect(page).to have_css("#member-#{principal.id} .name", text: principal.name)+ expect(page).to have_css("#member-#{principal.id} .status", text: status)endendenddiff --git a/modules/storages/spec/models/storages/nextcloud_storage_spec.rb b/modules/storages/spec/models/storages/nextcloud_storage_spec.rbindex 6245f42f644..c308a6c039a 100644--- a/modules/storages/spec/models/storages/nextcloud_storage_spec.rb+++ b/modules/storages/spec/models/storages/nextcloud_storage_spec.rb@@ -175,7 +175,7 @@ RSpec.describe Storages::NextcloudStorage docontext "with a new value of 'foo'" doit "sets the value to 'foo'" do- storage.public_send("#{attribute}=", 'foo')+ storage.public_send(:"#{attribute}=", 'foo')expect(storage.public_send(attribute)).to eq('foo')endenddiff --git a/modules/storages/spec/requests/api/v3/project_storages/project_storages_spec.rb b/modules/storages/spec/requests/api/v3/project_storages/project_storages_spec.rbindex d3ae60e18a2..3bb926c3fbf 100644--- a/modules/storages/spec/requests/api/v3/project_storages/project_storages_spec.rb+++ b/modules/storages/spec/requests/api/v3/project_storages/project_storages_spec.rb@@ -34,7 +34,6 @@ RSpec.describe 'API v3 project storages resource', :webmock, content_type: :jsonlet(:view_permissions) { %i(view_work_packages view_file_links) }- # rubocop:disable RSpec/IndexedLetshared_let(:project1) { create(:project) }shared_let(:project2) { create(:project) }shared_let(:project3) { create(:project) }@@ -47,8 +46,6 @@ RSpec.describe 'API v3 project storages resource', :webmock, content_type: :jsonshared_let(:project_storage23) { create(:project_storage, project: project2, storage: storage3) }shared_let(:project_storage21) { create(:project_storage, project: project2, storage: storage1) }shared_let(:project_storage31) { create(:project_storage, project: project3, storage: storage1) }- # rubocop:enable RSpec/IndexedLet-subject(:last_response) doget pathend@@ -271,6 +268,7 @@ RSpec.describe 'API v3 project storages resource', :webmock, content_type: :jsonproject_folder_mode: 'manual')end+after(:all) doproject_storage12.update(project_folder_id: nil,diff --git a/modules/storages/spec/requests/api/v3/work_packages/work_packages_linked_filter_spec.rb b/modules/storages/spec/requests/api/v3/work_packages/work_packages_linked_filter_spec.rbindex 235c708cfb6..0808fbc1e67 100644--- a/modules/storages/spec/requests/api/v3/work_packages/work_packages_linked_filter_spec.rb+++ b/modules/storages/spec/requests/api/v3/work_packages/work_packages_linked_filter_spec.rb@@ -35,7 +35,6 @@ RSpec.describe 'API v3 work packages resource with filters for linked storage filet(:file_link_permissions) { %i(view_work_packages view_file_links) }- # rubocop:disable RSpec/IndexedLetlet(:role1) { create(:project_role, permissions: file_link_permissions) }let(:role2) { create(:project_role, permissions: file_link_permissions) }diff --git a/modules/storages/spec/services/storages/group_folder_properties_sync_service_spec.rb b/modules/storages/spec/services/storages/group_folder_properties_sync_service_spec.rbindex 68e4c11fc20..961a1650b3c 100644--- a/modules/storages/spec/services/storages/group_folder_properties_sync_service_spec.rb+++ b/modules/storages/spec/services/storages/group_folder_properties_sync_service_spec.rb@@ -32,7 +32,6 @@ require 'spec_helper'require_module_spec_helperRSpec.describe Storages::GroupFolderPropertiesSyncService, :webmock do- # rubocop:disable RSpec/IndexedLetlet(:group_users_response_body) do<<~XML<?xml version="1.0"?>diff --git a/modules/storages/spec/services/storages/project_storages/delete_service_spec.rb b/modules/storages/spec/services/storages/project_storages/delete_service_spec.rbindex d40cda34f6f..6aa33fa5f59 100644--- a/modules/storages/spec/services/storages/project_storages/delete_service_spec.rb+++ b/modules/storages/spec/services/storages/project_storages/delete_service_spec.rb@@ -31,7 +31,7 @@ require_module_spec_helperrequire 'services/base_services/behaves_like_delete_service'require_relative 'shared_event_gun_examples'-RSpec.describe Storages::ProjectStorages::DeleteService, type: :model, webmock: true do+RSpec.describe Storages::ProjectStorages::DeleteService, :webmock, type: :model docontext 'with records written to DB' dolet(:user) { create(:user) }let(:role) { create(:project_role, permissions: [:manage_storages_in_project]) }diff --git a/modules/storages/spec/support/components/file_picker_dialog.rb b/modules/storages/spec/support/components/file_picker_dialog.rbindex 22d060f1ecc..507ed9e6d92 100644--- a/modules/storages/spec/support/components/file_picker_dialog.rb+++ b/modules/storages/spec/support/components/file_picker_dialog.rb@@ -55,7 +55,7 @@ module Componentsdef wait_for_folder_loadedpage.within(container) do- expect(page).not_to have_selector('[data-test-selector="op-file-list--loading-indicator"]')+ expect(page).to have_no_css('[data-test-selector="op-file-list--loading-indicator"]')endenddiff --git a/modules/team_planner/spec/features/team_planner_dates_spec.rb b/modules/team_planner/spec/features/team_planner_dates_spec.rbindex c7d4c2efb45..e429e6b3b75 100644--- a/modules/team_planner/spec/features/team_planner_dates_spec.rb+++ b/modules/team_planner/spec/features/team_planner_dates_spec.rb@@ -27,10 +27,9 @@#++require 'spec_helper'-require_relative './shared_context'+require_relative 'shared_context'-RSpec.describe 'Team planner working days',- js: true,+RSpec.describe 'Team planner working days', :js,with_ee: %i[team_planner_view],with_settings: { start_of_week: 1 } doinclude_context 'with team planner full access'@@ -49,37 +48,37 @@ RSpec.describe 'Team planner working days',end# Initially, in the "Work week" view, non working days are hidden- expect(page).to have_selector('.fc-day-mon')- expect(page).to have_selector('.fc-day-tue')- expect(page).to have_selector('.fc-day-wed')- expect(page).to have_selector('.fc-day-thu')- expect(page).to have_selector('.fc-day-fri')+ expect(page).to have_css('.fc-day-mon')+ expect(page).to have_css('.fc-day-tue')+ expect(page).to have_css('.fc-day-wed')+ expect(page).to have_css('.fc-day-thu')+ expect(page).to have_css('.fc-day-fri')- expect(page).not_to have_selector('.fc-day-sat')- expect(page).not_to have_selector('.fc-day-sun')+ expect(page).to have_no_css('.fc-day-sat')+ expect(page).to have_no_css('.fc-day-sun')# In the "1-week" view, non working days are displayed but markedteam_planner.switch_view_mode '1-week'- expect(page).to have_selector('.fc-day-sat.fc-non-working-day', minimum: 1, wait: 10)- expect(page).to have_selector('.fc-day-sun.fc-non-working-day', minimum: 1)+ expect(page).to have_css('.fc-day-sat.fc-non-working-day', minimum: 1, wait: 10)+ expect(page).to have_css('.fc-day-sun.fc-non-working-day', minimum: 1)- expect(page).not_to have_selector('.fc-day-mon.fc-non-working-day')- expect(page).not_to have_selector('.fc-day-tue.fc-non-working-day')- expect(page).not_to have_selector('.fc-day-wed.fc-non-working-day')- expect(page).not_to have_selector('.fc-day-thu.fc-non-working-day')- expect(page).not_to have_selector('.fc-day-fri.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-mon.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-tue.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-wed.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-thu.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-fri.fc-non-working-day')find('.fc-next-button').click- expect(page).to have_selector('.fc-day-sat.fc-non-working-day', minimum: 1, wait: 10)- expect(page).to have_selector('.fc-day-sun.fc-non-working-day', minimum: 1)+ expect(page).to have_css('.fc-day-sat.fc-non-working-day', minimum: 1, wait: 10)+ expect(page).to have_css('.fc-day-sun.fc-non-working-day', minimum: 1)- expect(page).not_to have_selector('.fc-day-mon.fc-non-working-day')- expect(page).not_to have_selector('.fc-day-tue.fc-non-working-day')- expect(page).not_to have_selector('.fc-day-wed.fc-non-working-day')- expect(page).not_to have_selector('.fc-day-thu.fc-non-working-day')- expect(page).not_to have_selector('.fc-day-fri.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-mon.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-tue.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-wed.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-thu.fc-non-working-day')+ expect(page).to have_no_css('.fc-day-fri.fc-non-working-day')endendenddiff --git a/modules/team_planner/spec/features/team_planner_error_handling_spec.rb b/modules/team_planner/spec/features/team_planner_error_handling_spec.rbindex 409854c2f75..923ed716765 100644--- a/modules/team_planner/spec/features/team_planner_error_handling_spec.rb+++ b/modules/team_planner/spec/features/team_planner_error_handling_spec.rb@@ -27,10 +27,9 @@#++require 'spec_helper'-require_relative './shared_context'+require_relative 'shared_context'-RSpec.describe 'Team planner error handling',- js: true,+RSpec.describe 'Team planner error handling', :js,with_settings: { start_of_week: 1 } doinclude_context 'with team planner full access'diff --git a/modules/team_planner/spec/features/team_planner_project_include_spec.rb b/modules/team_planner/spec/features/team_planner_project_include_spec.rbindex ec8c2f0f0f8..30391f5ef5a 100644--- a/modules/team_planner/spec/features/team_planner_project_include_spec.rb+++ b/modules/team_planner/spec/features/team_planner_project_include_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require 'features/work_packages/project_include/project_include_shared_examples'require_relative '../support/pages/team_planner'-RSpec.describe 'Team planner project include', js: true, with_ee: %i[team_planner_view] do+RSpec.describe 'Team planner project include', :js, with_ee: %i[team_planner_view] doshared_let(:enabled_modules) { %w[work_package_tracking team_planner_view] }shared_let(:permissions) do%w[view_work_packages edit_work_packages add_work_packagesdiff --git a/modules/team_planner/spec/features/team_planner_split_view_spec.rb b/modules/team_planner/spec/features/team_planner_split_view_spec.rbindex 621efed667e..173b02309d9 100644--- a/modules/team_planner/spec/features/team_planner_split_view_spec.rb+++ b/modules/team_planner/spec/features/team_planner_split_view_spec.rb@@ -27,9 +27,9 @@#++require 'spec_helper'-require_relative './shared_context'+require_relative 'shared_context'-RSpec.describe 'Team planner split view navigation', js: true, with_ee: %i[team_planner_view] do+RSpec.describe 'Team planner split view navigation', :js, with_ee: %i[team_planner_view] doinclude_context 'with team planner full access'let!(:view) { create(:view_team_planner, query:) }@@ -66,7 +66,7 @@ RSpec.describe 'Team planner split view navigation', js: true, with_ee: %i[team_# Expect clicking on a work package does not open the detailspage.find_test_selector('op-wp-single-card--content-subject', text: work_package1.subject).click- expect(page).not_to have_current_path /team_planners\/new\/details\/#{work_package1.id}/+ expect(page).to have_no_current_path /team_planners\/new\/details\/#{work_package1.id}/# Open split view through info iconsplit_view = team_planner.open_split_view_by_info_icon work_package1diff --git a/modules/team_planner/spec/features/team_planner_upsale_spec.rb b/modules/team_planner/spec/features/team_planner_upsale_spec.rbindex 7662de8d59e..f93714bdcac 100644--- a/modules/team_planner/spec/features/team_planner_upsale_spec.rb+++ b/modules/team_planner/spec/features/team_planner_upsale_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_context'+require_relative 'shared_context'RSpec.describe 'Team planner index', :js, :with_cuprite doinclude_context 'with team planner full access'diff --git a/modules/team_planner/spec/features/team_planner_view_modes_spec.rb b/modules/team_planner/spec/features/team_planner_view_modes_spec.rbindex 8938e16cbf4..e7e786cc355 100644--- a/modules/team_planner/spec/features/team_planner_view_modes_spec.rb+++ b/modules/team_planner/spec/features/team_planner_view_modes_spec.rb@@ -27,9 +27,9 @@#++require 'spec_helper'-require_relative './shared_context'+require_relative 'shared_context'-RSpec.describe 'Team planner', js: true, with_ee: %i[team_planner_view] do+RSpec.describe 'Team planner', :js, with_ee: %i[team_planner_view] doinclude_context 'with team planner full access'it 'allows switching of view modes', with_settings: { working_days: [1, 2, 3, 4, 5] } do@@ -43,22 +43,22 @@ RSpec.describe 'Team planner', js: true, with_ee: %i[team_planner_view] doendteam_planner.expect_view_mode 'Work week'- expect(page).to have_selector('.fc-timeline-slot-frame', count: 5)+ expect(page).to have_css('.fc-timeline-slot-frame', count: 5)# weekly: Expect 7 slotsteam_planner.switch_view_mode '1-week'- expect(page).to have_selector('.fc-timeline-slot-frame', count: 7)+ expect(page).to have_css('.fc-timeline-slot-frame', count: 7)# 2 weeks: expect 14 slotsteam_planner.switch_view_mode '2-week'- expect(page).to have_selector('.fc-timeline-slot-frame', count: 14)+ expect(page).to have_css('.fc-timeline-slot-frame', count: 14)start_of_week = Time.zone.today.beginning_of_week(:sunday)start_date = start_of_week.strftime('%d %a')end_date = (start_of_week + 13.days).strftime('%d %a')- expect(page).to have_selector('.fc-timeline-slot', text: start_date)- expect(page).to have_selector('.fc-timeline-slot', text: end_date)+ expect(page).to have_css('.fc-timeline-slot', text: start_date)+ expect(page).to have_css('.fc-timeline-slot', text: end_date)# Click next button, advance one weekfind('.fc-next-button').click@@ -67,7 +67,7 @@ RSpec.describe 'Team planner', js: true, with_ee: %i[team_planner_view] dostart_date = start_of_week.strftime('%d %a')end_date = (start_of_week + 13.days).strftime('%d %a')- expect(page).to have_selector('.fc-timeline-slot', text: start_date)- expect(page).to have_selector('.fc-timeline-slot', text: end_date)+ expect(page).to have_css('.fc-timeline-slot', text: start_date)+ expect(page).to have_css('.fc-timeline-slot', text: end_date)endenddiff --git a/modules/team_planner/spec/support/components/add_existing_pane.rb b/modules/team_planner/spec/support/components/add_existing_pane.rbindex 197872ead1b..49e0867a465 100644--- a/modules/team_planner/spec/support/components/add_existing_pane.rb+++ b/modules/team_planner/spec/support/components/add_existing_pane.rb@@ -46,11 +46,11 @@ module Componentsenddef expect_closed- expect(page).not_to have_selector(selector)+ expect(page).to have_no_selector(selector)enddef expect_empty- expect(page).to have_selector("[data-test-selector='op-add-existing-pane--empty-state']")+ expect(page).to have_css("[data-test-selector='op-add-existing-pane--empty-state']")enddef search(term)@@ -60,10 +60,10 @@ module Componentsdef expect_result(work_package, visible: true)if visibleexpect(page)- .to have_selector("[data-test-selector='op-add-existing-pane--wp-#{work_package.id}']", wait: 10)+ .to have_css("[data-test-selector='op-add-existing-pane--wp-#{work_package.id}']", wait: 10)elseexpect(page)- .not_to have_selector("[data-test-selector='op-add-existing-pane--wp-#{work_package.id}']")+ .to have_no_css("[data-test-selector='op-add-existing-pane--wp-#{work_package.id}']")endenddiff --git a/modules/team_planner/spec/support/pages/team_planner.rb b/modules/team_planner/spec/support/pages/team_planner.rbindex 6037bd32b06..6baa9156782 100644--- a/modules/team_planner/spec/support/pages/team_planner.rb+++ b/modules/team_planner/spec/support/pages/team_planner.rb@@ -46,7 +46,7 @@ module Pagesenddef expect_title(title = 'Unnamed team planner')- expect(page).to have_selector('.editable-toolbar-title--input') { |node| node.value == title }+ expect(page).to have_css('.editable-toolbar-title--input') { |node| node.value == title }enddef save_as(name)@@ -72,7 +72,7 @@ module Pagesenddef expect_view_mode(text)- expect(page).to have_selector('[data-test-selector="op-team-planner--view-select-dropdown"]', text:)+ expect(page).to have_css('[data-test-selector="op-team-planner--view-select-dropdown"]', text:)param = {'Work week' => :resourceTimelineWorkWeek,@@ -131,17 +131,17 @@ module Pagesdef expect_event(work_package, present: true)if present- expect(page).to have_selector('.fc-event', text: work_package.subject, wait: 10)+ expect(page).to have_css('.fc-event', text: work_package.subject, wait: 10)else- expect(page).not_to have_selector('.fc-event', text: work_package.subject)+ expect(page).to have_no_css('.fc-event', text: work_package.subject)endenddef expect_resizable(work_package, resizable: true)if resizable- expect(page).to have_selector('.fc-event.fc-event-resizable', text: work_package.subject, wait: 10)+ expect(page).to have_css('.fc-event.fc-event-resizable', text: work_package.subject, wait: 10)else- expect(page).to have_selector('.fc-event:not(.fc-event-resizable)', text: work_package.subject, wait: 10)+ expect(page).to have_css('.fc-event:not(.fc-event-resizable)', text: work_package.subject, wait: 10)endend@@ -157,18 +157,18 @@ module Pagesdef expect_delete_buttons_for(*queries)queries.each do |query|- expect(page).to have_selector "[data-test-selector='team-planner-remove-#{query.id}']"+ expect(page).to have_css "[data-test-selector='team-planner-remove-#{query.id}']"endenddef expect_no_delete_buttons_for(*queries)queries.each do |query|- expect(page).not_to have_selector "[data-test-selector='team-planner-remove-#{query.id}']"+ expect(page).to have_no_css "[data-test-selector='team-planner-remove-#{query.id}']"endenddef expect_view_not_rendered(query)- expect(page).not_to have_selector 'td', text: query.name+ expect(page).to have_no_css 'td', text: query.nameenddef expect_create_button@@ -179,7 +179,7 @@ module Pagesdef expect_no_create_buttonwithin '.toolbar-items' do- expect(page).not_to have_link text: 'Team planner'+ expect(page).to have_no_link text: 'Team planner'endend@@ -293,9 +293,9 @@ module Pagesdrag_element_to(dropzone)if expect_removable- expect(page).to have_selector('span', text: I18n.t('js.team_planner.drag_here_to_remove'))+ expect(page).to have_css('span', text: I18n.t('js.team_planner.drag_here_to_remove'))else- expect(page).to have_selector('span', text: I18n.t('js.team_planner.cannot_drag_here'))+ expect(page).to have_css('span', text: I18n.t('js.team_planner.cannot_drag_here'))enddrag_release@@ -322,15 +322,15 @@ module Pagesenddef expect_wp_not_resizable(work_package)- expect(page).to have_selector('.fc-event:not(.fc-event-resizable)', text: work_package.subject)+ expect(page).to have_css('.fc-event:not(.fc-event-resizable)', text: work_package.subject)enddef expect_wp_not_draggable(work_package)- expect(page).to have_selector('.fc-event:not(.fc-event-draggable)', text: work_package.subject)+ expect(page).to have_css('.fc-event:not(.fc-event-draggable)', text: work_package.subject)enddef expect_no_menu_item(name)- expect(page).not_to have_selector('.op-sidemenu--item-title', text: name)+ expect(page).to have_no_css('.op-sidemenu--item-title', text: name)enddef y_distance(from:, to:)@@ -342,7 +342,7 @@ module Pagesenddef wait_for_loaded- expect(page).to have_selector('.op-team-planner--wp-loading-skeleton')+ expect(page).to have_css('.op-team-planner--wp-loading-skeleton')retry_block doraise "Should not be there" if page.has_selector?('.op-team-planner--wp-loading-skeleton')diff --git a/modules/two_factor_authentication/app/models/two_factor_authentication/device.rb b/modules/two_factor_authentication/app/models/two_factor_authentication/device.rbindex 0f234c54c8f..9a8c54ee6ac 100644--- a/modules/two_factor_authentication/app/models/two_factor_authentication/device.rb+++ b/modules/two_factor_authentication/app/models/two_factor_authentication/device.rb@@ -71,7 +71,7 @@ module TwoFactorAuthenticationenddef channel=(value)- super value.to_sym+ super(value.to_sym)enddef channeldiff --git a/modules/two_factor_authentication/app/models/two_factor_authentication/device/totp.rb b/modules/two_factor_authentication/app/models/two_factor_authentication/device/totp.rbindex 94cd8f924ba..8c335727dce 100644--- a/modules/two_factor_authentication/app/models/two_factor_authentication/device/totp.rb+++ b/modules/two_factor_authentication/app/models/two_factor_authentication/device/totp.rb@@ -61,7 +61,7 @@ module TwoFactorAuthenticationenddef totp- @totp ||= ::ROTP::TOTP.new otp_secret, issuer: (Setting.app_title.presence || 'OpenProject')+ @totp ||= ::ROTP::TOTP.new otp_secret, issuer: Setting.app_title.presence || 'OpenProject'endendenddiff --git a/modules/two_factor_authentication/lib/open_project/two_factor_authentication/token_strategy/base.rb b/modules/two_factor_authentication/lib/open_project/two_factor_authentication/token_strategy/base.rbindex 615438bb00e..3f6bff7fa0a 100644--- a/modules/two_factor_authentication/lib/open_project/two_factor_authentication/token_strategy/base.rb+++ b/modules/two_factor_authentication/lib/open_project/two_factor_authentication/token_strategy/base.rb@@ -36,7 +36,7 @@ module OpenProject::TwoFactorAuthentication@token = create_mobile_otpend- send "send_#{channel}"+ send :"send_#{channel}"enddef identifierdiff --git a/modules/two_factor_authentication/lib/open_project/two_factor_authentication/token_strategy/message_bird.rb b/modules/two_factor_authentication/lib/open_project/two_factor_authentication/token_strategy/message_bird.rbindex a4840d225a0..eef8f1387ac 100644--- a/modules/two_factor_authentication/lib/open_project/two_factor_authentication/token_strategy/message_bird.rb+++ b/modules/two_factor_authentication/lib/open_project/two_factor_authentication/token_strategy/message_bird.rb@@ -111,7 +111,7 @@ module OpenProject::TwoFactorAuthentication### Select a matching language from the available languagesdef build_localized_message(params)- locale_key = (user.language.presence || Setting.default_language)+ locale_key = user.language.presence || Setting.default_language# Check if the translation exist or fall back to englishlanguage =diff --git a/modules/two_factor_authentication/spec/controllers/two_factor_authentication/authentication_controller_spec.rb b/modules/two_factor_authentication/spec/controllers/two_factor_authentication/authentication_controller_spec.rbindex 45b439fddf9..a8233f4c85d 100644--- a/modules/two_factor_authentication/spec/controllers/two_factor_authentication/authentication_controller_spec.rb+++ b/modules/two_factor_authentication/spec/controllers/two_factor_authentication/authentication_controller_spec.rb@@ -1,5 +1,5 @@require_relative '../../spec_helper'-require_relative './authentication_controller_shared_examples'+require_relative 'authentication_controller_shared_examples'RSpec.describe TwoFactorAuthentication::AuthenticationController, with_settings: { login_required?: true } dolet(:valid_credentials) dodiff --git a/modules/two_factor_authentication/spec/controllers/two_factor_authentication/forced_registration/two_factor_devices_controller_spec.rb b/modules/two_factor_authentication/spec/controllers/two_factor_authentication/forced_registration/two_factor_devices_controller_spec.rbindex da243fc8bfe..3bdd4bb7c32 100644--- a/modules/two_factor_authentication/spec/controllers/two_factor_authentication/forced_registration/two_factor_devices_controller_spec.rb+++ b/modules/two_factor_authentication/spec/controllers/two_factor_authentication/forced_registration/two_factor_devices_controller_spec.rb@@ -1,5 +1,5 @@require_relative '../../../spec_helper'-require_relative './../authentication_controller_shared_examples'+require_relative '../authentication_controller_shared_examples'RSpec.describe TwoFactorAuthentication::ForcedRegistration::TwoFactorDevicesController dolet(:user) { create(:user, login: 'foobar') }diff --git a/modules/two_factor_authentication/spec/controllers/two_factor_authentication/my/remember_cookie_controller_spec.rb b/modules/two_factor_authentication/spec/controllers/two_factor_authentication/my/remember_cookie_controller_spec.rbindex 2501f3256c9..61ecaf90aa4 100644--- a/modules/two_factor_authentication/spec/controllers/two_factor_authentication/my/remember_cookie_controller_spec.rb+++ b/modules/two_factor_authentication/spec/controllers/two_factor_authentication/my/remember_cookie_controller_spec.rb@@ -1,5 +1,5 @@require_relative '../../../spec_helper'-require_relative './../authentication_controller_shared_examples'+require_relative '../authentication_controller_shared_examples'RSpec.describe TwoFactorAuthentication::My::RememberCookieController dolet(:user) { create(:user, login: 'foobar') }diff --git a/modules/two_factor_authentication/spec/controllers/two_factor_authentication/my/two_factor_devices_controller_spec.rb b/modules/two_factor_authentication/spec/controllers/two_factor_authentication/my/two_factor_devices_controller_spec.rbindex 09b463c8d99..7eb1064e14f 100644--- a/modules/two_factor_authentication/spec/controllers/two_factor_authentication/my/two_factor_devices_controller_spec.rb+++ b/modules/two_factor_authentication/spec/controllers/two_factor_authentication/my/two_factor_devices_controller_spec.rb@@ -1,5 +1,5 @@require_relative '../../../spec_helper'-require_relative './../authentication_controller_shared_examples'+require_relative '../authentication_controller_shared_examples'RSpec.describe TwoFactorAuthentication::My::TwoFactorDevicesController dolet(:user) { create(:user, login: 'foobar') }diff --git a/modules/two_factor_authentication/spec/controllers/two_factor_authentication/users/two_factor_devices_controller_spec.rb b/modules/two_factor_authentication/spec/controllers/two_factor_authentication/users/two_factor_devices_controller_spec.rbindex abca0305a7d..6f61cf1cf84 100644--- a/modules/two_factor_authentication/spec/controllers/two_factor_authentication/users/two_factor_devices_controller_spec.rb+++ b/modules/two_factor_authentication/spec/controllers/two_factor_authentication/users/two_factor_devices_controller_spec.rb@@ -1,5 +1,5 @@require_relative '../../../spec_helper'-require_relative './../authentication_controller_shared_examples'+require_relative '../authentication_controller_shared_examples'RSpec.describe TwoFactorAuthentication::Users::TwoFactorDevicesController dolet(:admin) { create(:admin) }diff --git a/modules/two_factor_authentication/spec/features/account_activation_spec.rb b/modules/two_factor_authentication/spec/features/account_activation_spec.rbindex 6d29e707592..c89014c1a97 100644--- a/modules/two_factor_authentication/spec/features/account_activation_spec.rb+++ b/modules/two_factor_authentication/spec/features/account_activation_spec.rb@@ -1,8 +1,7 @@require_relative '../spec_helper'-require_relative './shared_2fa_examples'+require_relative 'shared_2fa_examples'-RSpec.describe 'activating an invited account',- js: true,+RSpec.describe 'activating an invited account', :js,with_settings: {plugin_openproject_two_factor_authentication: { 'active_strategies' => [:developer] }} do@@ -33,7 +32,7 @@ RSpec.describe 'activating an invited account',activate!visit my_account_path- expect(page).to have_selector('.form--field-container', text: user.login)+ expect(page).to have_css('.form--field-container', text: user.login)endend@@ -51,20 +50,20 @@ RSpec.describe 'activating an invited account',activate!- expect(page).to have_selector('.op-toast.-success', text: 'Developer strategy generated the following one-time password:')+ expect(page).to have_css('.op-toast.-success', text: 'Developer strategy generated the following one-time password:')SeleniumHubWaiter.waitfill_in I18n.t(:field_otp), with: sms_tokenclick_button I18n.t(:button_login)visit my_account_path- expect(page).to have_selector('.form--field-container', text: user.login)+ expect(page).to have_css('.form--field-container', text: user.login)endit 'handles faulty user input on two factor authentication' doactivate!- expect(page).to have_selector('.op-toast.-success', text: 'Developer strategy generated the following one-time password:')+ expect(page).to have_css('.op-toast.-success', text: 'Developer strategy generated the following one-time password:')fill_in I18n.t(:field_otp), with: 'asdf' # faulty tokenclick_button I18n.t(:button_login)diff --git a/modules/two_factor_authentication/spec/features/admin_edit_two_factor_devices_spec.rb b/modules/two_factor_authentication/spec/features/admin_edit_two_factor_devices_spec.rbindex 5ea672922a0..205aa53ded8 100644--- a/modules/two_factor_authentication/spec/features/admin_edit_two_factor_devices_spec.rb+++ b/modules/two_factor_authentication/spec/features/admin_edit_two_factor_devices_spec.rb@@ -1,9 +1,8 @@require_relative '../spec_helper'-RSpec.describe 'Admin 2FA management',- js: true, with_settings: {- plugin_openproject_two_factor_authentication: { 'active_strategies' => %i[developer totp] }- } do+RSpec.describe 'Admin 2FA management', :js, with_settings: {+ plugin_openproject_two_factor_authentication: { 'active_strategies' => %i[developer totp] }+} dolet(:dialog) { Components::PasswordConfirmationDialog.new }let(:user_password) { 'admin!' * 4 }let(:other_user) { create(:user, login: 'bob') }@@ -19,12 +18,12 @@ RSpec.describe 'Admin 2FA management',it 'forbids the admin editing his own account' dovisit edit_user_path(admin, tab: :two_factor_authentication)- expect(page).to have_selector('.on-off-status.-disabled')+ expect(page).to have_css('.on-off-status.-disabled')- expect(page).not_to have_selector('.generic-table--empty-row', wait: 1)+ expect(page).to have_no_css('.generic-table--empty-row', wait: 1)page.find('.admin--edit-section a').click- expect(page).to have_selector('.generic-table--empty-row')+ expect(page).to have_css('.generic-table--empty-row')expect(page).to have_current_path my_2fa_devices_pathend@@ -32,9 +31,9 @@ RSpec.describe 'Admin 2FA management',visit edit_user_path(other_user, tab: :two_factor_authentication)# Visit empty index- expect(page).to have_selector('.generic-table--empty-row',- text: I18n.t('two_factor_authentication.admin.no_devices_for_user'))- expect(page).to have_selector('.on-off-status.-disabled')+ expect(page).to have_css('.generic-table--empty-row',+ text: I18n.t('two_factor_authentication.admin.no_devices_for_user'))+ expect(page).to have_css('.on-off-status.-disabled')# Visit inline createfind('.button', text: I18n.t('two_factor_authentication.admin.button_register_mobile_phone_for_user')).click@@ -45,23 +44,23 @@ RSpec.describe 'Admin 2FA management',click_button I18n.t(:button_continue)# Enter valid phone number- expect(page).to have_selector('#errorExplanation', text: 'Phone number must be of format +XX XXXXXXXXX')+ expect(page).to have_css('#errorExplanation', text: 'Phone number must be of format +XX XXXXXXXXX')SeleniumHubWaiter.waitfill_in 'device_phone_number', with: '+49 123456789'click_button I18n.t(:button_continue)- expect(page).to have_selector('.mobile-otp--two-factor-device-row td', text: 'Mobile phone (bob) (+49 123456789)')- expect(page).to have_selector('.mobile-otp--two-factor-device-row td .icon-yes', count: 2)- expect(page).to have_selector('.on-off-status.-enabled')+ expect(page).to have_css('.mobile-otp--two-factor-device-row td', text: 'Mobile phone (bob) (+49 123456789)')+ expect(page).to have_css('.mobile-otp--two-factor-device-row td .icon-yes', count: 2)+ expect(page).to have_css('.on-off-status.-enabled')SeleniumHubWaiter.wait# Delete the onefind('.two-factor--delete-button').clickdialog.confirm_flow_with user_password, should_fail: false- expect(page).to have_selector('.mobile-otp--two-factor-device-row', count: 0)- expect(page).to have_selector('.on-off-status.-disabled')+ expect(page).to have_css('.mobile-otp--two-factor-device-row', count: 0)+ expect(page).to have_css('.on-off-status.-disabled')expect(other_user.otp_devices.count).to eq 0end@@ -71,15 +70,15 @@ RSpec.describe 'Admin 2FA management',it 'allows to delete all' dovisit edit_user_path(other_user, tab: :two_factor_authentication)- expect(page).to have_selector('.mobile-otp--two-factor-device-row', count: 2)- expect(page).to have_selector('.on-off-status.-enabled')+ expect(page).to have_css('.mobile-otp--two-factor-device-row', count: 2)+ expect(page).to have_css('.on-off-status.-enabled')find('.button', text: I18n.t('two_factor_authentication.admin.button_delete_all_devices')).clickpage.driver.browser.switch_to.alert.accept- expect(page).to have_selector('.generic-table--empty-row',- text: I18n.t('two_factor_authentication.admin.no_devices_for_user'), wait: 20)- expect(page).to have_selector('.on-off-status.-disabled')+ expect(page).to have_css('.generic-table--empty-row',+ text: I18n.t('two_factor_authentication.admin.no_devices_for_user'), wait: 20)+ expect(page).to have_css('.on-off-status.-disabled')endendenddiff --git a/modules/two_factor_authentication/spec/features/backup_codes/generate_backup_codes_spec.rb b/modules/two_factor_authentication/spec/features/backup_codes/generate_backup_codes_spec.rbindex 5e6465c1b94..d0941661608 100644--- a/modules/two_factor_authentication/spec/features/backup_codes/generate_backup_codes_spec.rb+++ b/modules/two_factor_authentication/spec/features/backup_codes/generate_backup_codes_spec.rb@@ -1,7 +1,7 @@require_relative '../../spec_helper'require_relative '../shared_2fa_examples'-RSpec.describe 'Generate 2FA backup codes', js: true, with_config: { '2fa': { active_strategies: [:developer] } } do+RSpec.describe 'Generate 2FA backup codes', :js, with_config: { '2fa': { active_strategies: [:developer] } } dolet(:user_password) { 'bob!' * 4 }let(:user) docreate(:user,@@ -27,18 +27,18 @@ RSpec.describe 'Generate 2FA backup codes', js: true, with_config: { '2fa': { acend# Confirm with wrong password- expect(page).to have_selector('h2', text: I18n.t('two_factor_authentication.backup_codes.plural'))+ expect(page).to have_css('h2', text: I18n.t('two_factor_authentication.backup_codes.plural'))click_on I18n.t('two_factor_authentication.backup_codes.generate.title')dialog.confirm_flow_with 'wrong_password', should_fail: true# Confirm with correct password- expect(page).to have_selector('h2', text: I18n.t('two_factor_authentication.backup_codes.plural'))+ expect(page).to have_css('h2', text: I18n.t('two_factor_authentication.backup_codes.plural'))click_on I18n.t('two_factor_authentication.backup_codes.generate.title')dialog.confirm_flow_with user_password, should_fail: false- expect(page).to have_selector('.op-toast.-warning')+ expect(page).to have_css('.op-toast.-warning')backup_codes.each do |code|- expect(page).to have_selector('.two-factor-authentication--backup-codes li', text: code)+ expect(page).to have_css('.two-factor-authentication--backup-codes li', text: code)endendenddiff --git a/modules/two_factor_authentication/spec/features/backup_codes/login_with_backup_code_spec.rb b/modules/two_factor_authentication/spec/features/backup_codes/login_with_backup_code_spec.rbindex f11c4f69a4e..8fb4295fbd2 100644--- a/modules/two_factor_authentication/spec/features/backup_codes/login_with_backup_code_spec.rb+++ b/modules/two_factor_authentication/spec/features/backup_codes/login_with_backup_code_spec.rb@@ -1,7 +1,7 @@require_relative '../../spec_helper'require_relative '../shared_2fa_examples'-RSpec.describe 'Login with 2FA backup code', js: true, with_settings: {+RSpec.describe 'Login with 2FA backup code', :js, with_settings: {plugin_openproject_two_factor_authentication: { 'active_strategies' => [:developer] }} dolet(:user_password) { 'bob!' * 4 }@@ -19,7 +19,7 @@ RSpec.describe 'Login with 2FA backup code', js: true, with_settings: {# Open other optionsfind_by_id('toggle_resend_form').click- expect(page).not_to have_selector('a', text: I18n.t('two_factor_authentication.backup_codes.enter_backup_code_title'))+ expect(page).to have_no_css('a', text: I18n.t('two_factor_authentication.backup_codes.enter_backup_code_title'))endend@@ -31,7 +31,7 @@ RSpec.describe 'Login with 2FA backup code', js: true, with_settings: {first_login_step- expect(page).to have_selector('#toggle_resend_form', wait: 10)+ expect(page).to have_css('#toggle_resend_form', wait: 10)# Wait for the frontend to be loaded and initialized# On downstream configurations, this might take longer than marionette selecting the element@@ -44,13 +44,13 @@ RSpec.describe 'Login with 2FA backup code', js: true, with_settings: {SeleniumHubWaiter.waitfind('a', text: I18n.t('two_factor_authentication.login.enter_backup_code_title'), wait: 2).click- expect(page).to have_selector('h2', text: I18n.t('two_factor_authentication.login.enter_backup_code_title'))+ expect(page).to have_css('h2', text: I18n.t('two_factor_authentication.login.enter_backup_code_title'))SeleniumHubWaiter.waitfill_in 'backup_code', with: 'whatever'click_on 'Submit'# Expect failure- expect(page).to have_selector('.op-toast.-error', text: I18n.t('two_factor_authentication.error_invalid_backup_code'))+ expect(page).to have_css('.op-toast.-error', text: I18n.t('two_factor_authentication.error_invalid_backup_code'))expect(page).to have_current_path signin_path# Try again!@@ -60,7 +60,7 @@ RSpec.describe 'Login with 2FA backup code', js: true, with_settings: {SeleniumHubWaiter.waitfind('a', text: I18n.t('two_factor_authentication.login.enter_backup_code_title')).click- expect(page).to have_selector('h2', text: I18n.t('two_factor_authentication.login.enter_backup_code_title'))+ expect(page).to have_css('h2', text: I18n.t('two_factor_authentication.login.enter_backup_code_title'))SeleniumHubWaiter.waitfill_in 'backup_code', with: valid_backup_codes.firstclick_on 'Submit'diff --git a/modules/two_factor_authentication/spec/features/login/login_enforced_2fa_spec.rb b/modules/two_factor_authentication/spec/features/login/login_enforced_2fa_spec.rbindex 3fb00516c0b..d98ce73f099 100644--- a/modules/two_factor_authentication/spec/features/login/login_enforced_2fa_spec.rb+++ b/modules/two_factor_authentication/spec/features/login/login_enforced_2fa_spec.rb@@ -1,13 +1,12 @@require_relative '../../spec_helper'require_relative '../shared_2fa_examples'-RSpec.describe 'Login with enforced 2FA',- js: true, with_settings: {- plugin_openproject_two_factor_authentication: {- 'active_strategies' => [:developer],- 'enforced' => true- }- } do+RSpec.describe 'Login with enforced 2FA', :js, with_settings: {+ plugin_openproject_two_factor_authentication: {+ 'active_strategies' => [:developer],+ 'enforced' => true+ }+} dolet(:user_password) { 'bob!' * 4 }let(:user) docreate(:user,@@ -37,7 +36,7 @@ RSpec.describe 'Login with enforced 2FA',first_login_steptwo_factor_step('whatever')- expect(page).to have_selector('.op-toast.-error', text: I18n.t(:notice_account_otp_invalid))+ expect(page).to have_css('.op-toast.-error', text: I18n.t(:notice_account_otp_invalid))expect(page).to have_current_path signin_pathendenddiff --git a/modules/two_factor_authentication/spec/features/login/login_with_2fa_spec.rb b/modules/two_factor_authentication/spec/features/login/login_with_2fa_spec.rbindex 6740359dc65..14dafa042d5 100644--- a/modules/two_factor_authentication/spec/features/login/login_with_2fa_spec.rb+++ b/modules/two_factor_authentication/spec/features/login/login_with_2fa_spec.rb@@ -1,12 +1,11 @@require_relative '../../spec_helper'require_relative '../shared_2fa_examples'-RSpec.describe 'Login with 2FA device',- js: true, with_settings: {- plugin_openproject_two_factor_authentication: {- 'active_strategies' => [:developer]- }- } do+RSpec.describe 'Login with 2FA device', :js, with_settings: {+ plugin_openproject_two_factor_authentication: {+ 'active_strategies' => [:developer]+ }+} dolet(:user_password) { 'bob!' * 4 }let(:user) docreate(:user,@@ -36,7 +35,7 @@ RSpec.describe 'Login with 2FA device',first_login_steptwo_factor_step('whatever')- expect(page).to have_selector('.op-toast.-error', text: I18n.t(:notice_account_otp_invalid))+ expect(page).to have_css('.op-toast.-error', text: I18n.t(:notice_account_otp_invalid))expect(page).to have_current_path signin_pathendenddiff --git a/modules/two_factor_authentication/spec/features/login/login_without_2fa_spec.rb b/modules/two_factor_authentication/spec/features/login/login_without_2fa_spec.rbindex 6b1acc6851a..b328710607c 100644--- a/modules/two_factor_authentication/spec/features/login/login_without_2fa_spec.rb+++ b/modules/two_factor_authentication/spec/features/login/login_without_2fa_spec.rb@@ -1,7 +1,7 @@require_relative '../../spec_helper'require_relative '../shared_2fa_examples'-RSpec.describe 'Login with no required OTP', js: true, with_config: { '2fa': { active_strategies: [:developer] } } do+RSpec.describe 'Login with no required OTP', :js, with_config: { '2fa': { active_strategies: [:developer] } } dolet(:user_password) { 'bob!' * 4 }let(:user) docreate(:user,diff --git a/modules/two_factor_authentication/spec/features/login/switch_available_devices_spec.rb b/modules/two_factor_authentication/spec/features/login/switch_available_devices_spec.rbindex 98e8a290a62..5b35d5e456e 100644--- a/modules/two_factor_authentication/spec/features/login/switch_available_devices_spec.rb+++ b/modules/two_factor_authentication/spec/features/login/switch_available_devices_spec.rb@@ -1,10 +1,9 @@require_relative '../../spec_helper'require_relative '../shared_2fa_examples'-RSpec.describe 'Login by switching 2FA device',- js: true, with_settings: {- plugin_openproject_two_factor_authentication: { 'active_strategies' => %i[developer totp] }- } do+RSpec.describe 'Login by switching 2FA device', :js, with_settings: {+ plugin_openproject_two_factor_authentication: { 'active_strategies' => %i[developer totp] }+} dolet(:user_password) { 'bob!' * 4 }let(:user) docreate(:user,@@ -20,7 +19,7 @@ RSpec.describe 'Login by switching 2FA device',it 'requests a 2FA and allows switching' dofirst_login_step- expect(page).to have_selector('input#otp')+ expect(page).to have_css('input#otp')SeleniumHubWaiter.wait# Toggle device to TOTP@@ -29,8 +28,8 @@ RSpec.describe 'Login by switching 2FA device',SeleniumHubWaiter.waitfind(".button--link[value='#{device2.redacted_identifier}']").click- expect(page).to have_selector('input#otp')- expect(page).to have_selector('#submit_otp p', text: device2.redacted_identifier)+ expect(page).to have_css('input#otp')+ expect(page).to have_css('#submit_otp p', text: device2.redacted_identifier)two_factor_step(device2.totp.now)expect_logged_indiff --git a/modules/two_factor_authentication/spec/features/my_two_factor_devices_spec.rb b/modules/two_factor_authentication/spec/features/my_two_factor_devices_spec.rbindex 22d240c59ea..bb9dd288611 100644--- a/modules/two_factor_authentication/spec/features/my_two_factor_devices_spec.rb+++ b/modules/two_factor_authentication/spec/features/my_two_factor_devices_spec.rb@@ -1,9 +1,8 @@require_relative '../spec_helper'-RSpec.describe 'My Account 2FA configuration',- js: true, with_settings: {- plugin_openproject_two_factor_authentication: { 'active_strategies' => %i[developer totp] }- } do+RSpec.describe 'My Account 2FA configuration', :js, with_settings: {+ plugin_openproject_two_factor_authentication: { 'active_strategies' => %i[developer totp] }+} dolet(:dialog) { Components::PasswordConfirmationDialog.new }let(:user_password) { 'boB!4' * 4 }let(:user) do@@ -20,12 +19,12 @@ RSpec.describe 'My Account 2FA configuration',it 'allows 2FA device management' do# Visit empty indexvisit my_2fa_devices_path- expect(page).to have_selector('.generic-table--empty-row', text: I18n.t('two_factor_authentication.devices.not_existing'))- expect(page).to have_selector('.on-off-status.-disabled')+ expect(page).to have_css('.generic-table--empty-row', text: I18n.t('two_factor_authentication.devices.not_existing'))+ expect(page).to have_css('.on-off-status.-disabled')# Visit inline createfind('.wp-inline-create--add-link').click- expect(page).to have_selector('h2', text: I18n.t('two_factor_authentication.devices.add_new'))+ expect(page).to have_css('h2', text: I18n.t('two_factor_authentication.devices.add_new'))expect(page).to have_current_path new_my_2fa_device_path# Select SMS@@ -36,7 +35,7 @@ RSpec.describe 'My Account 2FA configuration',click_button I18n.t(:button_continue)# Enter valid phone number- expect(page).to have_selector('#errorExplanation', text: 'Phone number must be of format +XX XXXXXXXXX')+ expect(page).to have_css('#errorExplanation', text: 'Phone number must be of format +XX XXXXXXXXX')fill_in 'device_phone_number', with: '+49 123456789'click_button I18n.t(:button_continue)@@ -54,25 +53,25 @@ RSpec.describe 'My Account 2FA configuration',click_button I18n.t(:button_continue)- expect(page).to have_selector('h2', text: I18n.t('two_factor_authentication.devices.confirm_device'))- expect(page).to have_selector('input#otp')- expect(page).to have_selector('.op-toast.-error',- text: I18n.t('two_factor_authentication.devices.registration_failed_token_invalid'))+ expect(page).to have_css('h2', text: I18n.t('two_factor_authentication.devices.confirm_device'))+ expect(page).to have_css('input#otp')+ expect(page).to have_css('.op-toast.-error',+ text: I18n.t('two_factor_authentication.devices.registration_failed_token_invalid'))# Fill in correct tokenfill_in 'otp', with: sms_tokenclick_button I18n.t(:button_continue)# Assert that it exists and is default- expect(page).to have_selector('.mobile-otp--two-factor-device-row td', text: 'Mobile phone (bob) (+49 123456789)')- expect(page).to have_selector('.mobile-otp--two-factor-device-row td .icon-yes', count: 2)- expect(page).to have_selector('.on-off-status.-enabled')+ expect(page).to have_css('.mobile-otp--two-factor-device-row td', text: 'Mobile phone (bob) (+49 123456789)')+ expect(page).to have_css('.mobile-otp--two-factor-device-row td .icon-yes', count: 2)+ expect(page).to have_css('.on-off-status.-enabled')# Create another one as totp# Visit create buttonvisit my_2fa_devices_pathfind('.toolbar-item .button', text: '2FA device').click- expect(page).to have_selector('h2', text: I18n.t('two_factor_authentication.devices.add_new'))+ expect(page).to have_css('h2', text: I18n.t('two_factor_authentication.devices.add_new'))expect(page).to have_current_path new_my_2fa_device_path, ignore_query: true# Select totp@@ -83,8 +82,8 @@ RSpec.describe 'My Account 2FA configuration',click_button I18n.t(:button_continue)# Confirm token- expect(page).to have_selector('h2', text: I18n.t('two_factor_authentication.devices.confirm_device'))- expect(page).to have_selector('input#otp')+ expect(page).to have_css('h2', text: I18n.t('two_factor_authentication.devices.confirm_device'))+ expect(page).to have_css('input#otp')device = user.otp_devices.order(:id).lastexpect(device.identifier).to eq 'custom identifier'@@ -94,11 +93,11 @@ RSpec.describe 'My Account 2FA configuration',fill_in 'otp', with: device.totp.nowclick_button I18n.t(:button_continue)- expect(page).to have_selector('.mobile-otp--two-factor-device-row', count: 2)+ expect(page).to have_css('.mobile-otp--two-factor-device-row', count: 2)rows = page.all('.mobile-otp--two-factor-device-row')- expect(rows[0]).to have_selector('.mobile-otp--two-factor-device-row td .icon-yes', count: 2)- expect(rows[1]).to have_selector('.mobile-otp--two-factor-device-row td', text: 'custom identifier')- expect(rows[1]).to have_selector('.mobile-otp--two-factor-device-row td .icon-yes', count: 1)+ expect(rows[0]).to have_css('.mobile-otp--two-factor-device-row td .icon-yes', count: 2)+ expect(rows[1]).to have_css('.mobile-otp--two-factor-device-row td', text: 'custom identifier')+ expect(rows[1]).to have_css('.mobile-otp--two-factor-device-row td .icon-yes', count: 1)device.reloadexpect(device.active).to be_truthy@@ -113,10 +112,10 @@ RSpec.describe 'My Account 2FA configuration',find('.two-factor--mark-default-button').clickdialog.confirm_flow_with user_password, should_fail: false- expect(page).to have_selector('.mobile-otp--two-factor-device-row', count: 2)+ expect(page).to have_css('.mobile-otp--two-factor-device-row', count: 2)rows = page.all('.mobile-otp--two-factor-device-row')- expect(rows[0]).to have_selector('.mobile-otp--two-factor-device-row td .icon-yes', count: 1)- expect(rows[1]).to have_selector('.mobile-otp--two-factor-device-row td .icon-yes', count: 2)+ expect(rows[0]).to have_css('.mobile-otp--two-factor-device-row td .icon-yes', count: 1)+ expect(rows[1]).to have_css('.mobile-otp--two-factor-device-row td .icon-yes', count: 2)device.reloadexpect(device.default).to be_truthy@@ -125,16 +124,16 @@ RSpec.describe 'My Account 2FA configuration',rows[0].find('.two-factor--delete-button').clickdialog.confirm_flow_with user_password, should_fail: false- expect(page).to have_selector('.mobile-otp--two-factor-device-row', count: 1)- expect(page).to have_selector('.on-off-status.-enabled')+ expect(page).to have_css('.mobile-otp--two-factor-device-row', count: 1)+ expect(page).to have_css('.on-off-status.-enabled')expect(user.otp_devices.count).to eq 1# Delete the totp devicefind('.two-factor--delete-button').clickdialog.confirm_flow_with user_password, should_fail: false- expect(page).to have_selector('.generic-table--empty-row', text: I18n.t('two_factor_authentication.devices.not_existing'))- expect(page).to have_selector('.on-off-status.-disabled')+ expect(page).to have_css('.generic-table--empty-row', text: I18n.t('two_factor_authentication.devices.not_existing'))+ expect(page).to have_css('.on-off-status.-disabled')expect(user.otp_devices.count).to eq 0enddiff --git a/modules/two_factor_authentication/spec/features/password_change_spec.rb b/modules/two_factor_authentication/spec/features/password_change_spec.rbindex 89a4ccf050d..90a22195cec 100644--- a/modules/two_factor_authentication/spec/features/password_change_spec.rb+++ b/modules/two_factor_authentication/spec/features/password_change_spec.rb@@ -1,11 +1,10 @@require_relative '../spec_helper'-RSpec.describe 'Password change with OTP',- js: true, with_settings: {- plugin_openproject_two_factor_authentication: {- 'active_strategies' => [:developer]- }- } do+RSpec.describe 'Password change with OTP', :js, with_settings: {+ plugin_openproject_two_factor_authentication: {+ 'active_strategies' => [:developer]+ }+} dolet(:user_password) { 'boB&' * 4 }let(:new_user_password) { '%obB' * 4 }let(:user) do@@ -32,7 +31,7 @@ RSpec.describe 'Password change with OTP',end# rubocop:enable RSpec/AnyInstance- expect(page).to have_selector('h2', text: I18n.t(:button_change_password))+ expect(page).to have_css('h2', text: I18n.t(:button_change_password))within('#content') doSeleniumHubWaiter.waitfill_in('password', with: user_password)@@ -42,7 +41,7 @@ RSpec.describe 'Password change with OTP',endif requires_otp- expect(page).to have_selector('input#otp')+ expect(page).to have_css('input#otp')SeleniumHubWaiter.waitfill_in 'otp', with: sms_tokenclick_button I18n.t(:button_login)diff --git a/modules/two_factor_authentication/spec/features/remember_cookie/login_with_remember_cookie_spec.rb b/modules/two_factor_authentication/spec/features/remember_cookie/login_with_remember_cookie_spec.rbindex 01e2e270ffe..af0ce3b0e71 100644--- a/modules/two_factor_authentication/spec/features/remember_cookie/login_with_remember_cookie_spec.rb+++ b/modules/two_factor_authentication/spec/features/remember_cookie/login_with_remember_cookie_spec.rb@@ -1,13 +1,12 @@require_relative '../../spec_helper'require_relative '../shared_2fa_examples'-RSpec.describe 'Login with 2FA remember cookie',- js: true, with_settings: {- plugin_openproject_two_factor_authentication: {- active_strategies: [:developer],- allow_remember_for_days: 30- }- } do+RSpec.describe 'Login with 2FA remember cookie', :js, with_settings: {+ plugin_openproject_two_factor_authentication: {+ active_strategies: [:developer],+ allow_remember_for_days: 30+ }+} dolet(:user_password) do"user!user!"end@@ -27,7 +26,7 @@ RSpec.describe 'Login with 2FA remember cookie',first_login_step- expect(page).to have_selector('input#remember_me')+ expect(page).to have_css('input#remember_me')SeleniumHubWaiter.waitcheck 'remember_me'@@ -38,7 +37,7 @@ RSpec.describe 'Login with 2FA remember cookie',def expect_no_autologinfirst_login_step- expect(page).to have_selector('input#otp')+ expect(page).to have_css('input#otp')expect_not_logged_inend@@ -51,7 +50,7 @@ RSpec.describe 'Login with 2FA remember cookie',} doit 'does not show the save form' dofirst_login_step- expect(page).not_to have_selector('input#remember_me')+ expect(page).to have_no_css('input#remember_me')endend@@ -61,8 +60,8 @@ RSpec.describe 'Login with 2FA remember cookie',visit my_2fa_devices_pathfind('.two-factor-authentication--remove-remember-cookie-link').click- expect(page).to have_selector('.op-toast.-success')- expect(page).not_to have_selector('.two-factor-authentication--remove-remember-cookie-link')+ expect(page).to have_css('.op-toast.-success')+ expect(page).to have_no_css('.two-factor-authentication--remove-remember-cookie-link')# Log out and in againvisit '/logout'diff --git a/modules/two_factor_authentication/spec/features/shared_2fa_examples.rb b/modules/two_factor_authentication/spec/features/shared_2fa_examples.rbindex d28ff83ca27..998043be12e 100644--- a/modules/two_factor_authentication/spec/features/shared_2fa_examples.rb+++ b/modules/two_factor_authentication/spec/features/shared_2fa_examples.rb@@ -9,7 +9,7 @@ def first_login_stependdef two_factor_step(token)- expect(page).to have_selector('input#otp')+ expect(page).to have_css('input#otp')SeleniumHubWaiter.waitfill_in 'otp', with: tokenclick_button I18n.t(:button_login)@@ -18,12 +18,12 @@ enddef expect_logged_invisit my_account_pathSeleniumHubWaiter.wait- expect(page).to have_selector('.form--field-container', text: user.login)+ expect(page).to have_css('.form--field-container', text: user.login)enddef expect_not_logged_invisit my_account_path- expect(page).not_to have_selector('.form--field-container', text: user.login)+ expect(page).to have_no_css('.form--field-container', text: user.login)endRSpec.shared_examples 'login without 2FA' do@@ -35,8 +35,8 @@ endRSpec.shared_examples 'create enforced sms device' doit do- expect(page).to have_selector('.op-toast.-info',- text: I18n.t('two_factor_authentication.forced_registration.required_to_add_device'))+ expect(page).to have_css('.op-toast.-info',+ text: I18n.t('two_factor_authentication.forced_registration.required_to_add_device'))SeleniumHubWaiter.wait# Create SMS device@@ -46,15 +46,15 @@ RSpec.shared_examples 'create enforced sms device' doclick_on 'Continue'# Expect error on invalid phone- expect(page).to have_selector('#errorExplanation', text: 'Phone number must be of format +XX XXXXXXXXX')+ expect(page).to have_css('#errorExplanation', text: 'Phone number must be of format +XX XXXXXXXXX')SeleniumHubWaiter.waitfill_in 'device_phone_number', with: '+49 123456789'click_on 'Continue'# Confirm page- expect(page).to have_selector('h2', text: I18n.t('two_factor_authentication.devices.confirm_device'))- expect(page).to have_selector('input#otp')+ expect(page).to have_css('h2', text: I18n.t('two_factor_authentication.devices.confirm_device'))+ expect(page).to have_css('input#otp')SeleniumHubWaiter.wait# Fill in wrong token@@ -69,10 +69,10 @@ RSpec.shared_examples 'create enforced sms device' doclick_button I18n.t(:button_continue)- expect(page).to have_selector('h2', text: I18n.t('two_factor_authentication.devices.confirm_device'))- expect(page).to have_selector('input#otp')- expect(page).to have_selector('.op-toast.-error',- text: I18n.t('two_factor_authentication.devices.registration_failed_token_invalid'))+ expect(page).to have_css('h2', text: I18n.t('two_factor_authentication.devices.confirm_device'))+ expect(page).to have_css('input#otp')+ expect(page).to have_css('.op-toast.-error',+ text: I18n.t('two_factor_authentication.devices.registration_failed_token_invalid'))SeleniumHubWaiter.wait# Fill in wrong tokendiff --git a/modules/two_factor_authentication/spec/models/login_token_spec.rb b/modules/two_factor_authentication/spec/models/login_token_spec.rbindex a13e74cb045..558d85fb31e 100644--- a/modules/two_factor_authentication/spec/models/login_token_spec.rb+++ b/modules/two_factor_authentication/spec/models/login_token_spec.rb@@ -1,6 +1,6 @@require_relative '../spec_helper'-RSpec.describe TwoFactorAuthentication::LoginToken, with_2fa_ee: true do+RSpec.describe TwoFactorAuthentication::LoginToken, :with_2fa_ee doshared_let(:user) { create(:user) }let!(:token) { described_class.new user: }diff --git a/modules/webhooks/spec/components/webhooks/outgoing/deliveries/table_component_spec.rb b/modules/webhooks/spec/components/webhooks/outgoing/deliveries/table_component_spec.rbindex 79c9bf3d785..d463d231b71 100644--- a/modules/webhooks/spec/components/webhooks/outgoing/deliveries/table_component_spec.rb+++ b/modules/webhooks/spec/components/webhooks/outgoing/deliveries/table_component_spec.rb@@ -43,7 +43,7 @@ RSpec.describe Webhooks::Outgoing::Deliveries::TableComponent, type: :componentresponse_headers_node = page.find('pre.webhooks--response-headers')aggregate_failures do- expect(response_headers_node).not_to have_selector('b', text: 'evil')+ expect(response_headers_node).to have_no_css('b', text: 'evil')expect(response_headers_node.text).to include(header_name)expect(response_headers_node.text).to include(header_value)enddiff --git a/modules/webhooks/spec/features/manage_webhooks_spec.rb b/modules/webhooks/spec/features/manage_webhooks_spec.rbindex 679686f9aa1..4fe0679c5b5 100644--- a/modules/webhooks/spec/features/manage_webhooks_spec.rb+++ b/modules/webhooks/spec/features/manage_webhooks_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Manage webhooks through UI', js: true do+RSpec.describe 'Manage webhooks through UI', :js dobefore dologin_as userend@@ -20,7 +20,7 @@ RSpec.describe 'Manage webhooks through UI', js: true doit 'allows the management flow' dovisit admin_outgoing_webhooks_path- expect(page).to have_selector('.generic-table--empty-row')+ expect(page).to have_css('.generic-table--empty-row')# Visit inline createfind('.wp-inline-create--add-link').click@@ -40,16 +40,16 @@ RSpec.describe 'Manage webhooks through UI', js: true do# 1st webhook created#- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_create))- expect(page).to have_selector('.webhooks--outgoing-webhook-row .name', text: 'My webhook')+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_successful_create))+ expect(page).to have_css('.webhooks--outgoing-webhook-row .name', text: 'My webhook')webhook = Webhooks::Webhook.lastexpect(webhook.event_names).to eq %w(work_package:created)expect(webhook.all_projects).to be_truthy- expect(page).to have_selector('.webhooks--outgoing-webhook-row .enabled .icon-yes')- expect(page).to have_selector('.webhooks--outgoing-webhook-row .selected_projects', text: '(all)')- expect(page).to have_selector('.webhooks--outgoing-webhook-row .events', text: 'Work packages')- expect(page).to have_selector('.webhooks--outgoing-webhook-row .description', text: webhook.description)+ expect(page).to have_css('.webhooks--outgoing-webhook-row .enabled .icon-yes')+ expect(page).to have_css('.webhooks--outgoing-webhook-row .selected_projects', text: '(all)')+ expect(page).to have_css('.webhooks--outgoing-webhook-row .events', text: 'Work packages')+ expect(page).to have_css('.webhooks--outgoing-webhook-row .description', text: webhook.description)SeleniumHubWaiter.wait# Edit this webhook@@ -65,8 +65,8 @@ RSpec.describe 'Manage webhooks through UI', js: true dofind(".webhooks--selected-project-ids[value='#{project.id}']").set trueclick_on 'Save'- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_update))- expect(page).to have_selector('.webhooks--outgoing-webhook-row .name', text: 'My webhook')+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_successful_update))+ expect(page).to have_css('.webhooks--outgoing-webhook-row .name', text: 'My webhook')webhook = Webhooks::Webhook.lastexpect(webhook.event_names).to eq %w(work_package:updated)expect(webhook.projects.all).to eq [project]@@ -77,8 +77,8 @@ RSpec.describe 'Manage webhooks through UI', js: true dofind(".webhooks--outgoing-webhook-row-#{webhook.id} .icon-delete").clickpage.driver.browser.switch_to.alert.accept- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_delete))- expect(page).to have_selector('.generic-table--empty-row')+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_successful_delete))+ expect(page).to have_css('.generic-table--empty-row')endcontext 'with existing webhook' do@@ -90,17 +90,17 @@ RSpec.describe 'Manage webhooks through UI', js: true doSeleniumHubWaiter.waitfind('.webhooks--outgoing-webhook-row .name a', text: 'testing').click- expect(page).to have_selector('.on-off-status.-enabled')- expect(page).to have_selector('td.event_name', text: 'foo')- expect(page).to have_selector('td.response_code', text: '200')+ expect(page).to have_css('.on-off-status.-enabled')+ expect(page).to have_css('td.event_name', text: 'foo')+ expect(page).to have_css('td.response_code', text: '200')# Open modalSeleniumHubWaiter.waitfind('td.response_body a', text: 'Show').clickpage.within('.spot-modal') do- expect(page).to have_selector('.webhooks--response-headers strong', text: 'test')- expect(page).to have_selector('.webhooks--response-body', text: log.response_body)+ expect(page).to have_css('.webhooks--response-headers strong', text: 'test')+ expect(page).to have_css('.webhooks--response-body', text: log.response_body)endend@@ -123,7 +123,7 @@ RSpec.describe 'Manage webhooks through UI', js: true doendpage.within('.spot-modal') do- expect(page).to have_selector('.webhooks--response-body', text: matching_log.response_body)+ expect(page).to have_css('.webhooks--response-body', text: matching_log.response_body)click_button('Close')endenddiff --git a/modules/webhooks/spec/workers/attachment_webhook_job_spec.rb b/modules/webhooks/spec/workers/attachment_webhook_job_spec.rbindex 0a5e1c3c6c8..5ab63be0d1b 100644--- a/modules/webhooks/spec/workers/attachment_webhook_job_spec.rb+++ b/modules/webhooks/spec/workers/attachment_webhook_job_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe AttachmentWebhookJob, type: :job, webmock: true do+RSpec.describe AttachmentWebhookJob, :webmock, type: :job doshared_let(:user) { create(:admin) }shared_let(:request_url) { "http://example.net/test/42" }shared_let(:project) { create(:project, name: 'Foo Bar') }diff --git a/modules/webhooks/spec/workers/project_webhook_job_spec.rb b/modules/webhooks/spec/workers/project_webhook_job_spec.rbindex beece23b1ec..1b1c8eada27 100644--- a/modules/webhooks/spec/workers/project_webhook_job_spec.rb+++ b/modules/webhooks/spec/workers/project_webhook_job_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe ProjectWebhookJob, type: :job, webmock: true do+RSpec.describe ProjectWebhookJob, :webmock, type: :job doshared_let(:user) { create(:admin) }shared_let(:request_url) { "http://example.net/test/42" }shared_let(:project) { create(:project, name: 'Foo Bar') }diff --git a/modules/webhooks/spec/workers/time_entry_webhook_job_spec.rb b/modules/webhooks/spec/workers/time_entry_webhook_job_spec.rbindex 94089fe208d..6f82a98e39a 100644--- a/modules/webhooks/spec/workers/time_entry_webhook_job_spec.rb+++ b/modules/webhooks/spec/workers/time_entry_webhook_job_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe TimeEntryWebhookJob, type: :job, webmock: true do+RSpec.describe TimeEntryWebhookJob, :webmock, type: :job doshared_let(:user) { create(:admin) }shared_let(:request_url) { "http://example.net/test/42" }shared_let(:time_entry) { create(:time_entry, hours: 10) }diff --git a/modules/webhooks/spec/workers/work_package_webhook_job_spec.rb b/modules/webhooks/spec/workers/work_package_webhook_job_spec.rbindex 58263c47110..260bd650950 100644--- a/modules/webhooks/spec/workers/work_package_webhook_job_spec.rb+++ b/modules/webhooks/spec/workers/work_package_webhook_job_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe WorkPackageWebhookJob, type: :model, webmock: true do+RSpec.describe WorkPackageWebhookJob, :webmock, type: :model doshared_let(:user) { create(:admin) }shared_let(:title) { "Some workpackage subject" }shared_let(:request_url) { "http://example.net/test/42" }diff --git a/script/github_pr_errors b/script/github_pr_errorsindex b9d0d94bc23..b6480c37ec6 100755--- a/script/github_pr_errors+++ b/script/github_pr_errors@@ -200,7 +200,7 @@ enddef path_to_cache_key(path)path.gsub(/\?.*$/, '') # remove query parameter- .gsub(/^#{GITHUB_API_OPENPROJECT_PREFIX}\/?/, '') # remove https://.../+ .gsub(/^#{GITHUB_API_OPENPROJECT_PREFIX}\/?/o, '') # remove https://.../.gsub(/\W/, '_') # transform non alphanum charsenddiff --git a/spec/components/activities/item_component_spec.rb b/spec/components/activities/item_component_spec.rbindex 4a9d738e653..140b31cdf6f 100644--- a/spec/components/activities/item_component_spec.rb+++ b/spec/components/activities/item_component_spec.rb@@ -99,7 +99,7 @@ RSpec.describe Activities::ItemComponent, type: :component dorender_inline(component)expect(component.project_suffix).to be_nil- expect(page).not_to have_css('.op-activity-list--item-title', text: '(Project: My project)')+ expect(page).to have_no_css('.op-activity-list--item-title', text: '(Project: My project)')endit 'adds "(Subproject: ...)" suffix for activities of subprojects of the current project' do@@ -118,7 +118,7 @@ RSpec.describe Activities::ItemComponent, type: :component doallow(event.journal).to receive(:details).and_return(i_do_not_have_a_formatter_associated: ['old', 'new'])render_inline(described_class.new(event:))- expect(page).not_to have_css('.op-activity-list--item-detail')+ expect(page).to have_no_css('.op-activity-list--item-detail')endenddiff --git a/spec/components/attribute_groups/attribute_key_value_component_spec.rb b/spec/components/attribute_groups/attribute_key_value_component_spec.rbindex 1c3557c785e..dfa482ee538 100644--- a/spec/components/attribute_groups/attribute_key_value_component_spec.rb+++ b/spec/components/attribute_groups/attribute_key_value_component_spec.rb@@ -41,7 +41,7 @@ RSpec.describe AttributeGroups::AttributeKeyValueComponent, type: :component doit "preserve html in the value if it's a safe string" dorender_inline(described_class.new(key: 'Attribute Key', value: '<div>Some value</div>'.html_safe))- expect(page).not_to have_css('.attributes-key-value--value.-text', text: "<div>Some value</div>")+ expect(page).to have_no_css('.attributes-key-value--value.-text', text: "<div>Some value</div>")expect(page).to have_css('.attributes-key-value--value.-text', text: "Some value")enddiff --git a/spec/components/settings/time_zone_setting_component_spec.rb b/spec/components/settings/time_zone_setting_component_spec.rbindex 9b43165bd5f..230102be93f 100644--- a/spec/components/settings/time_zone_setting_component_spec.rb+++ b/spec/components/settings/time_zone_setting_component_spec.rb@@ -36,9 +36,9 @@ RSpec.describe Settings::TimeZoneSettingComponent, type: :component doit "renders the timezones as options, grouping cities with the same identifier" dosubject- expect(page).to have_selector("option[value=\"America/Los_Angeles\"]",- text: "(UTC-08:00) Pacific Time (US & Canada)")- expect(page).to have_selector("option[value=\"Europe/Berlin\"]", text: "(UTC+01:00) Berlin, Copenhagen, Stockholm")- expect(page).to have_selector("option[value=\"Asia/Shanghai\"]", text: "(UTC+08:00) Beijing, Chongqing")+ expect(page).to have_css("option[value=\"America/Los_Angeles\"]",+ text: "(UTC-08:00) Pacific Time (US & Canada)")+ expect(page).to have_css("option[value=\"Europe/Berlin\"]", text: "(UTC+01:00) Berlin, Copenhagen, Stockholm")+ expect(page).to have_css("option[value=\"Asia/Shanghai\"]", text: "(UTC+08:00) Beijing, Chongqing")endenddiff --git a/spec/constants/settings/definition_spec.rb b/spec/constants/settings/definition_spec.rbindex 769bd6dc066..d43f4499b7b 100644--- a/spec/constants/settings/definition_spec.rb+++ b/spec/constants/settings/definition_spec.rb@@ -368,12 +368,12 @@ RSpec.describe Settings::Definition, :settings_reset doendend- it 'will not handle ENV vars for which no definition exists',+ it 'does not handle ENV vars for which no definition exists',with_env: { 'OPENPROJECT_BOGUS' => '1234' } doexpect(all[:bogus]).to be_nilend- it 'will handle ENV vars for definitions added after #all was called (e.g. in a module)',+ it 'handles ENV vars for definitions added after #all was called (e.g. in a module)',with_env: { 'OPENPROJECT_BOGUS' => '1' } dodescribed_class.add(:bogus, default: 0)expect(all[:bogus].value).to eq 1@@ -485,7 +485,6 @@ RSpec.describe Settings::Definition, :settings_reset docontext 'when overwritten from ENV',with_env: { 'OPENPROJECT_SENDMAIL__LOCATION' => 'env location' } do-it 'overrides from ENV' doreset(:sendmail_location)expect(all[:sendmail_location].value).to eql 'env location'diff --git a/spec/contracts/messages/create_contract_spec.rb b/spec/contracts/messages/create_contract_spec.rbindex 8345fe6dd95..77cce4ab669 100644--- a/spec/contracts/messages/create_contract_spec.rb+++ b/spec/contracts/messages/create_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_contract_examples'+require_relative 'shared_contract_examples'RSpec.describe Messages::CreateContract doit_behaves_like 'message contract' dodiff --git a/spec/contracts/messages/update_contract_spec.rb b/spec/contracts/messages/update_contract_spec.rbindex c9293a92bdf..1cb7557c3b2 100644--- a/spec/contracts/messages/update_contract_spec.rb+++ b/spec/contracts/messages/update_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_contract_examples'+require_relative 'shared_contract_examples'RSpec.describe Messages::UpdateContract doit_behaves_like 'message contract' dodiff --git a/spec/contracts/projects/update_contract_spec.rb b/spec/contracts/projects/update_contract_spec.rbindex 64aad7c0228..5e427df6e41 100644--- a/spec/contracts/projects/update_contract_spec.rb+++ b/spec/contracts/projects/update_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_contract_examples'+require_relative 'shared_contract_examples'RSpec.describe Projects::UpdateContract doit_behaves_like 'project contract' dodiff --git a/spec/contracts/versions/create_contract_spec.rb b/spec/contracts/versions/create_contract_spec.rbindex 26f949b89e0..b06af305095 100644--- a/spec/contracts/versions/create_contract_spec.rb+++ b/spec/contracts/versions/create_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_contract_examples'+require_relative 'shared_contract_examples'RSpec.describe Versions::CreateContract doit_behaves_like 'version contract' dodiff --git a/spec/contracts/versions/update_contract_spec.rb b/spec/contracts/versions/update_contract_spec.rbindex 87b29807855..a80ab2a32fe 100644--- a/spec/contracts/versions/update_contract_spec.rb+++ b/spec/contracts/versions/update_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_contract_examples'+require_relative 'shared_contract_examples'RSpec.describe Versions::UpdateContract doit_behaves_like 'version contract' dodiff --git a/spec/contracts/views/create_contract_work_packages_table_spec.rb b/spec/contracts/views/create_contract_work_packages_table_spec.rbindex a1cc0ec0d5d..05167c53fb1 100644--- a/spec/contracts/views/create_contract_work_packages_table_spec.rb+++ b/spec/contracts/views/create_contract_work_packages_table_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_contract_examples'+require_relative 'shared_contract_examples'RSpec.describe Views::CreateContract doit_behaves_like 'view contract' dodiff --git a/spec/contracts/views/update_contract_spec.rb b/spec/contracts/views/update_contract_spec.rbindex ff7bd42db51..613203a5e23 100644--- a/spec/contracts/views/update_contract_spec.rb+++ b/spec/contracts/views/update_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_contract_examples'+require_relative 'shared_contract_examples'RSpec.describe Views::UpdateContract do# TODO: this is just a stub to ensure that the type is not altereddiff --git a/spec/contracts/wiki_pages/create_contract_spec.rb b/spec/contracts/wiki_pages/create_contract_spec.rbindex df617bc18c8..a24d078eae4 100644--- a/spec/contracts/wiki_pages/create_contract_spec.rb+++ b/spec/contracts/wiki_pages/create_contract_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_contract_examples'+require_relative 'shared_contract_examples'RSpec.describe WikiPages::CreateContract doit_behaves_like 'wiki page contract' dodiff --git a/spec/contracts/work_packages/create_note_contract_spec.rb b/spec/contracts/work_packages/create_note_contract_spec.rbindex dbe0d7a6c86..67270182fe8 100644--- a/spec/contracts/work_packages/create_note_contract_spec.rb+++ b/spec/contracts/work_packages/create_note_contract_spec.rb@@ -73,7 +73,7 @@ RSpec.describe WorkPackages::CreateNoteContract doit 'is invalid' doexpect(contract.errors.symbols_for(:journal_notes))- .to match_array([:error_unauthorized])+ .to contain_exactly(:error_unauthorized)endendend@@ -89,7 +89,7 @@ RSpec.describe WorkPackages::CreateNoteContract doit 'is invalid' doexpect(contract.errors.symbols_for(:subject))- .to match_array([:error_readonly])+ .to contain_exactly(:error_readonly)endendenddiff --git a/spec/contracts/work_packages/shared_base_contract.rb b/spec/contracts/work_packages/shared_base_contract.rbindex 1fd08b2e205..2decb41b412 100644--- a/spec/contracts/work_packages/shared_base_contract.rb+++ b/spec/contracts/work_packages/shared_base_contract.rb@@ -83,7 +83,7 @@ RSpec.shared_examples_for 'work package contract' doit 'is not a valid assignee' doerror = I18n.t('api_v3.errors.validation.invalid_user_assigned_to_work_package',property: I18n.t('attributes.assignee'))- expect(validated_contract.errors[:assigned_to]).to match_array [error]+ expect(validated_contract.errors[:assigned_to]).to contain_exactly(error)endend@@ -109,7 +109,7 @@ RSpec.shared_examples_for 'work package contract' doit 'is not a valid responsible' doerror = I18n.t('api_v3.errors.validation.invalid_user_assigned_to_work_package',property: I18n.t('attributes.responsible'))- expect(validated_contract.errors[:responsible]).to match_array [error]+ expect(validated_contract.errors[:responsible]).to contain_exactly(error)endenddiff --git a/spec/controllers/account_controller_spec.rb b/spec/controllers/account_controller_spec.rbindex 4450464cea9..0d7b01e0e75 100644--- a/spec/controllers/account_controller_spec.rb+++ b/spec/controllers/account_controller_spec.rb@@ -30,8 +30,7 @@require 'spec_helper'-RSpec.describe AccountController,- skip_2fa_stage: true do+RSpec.describe AccountController, :skip_2fa_stage dolet(:user_hook_class) doClass.new(OpenProject::Hook::ViewListener) doattr_reader :registered_user, :first_login_user@@ -340,7 +339,7 @@ RSpec.describe AccountController,endcontext 'with no provider' do- it 'will redirect to default' do+ it 'redirects to default' doget :logoutexpect(response).to redirect_to home_pathend@@ -357,7 +356,7 @@ RSpec.describe AccountController,context 'with direct login and redirecting callback',with_config: { omniauth_direct_login_provider: 'foo' }, with_settings: { login_required?: true } do- it 'will still call the callback' do+ it 'stills call the callback' do# Set the previous sessionsession[:foo] = 'bar'@@ -369,7 +368,7 @@ RSpec.describe AccountController,endend- it 'will call the callback' do+ it 'calls the callback' do# Set the previous sessionsession[:foo] = 'bar'@@ -382,7 +381,7 @@ RSpec.describe AccountController,endcontext 'with a no-op callback' do- it 'will redirect to default if the callback does nothing' do+ it 'redirects to default if the callback does nothing' dowas_called = falsesso_provider[:single_sign_out_callback] = Proc.new dowas_called = true@@ -397,7 +396,7 @@ RSpec.describe AccountController,context 'with a provider that does not have slo_callback' dolet(:slo_callback) { nil }- it 'will redirect to default if the callback does nothing' do+ it 'redirects to default if the callback does nothing' doget :logoutexpect(response).to redirect_to home_pathenddiff --git a/spec/controllers/admin/settings/projects_settings_controller_spec.rb b/spec/controllers/admin/settings/projects_settings_controller_spec.rbindex a9df157a7a7..3149f313b69 100644--- a/spec/controllers/admin/settings/projects_settings_controller_spec.rb+++ b/spec/controllers/admin/settings/projects_settings_controller_spec.rb@@ -45,7 +45,7 @@ RSpec.describe Admin::Settings::ProjectsSettingsController doexpect(response).to be_successfulexpect(response).to render_template 'admin/settings/projects_settings/show'- expect(response.body).to have_selector "input[@name='settings[default_projects_modules][]'][@value='activity']"+ expect(response.body).to have_css "input[@name='settings[default_projects_modules][]'][@value='activity']"endcontext 'without activated activity module' do@@ -59,7 +59,7 @@ RSpec.describe Admin::Settings::ProjectsSettingsController doexpect(response).to be_successfulexpect(response).to render_template 'admin/settings/projects_settings/show'- expect(response.body).not_to have_selector "input[@name='settings[default_projects_modules][]'][@value='activity'][@checked='checked']"+ expect(response.body).to have_no_css "input[@name='settings[default_projects_modules][]'][@value='activity'][@checked='checked']"endend@@ -74,7 +74,7 @@ RSpec.describe Admin::Settings::ProjectsSettingsController doexpect(response).to be_successfulexpect(response).to render_template 'admin/settings/projects_settings/show'- expect(response.body).to have_selector "input[@name='settings[default_projects_modules][]'][@value='activity'][@checked='checked']"+ expect(response.body).to have_css "input[@name='settings[default_projects_modules][]'][@value='activity'][@checked='checked']"endendenddiff --git a/spec/controllers/admin_controller_spec.rb b/spec/controllers/admin_controller_spec.rbindex be8fd95e3e9..05807d28a85 100644--- a/spec/controllers/admin_controller_spec.rb+++ b/spec/controllers/admin_controller_spec.rb@@ -70,7 +70,7 @@ RSpec.describe AdminController dolet(:visible) { true }it "shows the plugin in the overview" do- expect(response.body).to have_selector('a.menu-block', text: plugin_name.capitalize)+ expect(response.body).to have_css('a.menu-block', text: plugin_name.capitalize)endend@@ -79,7 +79,7 @@ RSpec.describe AdminController dolet(:visible) { false }it "does not show the plugin in the overview" do- expect(response.body).not_to have_selector('a.menu-block', text: plugin_name.capitalize)+ expect(response.body).to have_no_css('a.menu-block', text: plugin_name.capitalize)endendend@@ -90,8 +90,10 @@ RSpec.describe AdminController docontext 'with plugins' dobefore do- Redmine::Plugin.register :foo do end- Redmine::Plugin.register :bar do end+ Redmine::Plugin.register :foo do+ end+ Redmine::Plugin.register :bar do+ endendit 'renders the plugins' do@@ -100,8 +102,8 @@ RSpec.describe AdminController doexpect(response).to be_successfulexpect(response).to render_template 'plugins'- expect(response.body).to have_selector('td span', text: 'Foo')- expect(response.body).to have_selector('td span', text: 'Bar')+ expect(response.body).to have_css('td span', text: 'Foo')+ expect(response.body).to have_css('td span', text: 'Bar')endenddiff --git a/spec/controllers/announcements_controller_spec.rb b/spec/controllers/announcements_controller_spec.rbindex f679e07b967..2a28c91619e 100644--- a/spec/controllers/announcements_controller_spec.rb+++ b/spec/controllers/announcements_controller_spec.rb@@ -15,7 +15,10 @@ RSpec.describe AnnouncementsController doget :editend- it do expect(assigns(:announcement)).to eql announcement end+ it do+ expect(assigns(:announcement)).to eql announcement+ end+it { expect(response).to be_successful }enddiff --git a/spec/controllers/concerns/auth_source_sso_spec.rb b/spec/controllers/concerns/auth_source_sso_spec.rbindex 4fccf8a0e00..7842976bbc4 100644--- a/spec/controllers/concerns/auth_source_sso_spec.rb+++ b/spec/controllers/concerns/auth_source_sso_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe MyController,- skip_2fa_stage: true do+RSpec.describe MyController, :skip_2fa_stage dorender_viewslet(:sso_config) dodiff --git a/spec/controllers/concerns/omniauth_login_spec.rb b/spec/controllers/concerns/omniauth_login_spec.rbindex 8a2c6dfe01e..de630119e77 100644--- a/spec/controllers/concerns/omniauth_login_spec.rb+++ b/spec/controllers/concerns/omniauth_login_spec.rb@@ -29,8 +29,7 @@require 'spec_helper'# Concern is included into AccountController and depends on methods available there-RSpec.describe AccountController,- skip_2fa_stage: true do+RSpec.describe AccountController, :skip_2fa_stage dolet(:omniauth_strategy) { double('Google Strategy', name: 'google') }let(:omniauth_hash) doOmniAuth::AuthHash.new(diff --git a/spec/controllers/custom_styles_controller_spec.rb b/spec/controllers/custom_styles_controller_spec.rbindex 61baf2a6b8a..fec0579a1b8 100644--- a/spec/controllers/custom_styles_controller_spec.rb+++ b/spec/controllers/custom_styles_controller_spec.rb@@ -170,7 +170,7 @@ RSpec.describe CustomStylesController docontext "when logo is present" dolet(:custom_style) { build(:custom_style_with_logo) }- it 'will send a file' do+ it 'sends a file' doexpect(response).to have_http_status(:ok)endend@@ -231,7 +231,7 @@ RSpec.describe CustomStylesController docontext "when export logo is present" dolet(:custom_style) { build(:custom_style_with_export_logo) }- it 'will send a file' do+ it 'sends a file' doexpect(response).to have_http_status(:ok)endend@@ -292,7 +292,7 @@ RSpec.describe CustomStylesController docontext "when export cover is present" dolet(:custom_style) { build(:custom_style_with_export_cover) }- it 'will send a file' do+ it 'sends a file' doexpect(response).to have_http_status(:ok)endend@@ -353,7 +353,7 @@ RSpec.describe CustomStylesController docontext "when favicon is present" dolet(:custom_style) { build(:custom_style_with_favicon) }- it 'will send a file' do+ it 'sends a file' doexpect(response).to have_http_status(:ok)endend@@ -414,7 +414,7 @@ RSpec.describe CustomStylesController docontext "when touch icon is present" dolet(:custom_style) { build(:custom_style_with_touch_icon) }- it 'will send a file' do+ it 'sends a file' doexpect(response).to have_http_status(:ok)endend@@ -528,7 +528,7 @@ RSpec.describe CustomStylesController dopost :update_export_cover_text_color, params:end- it 'it is created' do+ it 'is created' doexpect(response).to redirect_to action: :showendend@@ -596,7 +596,7 @@ RSpec.describe CustomStylesController docontext "when logo is present" dolet(:custom_style) { build(:custom_style_with_logo) }- it 'will send a file' do+ it 'sends a file' doexpect(response).to have_http_status(:ok)endenddiff --git a/spec/controllers/enterprises_controller_spec.rb b/spec/controllers/enterprises_controller_spec.rbindex 7183bd84eda..9abf16a2bed 100644--- a/spec/controllers/enterprises_controller_spec.rb+++ b/spec/controllers/enterprises_controller_spec.rb@@ -119,7 +119,7 @@ RSpec.describe EnterprisesController doit 'still renders #show with form' doexpect(response).not_to render_template partial: 'enterprises/_current'- expect(response.body).to have_selector '.upsale-benefits'+ expect(response.body).to have_css '.upsale-benefits'endendenddiff --git a/spec/controllers/forums_controller_spec.rb b/spec/controllers/forums_controller_spec.rbindex 8e5353d6a3e..ee6ffff79be 100644--- a/spec/controllers/forums_controller_spec.rb+++ b/spec/controllers/forums_controller_spec.rb@@ -64,7 +64,6 @@ RSpec.describe ForumsController doendend-context 'when login_required', with_settings: { login_required: true } doit 'redirects to login' doget :index, params: { project_id: 'not found' }@@ -89,7 +88,6 @@ RSpec.describe ForumsController doendend-context 'when login_required', with_settings: { login_required: true } doit 'redirects to login' doget :show, params: { project_id: project.id, id: 1 }@@ -159,7 +157,7 @@ RSpec.describe ForumsController doendend- describe '#destroy', with_settings: { login_required: false } do+ describe '#destroy', with_settings: { login_required: false } dolet(:forum_params) { { name: 'my forum', description: 'awesome forum' } }before do@@ -170,7 +168,7 @@ RSpec.describe ForumsController doendend- it 'will request destruction and redirect' do+ it 'requests destruction and redirect' doexpect(forum).to receive(:destroy)delete :destroy, params: { project_id: project.id, id: 1 }expect(response).to be_redirect@@ -194,7 +192,7 @@ RSpec.describe ForumsController doallow(@controller).to receive(:authorize).and_return(true)end- describe '#higher', with_settings: { login_required: false } do+ describe '#higher', with_settings: { login_required: false } dolet(:move_to) { 'higher' }before do@@ -203,9 +201,13 @@ RSpec.describe ForumsController doforum: { move_to: } }end- it do expect(forum_2.reload.position).to eq(1) end+ it do+ expect(forum_2.reload.position).to eq(1)+ end- it do expect(response).to be_redirect end+ it do+ expect(response).to be_redirect+ endit doexpect(response)diff --git a/spec/controllers/homescreen_controller_spec.rb b/spec/controllers/homescreen_controller_spec.rbindex 4d4f1924f44..10486c02a9f 100644--- a/spec/controllers/homescreen_controller_spec.rb+++ b/spec/controllers/homescreen_controller_spec.rb@@ -102,8 +102,8 @@ RSpec.describe HomescreenController doendit 'renders the text' do- expect(response.body).to have_selector('[data-test-selector="op-widget-box--header"]',- text: 'Woohoo!')+ expect(response.body).to have_css('[data-test-selector="op-widget-box--header"]',+ text: 'Woohoo!')endendenddiff --git a/spec/controllers/messages_controller_spec.rb b/spec/controllers/messages_controller_spec.rbindex 267ecc97348..ed13eef02ec 100644--- a/spec/controllers/messages_controller_spec.rb+++ b/spec/controllers/messages_controller_spec.rb@@ -54,7 +54,6 @@ RSpec.describe MessagesController, with_settings: { journal_aggregation_time_minlet(:project) { create(:public_project) }let!(:message) { create(:message, forum:) }-context 'when login_required', with_settings: { login_required: true } doit 'redirects to login' doget :show, params: { project_id: project.id, id: message.id }diff --git a/spec/controllers/my_controller_spec.rb b/spec/controllers/my_controller_spec.rbindex be410305c80..004a5a49a35 100644--- a/spec/controllers/my_controller_spec.rb+++ b/spec/controllers/my_controller_spec.rb@@ -149,7 +149,7 @@ RSpec.describe MyController doendit "renders the 'Change password' menu entry" do- expect(response.body).to have_selector('#menu-sidebar li a', text: 'Change password')+ expect(response.body).to have_css('#menu-sidebar li a', text: 'Change password')endendend@@ -210,7 +210,7 @@ RSpec.describe MyController dorender_viewsit 'renders auto hide popups checkbox' do- expect(response.body).to have_selector('#my_account_form #pref_auto_hide_popups')+ expect(response.body).to have_css('#my_account_form #pref_auto_hide_popups')endend@@ -236,7 +236,7 @@ RSpec.describe MyController dorender_viewsit "does not render 'Change password' menu entry" do- expect(response.body).not_to have_selector('#menu-sidebar li a', text: 'Change password')+ expect(response.body).to have_no_css('#menu-sidebar li a', text: 'Change password')endend@@ -356,7 +356,7 @@ RSpec.describe MyController doit 'list the tokens' doget :access_token- expect(response.body).to have_selector("#storage-oauth-token-#{token.id}")+ expect(response.body).to have_css("#storage-oauth-token-#{token.id}")endit 'can remove the token' dodiff --git a/spec/controllers/news_controller_spec.rb b/spec/controllers/news_controller_spec.rbindex 0cb0e214c1e..f0ea7a49c2f 100644--- a/spec/controllers/news_controller_spec.rb+++ b/spec/controllers/news_controller_spec.rb@@ -70,7 +70,7 @@ RSpec.describe NewsController doexpect(response).to be_successfulexpect(response).to render_template 'show'- expect(response.body).to have_selector('h2', text: news.title)+ expect(response.body).to have_css('h2', text: news.title)endit 'renders show with slug' do@@ -79,7 +79,7 @@ RSpec.describe NewsController doexpect(response).to be_successfulexpect(response).to render_template 'show'- expect(response.body).to have_selector('h2', text: news.title)+ expect(response.body).to have_css('h2', text: news.title)endit 'renders error if news item is not found' do@@ -138,7 +138,7 @@ RSpec.describe NewsController doexpect(assigns(:news)).not_to be_nilexpect(assigns(:news)).to be_new_record- expect(response.body).to have_selector('div.op-toast.-error', text: /1 error/)+ expect(response.body).to have_css('div.op-toast.-error', text: /1 error/)endenddiff --git a/spec/controllers/projects_settings_menu_controller_spec.rb b/spec/controllers/projects_settings_menu_controller_spec.rbindex 4db024c3d74..380e4acc2e5 100644--- a/spec/controllers/projects_settings_menu_controller_spec.rb+++ b/spec/controllers/projects_settings_menu_controller_spec.rb@@ -67,7 +67,7 @@ RSpec.describe Projects::Settings::ModulesController, 'menu' doit doget('show', params:)- expect(response.body).not_to have_selector selector+ expect(response.body).to have_no_selector selectorendenddiff --git a/spec/controllers/repositories_controller_spec.rb b/spec/controllers/repositories_controller_spec.rbindex af0670bf6c6..2961d05f479 100644--- a/spec/controllers/repositories_controller_spec.rb+++ b/spec/controllers/repositories_controller_spec.rb@@ -165,7 +165,7 @@ RSpec.describe RepositoriesController docontext 'requested by an authorized user' dolet(:role) docreate(:project_role, permissions: %i[browse_repository- view_commit_author_statistics])+ view_commit_author_statistics])endit 'is successful' do@@ -222,7 +222,7 @@ RSpec.describe RepositoriesController dodescribe 'requested by a user with view_commit_author_statistics permission' dolet(:role) docreate(:project_role, permissions: %i[browse_repository- view_commit_author_statistics])+ view_commit_author_statistics])endit 'show the commits per author graph' do@@ -242,7 +242,7 @@ RSpec.describe RepositoriesController doshared_examples 'renders the repository title' do |active_breadcrumb|it doexpect(response).to be_successful- expect(response.body).to have_selector('.repository-breadcrumbs', text: active_breadcrumb)+ expect(response.body).to have_css('.repository-breadcrumbs', text: active_breadcrumb)endend@@ -311,7 +311,7 @@ RSpec.describe RepositoriesController doexpect(response.code).to eq('200')expect(response).to render_template partial: 'repositories/_checkout_instructions'- expect(response.body).to have_selector("#repository-checkout-url[value='#{expected_path}']")+ expect(response.body).to have_css("#repository-checkout-url[value='#{expected_path}']")endendenddiff --git a/spec/controllers/sys_controller_spec.rb b/spec/controllers/sys_controller_spec.rbindex cf95adbbb9d..47bbff6619e 100644--- a/spec/controllers/sys_controller_spec.rb+++ b/spec/controllers/sys_controller_spec.rb@@ -519,7 +519,7 @@ RSpec.describe SysController, with_settings: { sys_api_enabled: true } doit 'uses cache' doallow(Rails.cache).to receive(:fetch).and_call_original- expect(Rails.cache).to receive(:fetch).with(cache_key, expires_in: cache_expiry) \+ expect(Rails.cache).to receive(:fetch).with(cache_key, expires_in: cache_expiry).and_return(Marshal.dump(valid_user.id.to_s))controller.send(:cached_user_login, valid_user.login, valid_user_password)end@@ -635,7 +635,7 @@ RSpec.describe SysController, with_settings: { sys_api_enabled: true } docontext 'storage never updated before' doit 'updates the storage' do- expect(repository.required_storage_bytes).to be == 0+ expect(repository.required_storage_bytes).to eq 0request_storageexpect(response.code).to eq('200')diff --git a/spec/controllers/types_controller_spec.rb b/spec/controllers/types_controller_spec.rbindex 771619ccda7..89121aae9f3 100644--- a/spec/controllers/types_controller_spec.rb+++ b/spec/controllers/types_controller_spec.rb@@ -217,8 +217,8 @@ RSpec.describe TypesController doit { expect(response).to be_successful }it { expect(response).to render_template 'edit' }it { expect(response).to render_template 'types/form/_settings' }- it { expect(response.body).to have_selector "input[@name='type[name]'][@value='My type']" }- it { expect(response.body).to have_selector "input[@name='type[is_milestone]'][@value='1'][@checked='checked']" }+ it { expect(response.body).to have_css "input[@name='type[name]'][@value='My type']" }+ it { expect(response.body).to have_css "input[@name='type[is_milestone]'][@value='1'][@checked='checked']" }enddescribe 'GET edit projects' do@@ -238,7 +238,7 @@ RSpec.describe TypesController doit { expect(response).to render_template 'types/form/_projects' }it {- expect(response.body).to have_selector "input[@name='type[project_ids][]'][@value='#{project.id}'][@checked='checked']"+ expect(response.body).to have_css "input[@name='type[project_ids][]'][@value='#{project.id}'][@checked='checked']"}enddiff --git a/spec/controllers/wiki_controller_spec.rb b/spec/controllers/wiki_controller_spec.rbindex 2a4c8d9436f..43ece7d6c8c 100644--- a/spec/controllers/wiki_controller_spec.rb+++ b/spec/controllers/wiki_controller_spec.rb@@ -1034,7 +1034,7 @@ RSpec.describe WikiController doget 'show', params: { id: @other_wiki_menu_item.name, project_id: project.id }expect(response).to be_successful- expect(response.body).to have_selector('.main-menu--children a.selected', count: 0)+ expect(response.body).to have_css('.main-menu--children a.selected', count: 0)assert_select "#main-menu a.#{@wiki_menu_item.menu_identifier}-menu-item"assert_select "#main-menu a.#{@wiki_menu_item.menu_identifier}-menu-item.selected", false@@ -1073,7 +1073,7 @@ RSpec.describe WikiController doget 'show', params: { id: child_page.slug, project_id: project.id }expect(response).to be_successful- expect(response.body).to have_selector('#main-menu a.selected', count: 1)+ expect(response.body).to have_css('#main-menu a.selected', count: 1)assert_select "#main-menu a.#{@wiki_menu_item.menu_identifier}-menu-item.selected"enddiff --git a/spec/controllers/work_packages/moves_controller_spec.rb b/spec/controllers/work_packages/moves_controller_spec.rbindex 3539fe9e0cc..b748baf3320 100644--- a/spec/controllers/work_packages/moves_controller_spec.rb+++ b/spec/controllers/work_packages/moves_controller_spec.rb@@ -481,8 +481,8 @@ RSpec.describe WorkPackages::MovesController, with_settings: { journal_aggregatiendit 'reports the one child work package' do- expect(response.body).to have_selector "a.work_package", count: 2- expect(response.body).to have_selector ".contextual-info", text: '(+ One descendant work package)'+ expect(response.body).to have_css "a.work_package", count: 2+ expect(response.body).to have_css ".contextual-info", text: '(+ One descendant work package)'endenddiff --git a/spec/factories/custom_style_factory.rb b/spec/factories/custom_style_factory.rbindex e58d6ef6c4d..79835c67d15 100644--- a/spec/factories/custom_style_factory.rb+++ b/spec/factories/custom_style_factory.rb@@ -32,7 +32,7 @@ FactoryBot.define dofactory :custom_style_with_logo, class: 'CustomStyle' dologo doRack::Test::UploadedFile.new(- Rails.root.join('spec', 'support', 'custom_styles', 'logos', 'logo_image.png')+ Rails.root.join("spec/support/custom_styles/logos/logo_image.png"))endend@@ -56,7 +56,7 @@ FactoryBot.define dofactory :custom_style_with_favicon, class: 'CustomStyle' dofavicon doRack::Test::UploadedFile.new(- Rails.root.join('spec', 'support', 'custom_styles', 'favicons', 'favicon_image.png')+ Rails.root.join("spec/support/custom_styles/favicons/favicon_image.png"))endend@@ -64,7 +64,7 @@ FactoryBot.define dofactory :custom_style_with_touch_icon, class: 'CustomStyle' dotouch_icon doRack::Test::UploadedFile.new(- Rails.root.join('spec', 'support', 'custom_styles', 'touch_icons', 'touch_icon_image.png')+ Rails.root.join("spec/support/custom_styles/touch_icons/touch_icon_image.png"))endenddiff --git a/spec/factories/file_factory.rb b/spec/factories/file_factory.rbindex fc7766cec11..120afd45e3f 100644--- a/spec/factories/file_factory.rb+++ b/spec/factories/file_factory.rb@@ -37,7 +37,7 @@ FactoryBot.define doname { 'textfile.txt' }initialize_with do- new "#{Rails.root}/spec/fixtures/files/#{name}"+ new "#{Rails.root.join("spec/fixtures/files/#{name}")}"endenddiff --git a/spec/factories/ldap_auth_source_factory.rb b/spec/factories/ldap_auth_source_factory.rbindex 829a529f32c..ff93571f7f8 100644--- a/spec/factories/ldap_auth_source_factory.rb+++ b/spec/factories/ldap_auth_source_factory.rb@@ -30,7 +30,7 @@ FactoryBot.define dofactory :ldap_auth_source, class: 'LdapAuthSource' doname { 'Test LDAP LdapAuthSource' }host { '127.0.0.1' }- port { 225 } # a reserved port, should not be in use+ port { 225 } # a reserved port, should not be in useattr_login { 'uid' }tls_mode { 'plain_ldap' }base_dn { 'dc=example,dc=com' }diff --git a/spec/factories/type_factory.rb b/spec/factories/type_factory.rbindex 9126ed24f03..86966a33217 100644--- a/spec/factories/type_factory.rb+++ b/spec/factories/type_factory.rb@@ -50,7 +50,7 @@ FactoryBot.define doquery.add_filter(evaluator.relation_filter.to_s, '=', [Queries::Filters::TemplatedValue::KEY])query.savet.attribute_groups = t.default_attribute_groups + [["Embedded table for #{evaluator.relation_filter}",- ["query_#{query.id}".to_sym]]]+ [:"query_#{query.id}"]]]endendenddiff --git a/spec/features/a11y/work_packages/work_package_query_spec.rb b/spec/features/a11y/work_packages/work_package_query_spec.rbindex 28da53c53e9..df2d0403e1c 100644--- a/spec/features/a11y/work_packages/work_package_query_spec.rb+++ b/spec/features/a11y/work_packages/work_package_query_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'features/work_packages/work_packages_page'-RSpec.describe 'Work package index accessibility', selenium: true do+RSpec.describe 'Work package index accessibility', :selenium dolet(:user) { create(:admin) }let(:project) { create(:project) }let(:work_package) { create(:work_package, project:) }@@ -51,7 +51,7 @@ RSpec.describe 'Work package index accessibility', selenium: true dowork_packages_page.ensure_loadedend- describe 'Sort link', js: true do+ describe 'Sort link', :js dobefore { visit_index_page }def click_sort_ascending_link@@ -153,7 +153,7 @@ RSpec.describe 'Work package index accessibility', selenium: true doendend- describe 'hotkeys', js: true do+ describe 'hotkeys', :js dolet!(:another_work_package) docreate(:work_package,project:)@@ -172,8 +172,8 @@ RSpec.describe 'Work package index accessibility', selenium: true doendit 'navigates with J and K' do- expect(page).to have_selector(".wp-row-#{work_package.id}")- expect(page).to have_selector(".wp-row-#{another_work_package.id}")+ expect(page).to have_css(".wp-row-#{work_package.id}")+ expect(page).to have_css(".wp-row-#{another_work_package.id}")find('body').native.send_keys('j')expect(page).to have_focus_on(first_row_selector)@@ -218,14 +218,14 @@ RSpec.describe 'Work package index accessibility', selenium: true doelement = find(target_link)element.native.send_keys(:escape)- expect(page).not_to have_selector(target_link)+ expect(page).to have_no_selector(target_link)# Expect reset focus on originating elementexpect(page).to have_focus_on(source_link) if sets_focusendend- describe 'work package context menu', js: true do+ describe 'work package context menu', :js doit_behaves_like 'context menu' dolet(:target_link) { '#work-package-context-menu a.detailsViewMenuItem' }let(:source_link) { '.work-package-table--container tr.issue td.id a' }diff --git a/spec/features/activities/activity_page_navigation_spec.rb b/spec/features/activities/activity_page_navigation_spec.rbindex 16fef42a400..34d34d6375b 100644--- a/spec/features/activities/activity_page_navigation_spec.rb+++ b/spec/features/activities/activity_page_navigation_spec.rb@@ -82,7 +82,7 @@ RSpec.describe 'Activity page navigation', :js, :with_cuprite do# Still on the same page. Filters applied. subproject work package created# 45 days ago should not be visible anymoreexpect(page)- .not_to have_link(text: /#{subproject_older_work_package.subject}/)+ .to have_no_link(text: /#{subproject_older_work_package.subject}/)endshared_examples 'subprojects checkbox state is preserved' do@@ -113,7 +113,7 @@ RSpec.describe 'Activity page navigation', :js, :with_cuprite do.to have_link(text: /#{project_work_package.subject}/)# work packages for subproject is not visible anymoreexpect(page)- .not_to have_link(text: /#{subproject_work_package.subject}/)+ .to have_no_link(text: /#{subproject_work_package.subject}/)endclick_link('Previous')@@ -126,7 +126,7 @@ RSpec.describe 'Activity page navigation', :js, :with_cuprite do# work packages for subproject still not visibleexpect(page)- .not_to have_link(text: /#{subproject_older_work_package.subject}/)+ .to have_no_link(text: /#{subproject_older_work_package.subject}/)endclick_link('Next')@@ -139,7 +139,7 @@ RSpec.describe 'Activity page navigation', :js, :with_cuprite do# work packages for subproject still not visibleexpect(page)- .not_to have_link(text: /#{subproject_work_package.subject}/)+ .to have_no_link(text: /#{subproject_work_package.subject}/)endendenddiff --git a/spec/features/activities/disabled_activity_spec.rb b/spec/features/activities/disabled_activity_spec.rbindex 8b4f058cd93..0b7943fc10b 100644--- a/spec/features/activities/disabled_activity_spec.rb+++ b/spec/features/activities/disabled_activity_spec.rb@@ -72,14 +72,14 @@ RSpec.describe 'Disabled activity', :js, :with_cuprite do# Not displayed as activity is disabledexpect(page)- .not_to have_content(work_package1.subject)+ .to have_no_content(work_package1.subject)expect(page)- .not_to have_content(wiki_page1.title)+ .to have_no_content(wiki_page1.title)# Not displayed as all modules except activity are disabledexpect(page)- .not_to have_content(work_package3.subject)+ .to have_no_content(work_package3.subject)expect(page)- .not_to have_content(wiki_page3.title)+ .to have_no_content(wiki_page3.title)endenddiff --git a/spec/features/activities/project_attributes_activity_spec.rb b/spec/features/activities/project_attributes_activity_spec.rbindex 0b179bd13e0..c7fbd4f2054 100644--- a/spec/features/activities/project_attributes_activity_spec.rb+++ b/spec/features/activities/project_attributes_activity_spec.rb@@ -88,29 +88,29 @@ RSpec.describe 'Project attributes activity', :js, :with_cuprite do.to have_link("Project: #{project.name}")# own fields- expect(page).to have_selector('li', text: "Name changed from #{previous_project_attributes['name']} to #{project.name}")- expect(page).to have_selector('li', text: 'Description set (Details)')- expect(page).to have_selector('li', text: "Project status set to On track")- expect(page).to have_selector('li', text: 'Project status description set (Details)')- expect(page).to have_selector('li', text: 'Visibility set to public')- expect(page).to have_selector('li', text: "No longer subproject of #{parent_project.name}")- expect(page).to have_selector('li', text: 'Project unarchived')- expect(page).to have_selector('li', text: "Identifier changed from #{previous_project_attributes['identifier']} " \- "to #{project.identifier}")- expect(page).to have_selector('li', text: 'Project marked as template')+ expect(page).to have_css('li', text: "Name changed from #{previous_project_attributes['name']} to #{project.name}")+ expect(page).to have_css('li', text: 'Description set (Details)')+ expect(page).to have_css('li', text: "Project status set to On track")+ expect(page).to have_css('li', text: 'Project status description set (Details)')+ expect(page).to have_css('li', text: 'Visibility set to public')+ expect(page).to have_css('li', text: "No longer subproject of #{parent_project.name}")+ expect(page).to have_css('li', text: 'Project unarchived')+ expect(page).to have_css('li', text: "Identifier changed from #{previous_project_attributes['identifier']} " \+ "to #{project.identifier}")+ expect(page).to have_css('li', text: 'Project marked as template')# custom fields- expect(page).to have_selector('li', text: "#{list_project_custom_field.name} " \- "set to #{project.send(list_project_custom_field.attribute_getter)}")- expect(page).to have_selector('li', text: "#{version_project_custom_field.name} " \- "set to #{old_version.name}, #{next_version.name}")- expect(page).to have_selector('li', text: "#{bool_project_custom_field.name} set to Yes")- expect(page).to have_selector('li', text: "#{user_project_custom_field.name} set to #{current_user.name}")- expect(page).to have_selector('li', text: "#{int_project_custom_field.name} set to 42")- expect(page).to have_selector('li', text: "#{float_project_custom_field.name} set to 3.14159")- expect(page).to have_selector('li', text: "#{text_project_custom_field.name} set to\na new text CF value")- expect(page).to have_selector('li', text: "#{string_project_custom_field.name} set to a new string CF value")- expect(page).to have_selector('li', text: "#{date_project_custom_field.name} set to 01/31/2023")+ expect(page).to have_css('li', text: "#{list_project_custom_field.name} " \+ "set to #{project.send(list_project_custom_field.attribute_getter)}")+ expect(page).to have_css('li', text: "#{version_project_custom_field.name} " \+ "set to #{old_version.name}, #{next_version.name}")+ expect(page).to have_css('li', text: "#{bool_project_custom_field.name} set to Yes")+ expect(page).to have_css('li', text: "#{user_project_custom_field.name} set to #{current_user.name}")+ expect(page).to have_css('li', text: "#{int_project_custom_field.name} set to 42")+ expect(page).to have_css('li', text: "#{float_project_custom_field.name} set to 3.14159")+ expect(page).to have_css('li', text: "#{text_project_custom_field.name} set to\na new text CF value")+ expect(page).to have_css('li', text: "#{string_project_custom_field.name} set to a new string CF value")+ expect(page).to have_css('li', text: "#{date_project_custom_field.name} set to 01/31/2023")endendenddiff --git a/spec/features/activities/time_entry_activity_spec.rb b/spec/features/activities/time_entry_activity_spec.rbindex afe21f566d2..77d1f8425b2 100644--- a/spec/features/activities/time_entry_activity_spec.rb+++ b/spec/features/activities/time_entry_activity_spec.rb@@ -72,7 +72,7 @@ RSpec.describe 'TimeEntry activity',within("li.op-activity-list--item", match: :first) doexpect(page).to have_link("#{project.types.first} ##{work_package.id}: #{work_package.subject}")- expect(page).to have_selector('li', text: "Spent time: 5 hours")+ expect(page).to have_css('li', text: "Spent time: 5 hours")expect(page).to have_link('Details')click_link('Details')end@@ -103,13 +103,13 @@ RSpec.describe 'TimeEntry activity',within("li.op-activity-list--item", match: :first) doexpect(page).to have_link("#{project.types.first} ##{work_package2.id}: #{work_package2.subject}")- expect(page).to have_selector('li', text: "Logged for #{user2.name}")- expect(page).to have_selector('li', text: "Work package changed from #{work_package.name} to #{work_package2.name}")- expect(page).to have_selector('li', text: "Spent time changed from 5 hours to 1 hour")- expect(page).to have_selector('li', text: "Comment changed from #{old_comments} to #{time_entry.comments}")- expect(page).to have_selector('li',- text: "Activity changed from #{time_entry_activity.name} to #{time_entry_activity2.name}")- expect(page).to have_selector('li', text: "Date changed from #{old_spent_on} to #{time_entry.spent_on}")+ expect(page).to have_css('li', text: "Logged for #{user2.name}")+ expect(page).to have_css('li', text: "Work package changed from #{work_package.name} to #{work_package2.name}")+ expect(page).to have_css('li', text: "Spent time changed from 5 hours to 1 hour")+ expect(page).to have_css('li', text: "Comment changed from #{old_comments} to #{time_entry.comments}")+ expect(page).to have_css('li',+ text: "Activity changed from #{time_entry_activity.name} to #{time_entry_activity2.name}")+ expect(page).to have_css('li', text: "Date changed from #{old_spent_on} to #{time_entry.spent_on}")click_link('Details')enddiff --git a/spec/features/activities/wiki_activity_spec.rb b/spec/features/activities/wiki_activity_spec.rbindex 3923ae1fac2..8c31a0fddbb 100644--- a/spec/features/activities/wiki_activity_spec.rb+++ b/spec/features/activities/wiki_activity_spec.rb@@ -81,7 +81,7 @@ RSpec.describe 'Wiki Activity', :js, :with_cuprite dowithin("li.op-activity-list--item", match: :first) doexpect(page)- .to have_selector('li', text: "Text changed (Details)")+ .to have_css('li', text: "Text changed (Details)")expect(page).to have_link('Details')end@@ -103,6 +103,6 @@ RSpec.describe 'Wiki Activity', :js, :with_cuprite dovisit project_activity_index_path(project)expect(page)- .not_to have_content('Wiki edits')+ .to have_no_content('Wiki edits')endenddiff --git a/spec/features/admin/attribute_help_texts_spec.rb b/spec/features/admin/attribute_help_texts_spec.rbindex dbf21142486..bc302873cca 100644--- a/spec/features/admin/attribute_help_texts_spec.rb+++ b/spec/features/admin/attribute_help_texts_spec.rb@@ -140,7 +140,7 @@ RSpec.describe 'Attribute help texts', :js, :with_cuprite do# Create new, status is now blockedfind('.attribute-help-texts--create-button').clickexpect(page).to have_css('#attribute_help_text_attribute_name option', text: 'Assignee')- expect(page).not_to have_css('#attribute_help_text_attribute_name option', text: 'Status')+ expect(page).to have_no_css('#attribute_help_text_attribute_name option', text: 'Status')visit attribute_help_texts_path# Destroydiff --git a/spec/features/admin/backup_spec.rb b/spec/features/admin/backup_spec.rbindex e72582ffb85..e139ce00dda 100644--- a/spec/features/admin/backup_spec.rb+++ b/spec/features/admin/backup_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'backup', js: true do+RSpec.describe 'backup', :js dolet(:current_user) docreate(:user,global_permissions: [:create_backup],@@ -122,6 +122,6 @@ RSpec.describe 'backup', js: true dotoken = Token::Backup.find_by(user: current_user)expect(token).to be_nil- expect(page).not_to have_content /#{I18n.t('js.backup.title')}/i+ expect(page).to have_no_content /#{I18n.t('js.backup.title')}/iendenddiff --git a/spec/features/admin/custom_fields/list_custom_field_spec.rb b/spec/features/admin/custom_fields/list_custom_field_spec.rbindex 3549c0a8468..dc77e5e5f2b 100644--- a/spec/features/admin/custom_fields/list_custom_field_spec.rb+++ b/spec/features/admin/custom_fields/list_custom_field_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'List custom fields edit',- js: true,- with_cuprite: true do+RSpec.describe 'List custom fields edit', :js, :with_cuprite doshared_let(:admin) { create(:admin) }before dodiff --git a/spec/features/admin/custom_fields/multi_value_custom_fields_spec.rb b/spec/features/admin/custom_fields/multi_value_custom_fields_spec.rbindex c7761fe0570..3f5e638a8d3 100644--- a/spec/features/admin/custom_fields/multi_value_custom_fields_spec.rb+++ b/spec/features/admin/custom_fields/multi_value_custom_fields_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Multi-value custom fields creation', js: true do+RSpec.describe 'Multi-value custom fields creation', :js doshared_let(:admin) { create(:admin) }before do@@ -44,19 +44,19 @@ RSpec.describe 'Multi-value custom fields creation', js: true dofill_in 'custom_field_name', with: 'My List CF'select 'List', from: 'custom_field_field_format'- expect(page).to have_selector('input#custom_field_custom_options_attributes_0_value')+ expect(page).to have_css('input#custom_field_custom_options_attributes_0_value')fill_in 'custom_field_custom_options_attributes_0_value', with: 'A'# Add new rowpage.find_test_selector('add-custom-option').clickSeleniumHubWaiter.wait- expect(page).to have_selector('input#custom_field_custom_options_attributes_1_value')+ expect(page).to have_css('input#custom_field_custom_options_attributes_1_value')fill_in 'custom_field_custom_options_attributes_1_value', with: 'B'# Add new rowpage.find_test_selector('add-custom-option').clickSeleniumHubWaiter.wait- expect(page).to have_selector('input#custom_field_custom_options_attributes_2_value')+ expect(page).to have_css('input#custom_field_custom_options_attributes_2_value')fill_in 'custom_field_custom_options_attributes_2_value', with: 'C'click_on 'Save'@@ -64,9 +64,9 @@ RSpec.describe 'Multi-value custom fields creation', js: true do# Edit againSeleniumHubWaiter.waitpage.find('a', text: 'My List CF').click- expect(page).to have_selector('input#custom_field_custom_options_attributes_0_value[value=A]')- expect(page).to have_selector('input#custom_field_custom_options_attributes_1_value[value=B]')- expect(page).to have_selector('input#custom_field_custom_options_attributes_2_value[value=C]')+ expect(page).to have_css('input#custom_field_custom_options_attributes_0_value[value=A]')+ expect(page).to have_css('input#custom_field_custom_options_attributes_1_value[value=B]')+ expect(page).to have_css('input#custom_field_custom_options_attributes_2_value[value=C]')# Expect correct valuescf = CustomField.lastdiff --git a/spec/features/admin/custom_fields/user_custom_field_spec.rb b/spec/features/admin/custom_fields/user_custom_field_spec.rbindex f03db000233..137bdbf0084 100644--- a/spec/features/admin/custom_fields/user_custom_field_spec.rb+++ b/spec/features/admin/custom_fields/user_custom_field_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'User custom fields edit',- js: true,- with_cuprite: true do+RSpec.describe 'User custom fields edit', :js, :with_cuprite doshared_let(:admin) { create(:admin) }let(:cf_page) { Pages::CustomFields.new }@@ -48,7 +46,7 @@ RSpec.describe 'User custom fields edit',fill_in 'custom_field_name', with: 'My User CF'select 'User', from: 'custom_field_field_format'- expect(page).not_to have_field('custom_field_custom_options_attributes_0_value')+ expect(page).to have_no_field('custom_field_custom_options_attributes_0_value')click_on 'Save'@@ -59,7 +57,7 @@ RSpec.describe 'User custom fields edit',# Edit againfind('a', text: 'My User CF').click- expect(page).not_to have_field('custom_field_custom_options_attributes_0_value')+ expect(page).to have_no_field('custom_field_custom_options_attributes_0_value')fill_in 'custom_field_name', with: 'My User CF (edited)'click_on 'Save'diff --git a/spec/features/admin/enterprise/enterprise_spec.rb b/spec/features/admin/enterprise/enterprise_spec.rbindex 9a52bd6e3e6..96d14b8bd8a 100644--- a/spec/features/admin/enterprise/enterprise_spec.rb+++ b/spec/features/admin/enterprise/enterprise_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'Enterprise token',- js: true,- with_cuprite: true do+RSpec.describe 'Enterprise token', :js, :with_cuprite doinclude Redmine::I18nshared_let(:admin) { create(:admin) }@@ -54,20 +52,20 @@ RSpec.describe 'Enterprise token',endit 'shows a teaser and token form without a token' do- expect(page).to have_selector('.button', text: 'Start free trial')- expect(page).to have_selector('.button', text: 'Book now')+ expect(page).to have_css('.button', text: 'Start free trial')+ expect(page).to have_css('.button', text: 'Book now')expect(textarea.value).to be_emptytextarea.set 'foobar'submit_button.click# Error output- expect(page).to have_selector('.errorExplanation',- text: "Enterprise support token can't be read. " \- "Are you sure it is a support token?")+ expect(page).to have_css('.errorExplanation',+ text: "Enterprise support token can't be read. " \+ "Are you sure it is a support token?")within 'span.errorSpan' do- expect(page).to have_selector('#enterprise_token_encoded_token')+ expect(page).to have_css('#enterprise_token_encoded_token')endend@@ -80,7 +78,7 @@ RSpec.describe 'Enterprise token',textarea.set 'foobar'submit_button.click- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_update))+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_successful_update))expect(page).to have_test_selector('op-enterprise--active-token')expect(page.all('.attributes-key-value--key').map(&:text))@@ -88,10 +86,10 @@ RSpec.describe 'Enterprise token',expect(page.all('.attributes-key-value--value').map(&:text)).to eq ['Foobar', '[email protected]', Setting.host_name, 'Unlimited', format_date(Time.zone.today), 'Unlimited']- expect(page).to have_selector('.button.icon-delete', text: I18n.t(:button_delete))+ expect(page).to have_css('.button.icon-delete', text: I18n.t(:button_delete))# Expect section to be collapsed- expect(page).not_to have_selector('#token_encoded_token')+ expect(page).to have_no_css('#token_encoded_token')RequestStore.clear!expect(EnterpriseToken.current.encoded_token).to eq('foobar')@@ -103,7 +101,7 @@ RSpec.describe 'Enterprise token',wait_for_reload- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_update))+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_successful_update))# Assume next requestRequestStore.clear!@@ -117,7 +115,7 @@ RSpec.describe 'Enterprise token',wait_for_reload- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_delete))+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_successful_delete))# Assume next requestRequestStore.clear!diff --git a/spec/features/admin/enterprise/enterprise_trial_spec.rb b/spec/features/admin/enterprise/enterprise_trial_spec.rbindex 746ae285502..6b1f96d8e24 100644--- a/spec/features/admin/enterprise/enterprise_trial_spec.rb+++ b/spec/features/admin/enterprise/enterprise_trial_spec.rb@@ -182,9 +182,9 @@ RSpec.describe 'Enterprise trial management',fill_out_modalfind('.button:not(:disabled)', text: 'Submit').click- expect(page).to have_selector('.-required-highlighting #trial-email')+ expect(page).to have_css('.-required-highlighting #trial-email')expect(page).to have_text('Each user can only create one trial.')- expect(page).not_to have_text 'email sent - waiting for confirmation'+ expect(page).to have_no_text 'email sent - waiting for confirmation'endit 'blocks the request assuming the domain was used' do@@ -195,9 +195,9 @@ RSpec.describe 'Enterprise trial management',fill_out_modalfind('.button:not(:disabled)', text: 'Submit').click- expect(page).to have_selector('.-required-highlighting #trial-domain-name')+ expect(page).to have_css('.-required-highlighting #trial-domain-name')expect(page).to have_text('There can only be one active trial per domain.')- expect(page).not_to have_text 'email sent - waiting for confirmation'+ expect(page).to have_no_text 'email sent - waiting for confirmation'endit 'shows an error in case of other errors' do@@ -209,7 +209,7 @@ RSpec.describe 'Enterprise trial management',find('.button:not(:disabled)', text: 'Submit').clickexpect(page).to have_text('Token version is invalid')- expect(page).not_to have_text 'email sent - waiting for confirmation'+ expect(page).to have_no_text 'email sent - waiting for confirmation'endcontext 'with a waiting request pending' do@@ -247,17 +247,17 @@ RSpec.describe 'Enterprise trial management',visit enterprise_path- expect(page).to have_selector('.attributes-key-value--value-container', text: 'OpenProject Test', wait: 20)- expect(page).to have_selector('.attributes-key-value--value-container', text: '01/01/2020')- expect(page).to have_selector('.attributes-key-value--value-container', text: '01/02/2020')- expect(page).to have_selector('.attributes-key-value--value-container', text: '5')+ expect(page).to have_css('.attributes-key-value--value-container', text: 'OpenProject Test', wait: 20)+ expect(page).to have_css('.attributes-key-value--value-container', text: '01/01/2020')+ expect(page).to have_css('.attributes-key-value--value-container', text: '01/02/2020')+ expect(page).to have_css('.attributes-key-value--value-container', text: '5')# Generated expired token has different mail- expect(page).to have_selector('.attributes-key-value--value-container', text: '[email protected]')+ expect(page).to have_css('.attributes-key-value--value-container', text: '[email protected]')endit 'can confirm that trial regularly' dofind_test_selector('op-ee-trial-waiting-resend-link', text: 'Resend').click- expect(page).to have_selector('.op-toast.-success', text: 'Email has been resent.', wait: 20)+ expect(page).to have_css('.op-toast.-success', text: 'Email has been resent.', wait: 20)expect(page).to have_text '[email protected]'expect(page).to have_text 'email sent - waiting for confirmation'@@ -276,13 +276,13 @@ RSpec.describe 'Enterprise trial management',# advance to closeclick_on 'Continue'- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)- expect(page).to have_selector('.attributes-key-value--value-container', text: 'OpenProject Test')- expect(page).to have_selector('.attributes-key-value--value-container', text: '01/01/2020')- expect(page).to have_selector('.attributes-key-value--value-container', text: '01/02/2020')- expect(page).to have_selector('.attributes-key-value--value-container', text: '5')+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.', wait: 10)+ expect(page).to have_css('.attributes-key-value--value-container', text: 'OpenProject Test')+ expect(page).to have_css('.attributes-key-value--value-container', text: '01/01/2020')+ expect(page).to have_css('.attributes-key-value--value-container', text: '01/02/2020')+ expect(page).to have_css('.attributes-key-value--value-container', text: '5')# Generated expired token has different mail- expect(page).to have_selector('.attributes-key-value--value-container', text: '[email protected]')+ expect(page).to have_css('.attributes-key-value--value-container', text: '[email protected]')endendenddiff --git a/spec/features/admin/enterprise/token_domain_spec.rb b/spec/features/admin/enterprise/token_domain_spec.rbindex e6902b728de..a7f244bf5c5 100644--- a/spec/features/admin/enterprise/token_domain_spec.rb+++ b/spec/features/admin/enterprise/token_domain_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'Enterprise Edition token domain',- js: true,- with_cuprite: true do+RSpec.describe 'Enterprise Edition token domain', :js, :with_cuprite dolet(:current_user) { create(:admin) }let(:ee_token) { Rails.root.join("spec/fixtures/ee_tokens/v2_1_user_localhost_3001.token").read }diff --git a/spec/features/admin/enumerations_spec.rb b/spec/features/admin/enumerations_spec.rbindex 077b38fb100..48fac780b38 100644--- a/spec/features/admin/enumerations_spec.rb+++ b/spec/features/admin/enumerations_spec.rb@@ -38,7 +38,7 @@ RSpec.describe 'Enumerations' doit 'contains all defined enumerations' doEnumeration.subclasses.each do |enumeration|- expect(page).to have_selector('h3', text: I18n.t(enumeration::OptionName))+ expect(page).to have_css('h3', text: I18n.t(enumeration::OptionName))expect(page).to have_link(I18n.t(:label_enumeration_new),href: new_enumeration_path(type: enumeration.name))enddiff --git a/spec/features/admin/languages_settings_spec.rb b/spec/features/admin/languages_settings_spec.rbindex 18c54234f40..3cb2685d4d8 100644--- a/spec/features/admin/languages_settings_spec.rb+++ b/spec/features/admin/languages_settings_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Languages settings page', cuprite: true, js: true do+RSpec.describe 'Languages settings page', :cuprite, :js docurrent_user { create(:admin) }let(:languages_page) { Pages::Admin::SystemSettings::Languages.new }diff --git a/spec/features/admin/menu_item_traversal_spec.rb b/spec/features/admin/menu_item_traversal_spec.rbindex 9acf018c21f..85ef30f87df 100644--- a/spec/features/admin/menu_item_traversal_spec.rb+++ b/spec/features/admin/menu_item_traversal_spec.rb@@ -38,14 +38,14 @@ RSpec.describe 'Menu item traversal' doendit 'correctly maps the menu items for controllers in their namespace (Regression #30859)' do- expect(page).to have_selector('.admin-overview-menu-item.selected', text: 'Overview')+ expect(page).to have_css('.admin-overview-menu-item.selected', text: 'Overview')find('.plugin-webhooks-menu-item').click# using `controller_name` in `menu_controller.rb` has broken this example,# due to the plugin controller also being named 'admin' thus falling back to 'admin#index' => overview selected- expect(page).to have_selector('.plugin-webhooks-menu-item.selected', text: 'Webhooks', wait: 5)- expect(page).not_to have_selector('.admin-overview-menu-item.selected')+ expect(page).to have_css('.plugin-webhooks-menu-item.selected', text: 'Webhooks', wait: 5)+ expect(page).to have_no_css('.admin-overview-menu-item.selected')endend@@ -71,8 +71,8 @@ RSpec.describe 'Menu item traversal' doexpect(current_url).to include linkexpect(page).to have_http_status(:ok)- expect(page).not_to have_text(I18n.t(:notice_not_authorized))- expect(page).to have_selector '#menu-sidebar .selected'+ expect(page).to have_no_text(I18n.t(:notice_not_authorized))+ expect(page).to have_css '#menu-sidebar .selected'}enddiff --git a/spec/features/admin/oauth/oauth_applications_management_spec.rb b/spec/features/admin/oauth/oauth_applications_management_spec.rbindex 8ee64cf7f65..9fa698d0603 100644--- a/spec/features/admin/oauth/oauth_applications_management_spec.rb+++ b/spec/features/admin/oauth/oauth_applications_management_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'OAuth applications management',- js: true,- with_cuprite: true do+RSpec.describe 'OAuth applications management', :js, :with_cuprite dolet(:admin) { create(:admin) }before do@@ -40,7 +38,7 @@ RSpec.describe 'OAuth applications management',it 'can create, update, show and delete applications' do# Initially empty- expect(page).to have_selector('.generic-table--empty-row', text: 'There is currently nothing to display')+ expect(page).to have_css('.generic-table--empty-row', text: 'There is currently nothing to display')# Create applicationfind('.button', text: 'Add').click@@ -50,26 +48,26 @@ RSpec.describe 'OAuth applications management',fill_in 'application_redirect_uri', with: "not a url!"click_on 'Create'- expect(page).to have_selector('.errorExplanation', text: 'Redirect URI must be an absolute URI.')+ expect(page).to have_css('.errorExplanation', text: 'Redirect URI must be an absolute URI.')fill_in('application_redirect_uri', with: "")# Fill rediret_uri which does not provide a Secure Contextfill_in 'application_redirect_uri', with: "http://example.org"click_on 'Create'- expect(page).to have_selector('.errorExplanation', text: 'Redirect URI is not providing a "Secure Context"')+ expect(page).to have_css('.errorExplanation', text: 'Redirect URI is not providing a "Secure Context"')# Can create localhost without https (https://community.openproject.com/wp/34025)fill_in 'application_redirect_uri', with: "urn:ietf:wg:oauth:2.0:oob\nhttp://localhost/my/callback"click_on 'Create'- expect(page).to have_selector('.op-toast.-success', text: 'Successful creation.')+ expect(page).to have_css('.op-toast.-success', text: 'Successful creation.')- expect(page).to have_selector('.attributes-key-value--key', text: 'Client ID')- expect(page).to have_selector('.attributes-key-value--value', text: "urn:ietf:wg:oauth:2.0:oob\nhttp://localhost/my/callback")+ expect(page).to have_css('.attributes-key-value--key', text: 'Client ID')+ expect(page).to have_css('.attributes-key-value--value', text: "urn:ietf:wg:oauth:2.0:oob\nhttp://localhost/my/callback")# Should print secret on initial visit- expect(page).to have_selector('.attributes-key-value--key', text: 'Client secret')+ expect(page).to have_css('.attributes-key-value--key', text: 'Client secret')expect(page.first('.attributes-key-value--value code').text).to match /\w+/# Edit again@@ -81,16 +79,16 @@ RSpec.describe 'OAuth applications management',# Show applicationfind('td a', text: 'My API application').click- expect(page).not_to have_selector('.attributes-key-value--key', text: 'Client secret')- expect(page).not_to have_selector('.attributes-key-value--value code')- expect(page).to have_selector('.attributes-key-value--key', text: 'Client ID')- expect(page).to have_selector('.attributes-key-value--value', text: "urn:ietf:wg:oauth:2.0:oob")+ expect(page).to have_no_css('.attributes-key-value--key', text: 'Client secret')+ expect(page).to have_no_css('.attributes-key-value--value code')+ expect(page).to have_css('.attributes-key-value--key', text: 'Client ID')+ expect(page).to have_css('.attributes-key-value--value', text: "urn:ietf:wg:oauth:2.0:oob")accept_alert doclick_on 'Delete'end# Table is empty again- expect(page).to have_selector('.generic-table--empty-row', text: 'There is currently nothing to display')+ expect(page).to have_css('.generic-table--empty-row', text: 'There is currently nothing to display')endenddiff --git a/spec/features/admin/test_mail_notification_spec.rb b/spec/features/admin/test_mail_notification_spec.rbindex 609bcaec369..2fe771a0248 100644--- a/spec/features/admin/test_mail_notification_spec.rb+++ b/spec/features/admin/test_mail_notification_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Test mail notification', js: true, with_cuprite: true do+RSpec.describe 'Test mail notification', :js, :with_cuprite doshared_let(:admin) { create(:admin) }before do@@ -44,7 +44,7 @@ RSpec.describe 'Test mail notification', js: true, with_cuprite: true doclick_link 'Send a test email'expected = "An error occurred while sending mail (#{error_message})"- expect(page).to have_selector('.op-toast.-error', text: expected)- expect(page).not_to have_selector('.op-toast.-error strong')+ expect(page).to have_css('.op-toast.-error', text: expected)+ expect(page).to have_no_css('.op-toast.-error strong')endenddiff --git a/spec/features/admin/working_days_spec.rb b/spec/features/admin/working_days_spec.rbindex 620890a39fc..aa049ff7d01 100644--- a/spec/features/admin/working_days_spec.rb+++ b/spec/features/admin/working_days_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Working Days', js: true, with_cuprite: true do+RSpec.describe 'Working Days', :js, :with_cuprite docreate_shared_association_defaults_for_work_package_factoryshared_let(:week_days) { week_with_saturday_and_sunday_as_weekend }@@ -58,7 +58,7 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true doit 'contains all defined days from the settings' doWeekDay.all.each do |day|- expect(page).to have_selector('label', text: day.name)+ expect(page).to have_css('label', text: day.name)if day.workingexpect(page).to have_checked_field day.nameend@@ -77,7 +77,7 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true dodialog.cancelend- expect(page).not_to have_selector('.op-toast.-success')+ expect(page).to have_no_css('.op-toast.-success')expect(working_days_setting).to eq([1, 2, 3, 4, 5])@@ -101,7 +101,7 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true dodialog.confirmend- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.')+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.')expect(page).to have_unchecked_field 'Monday'expect(page).to have_unchecked_field 'Friday'expect(page).to have_unchecked_field 'Saturday'@@ -141,8 +141,8 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true dodialog.confirmend- expect(page).to have_selector('.op-toast.-error',- text: 'At least one day of the week must be defined as a working day.')+ expect(page).to have_css('.op-toast.-error',+ text: 'At least one day of the week must be defined as a working day.')# Restore the checkboxes to their valid stateexpect(page).to have_checked_field 'Monday'expect(page).to have_checked_field 'Tuesday'@@ -175,8 +175,8 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true do# Not executing the background jobsdialog.confirm- expect(page).to have_selector('.op-toast.-error',- text: 'The previous changes to the working days configuration have not been applied yet.')+ expect(page).to have_css('.op-toast.-error',+ text: 'The previous changes to the working days configuration have not been applied yet.')endend@@ -213,7 +213,7 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true doclick_on 'Add'end- expect(page).to have_selector('.fc-list-event-title', text: 'My holiday')+ expect(page).to have_css('.fc-list-event-title', text: 'My holiday')# Add a second dayclick_on 'Non-working day'@@ -232,7 +232,7 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true doclick_on 'Apply changes'click_on 'Save and reschedule'- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.')+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.')nwd1 = NonWorkingDay.find_by(name: 'My holiday')expect(nwd1.date).to eq date1@@ -246,7 +246,7 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true dowithin_test_selector('op-datepicker-modal') doclick_on 'Add'end- expect(page).to have_selector('.flatpickr-calendar')+ expect(page).to have_css('.flatpickr-calendar')datepicker.expect_visiblewithin_test_selector('op-datepicker-modal') do@@ -258,14 +258,14 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true dowithin_test_selector('op-datepicker-modal') doclick_on 'Add'end- expect(page).not_to have_selector('.flatpickr-calendar')+ expect(page).to have_no_css('.flatpickr-calendar')- expect(page).to have_selector('.op-toast', text: /A non-working day for this date exists already/)+ expect(page).to have_css('.op-toast', text: /A non-working day for this date exists already/)endit 'deletes a non-working day' donon_working_days.each do |nwd|- expect(page).to have_selector('tr', text: nwd.date.strftime("%B %-d, %Y"))+ expect(page).to have_css('tr', text: nwd.date.strftime("%B %-d, %Y"))enddelete_button = page.first('.op-non-working-days-list--delete-icon .icon-delete', visible: :all)@@ -277,8 +277,8 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true dodialog.confirm# Remove the first date- expect(page).not_to have_selector('tr', text: non_working_days.first.date.strftime("%B %-d, %Y"))- expect(page).to have_selector('tr', text: non_working_days.last.date.strftime("%B %-d, %Y"))+ expect(page).to have_no_css('tr', text: non_working_days.first.date.strftime("%B %-d, %Y"))+ expect(page).to have_css('tr', text: non_working_days.last.date.strftime("%B %-d, %Y"))# Show an error when the changes cannot be saved and preserves the modifications upon submiterrors = ActiveModel::Errors.new(NonWorkingDay.new)@@ -299,8 +299,8 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true dodialog.confirm# Keep the second date hidden- expect(page).not_to have_selector('tr', text: non_working_days.second.date.strftime("%B %-d, %Y"))- expect(page).to have_selector('tr', text: non_working_days.last.date.strftime("%B %-d, %Y"))+ expect(page).to have_no_css('tr', text: non_working_days.second.date.strftime("%B %-d, %Y"))+ expect(page).to have_css('tr', text: non_working_days.last.date.strftime("%B %-d, %Y"))endendenddiff --git a/spec/features/api_docs/index_spec.rb b/spec/features/api_docs/index_spec.rbindex d2d661a0705..2ce5c2262ce 100644--- a/spec/features/api_docs/index_spec.rb+++ b/spec/features/api_docs/index_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'REST API docs index page', js: true do+RSpec.describe 'REST API docs index page', :js dosubject(:visit_docs_page) { visit(api_docs_path) }context 'with anonymous user' do@@ -46,7 +46,7 @@ RSpec.describe 'REST API docs index page', js: true dovisit_docs_page# web component are harder to test with capybara- expect(find("openapi-explorer").shadow_root).to have_selector('#api-title', text: 'OpenProject API V3 (Stable)')+ expect(find("openapi-explorer").shadow_root).to have_css('#api-title', text: 'OpenProject API V3 (Stable)')endcontext 'when APIv3 documentation is disabled (from Administration > API > Enable docs page)',diff --git a/spec/features/attachments/attachments_spec.rb b/spec/features/attachments/attachments_spec.rbindex d6647b4cc70..8742aaac564 100644--- a/spec/features/attachments/attachments_spec.rb+++ b/spec/features/attachments/attachments_spec.rb@@ -37,7 +37,7 @@ RSpec.describe 'attachments' doallow(User).to receive(:current).and_return current_userend- describe 'upload', js: true do+ describe 'upload', :js dolet(:file) { create(:file, name: 'textfile.txt') }# FIXME rework this spec after implementing fullscreen create viewdiff --git a/spec/features/auth/auth_source_sso_login_spec.rb b/spec/features/auth/auth_source_sso_login_spec.rbindex 08df723084f..497e24fb3a7 100644--- a/spec/features/auth/auth_source_sso_login_spec.rb+++ b/spec/features/auth/auth_source_sso_login_spec.rb@@ -60,6 +60,6 @@ RSpec.describe 'Login with auth source SSO' do.to have_current_path my_page_pathexpect(page)- .to have_selector("a[title='#{user.name}']")+ .to have_css("a[title='#{user.name}']")endenddiff --git a/spec/features/auth/auth_source_sso_logout_spec.rb b/spec/features/auth/auth_source_sso_logout_spec.rbindex da553c1c709..3e259f590a5 100644--- a/spec/features/auth/auth_source_sso_logout_spec.rb+++ b/spec/features/auth/auth_source_sso_logout_spec.rb@@ -53,11 +53,11 @@ RSpec.describe 'Login with auth source SSO',it 'can log out after multiple visits' dovisit home_path- expect(page).to have_selector('.controller-homescreen')+ expect(page).to have_css('.controller-homescreen')visit home_path- expect(page).to have_selector('.controller-homescreen')+ expect(page).to have_css('.controller-homescreen')visit signout_pathdiff --git a/spec/features/auth/auth_stages_spec.rb b/spec/features/auth/auth_stages_spec.rbindex 31950678f0c..8efca2075d9 100644--- a/spec/features/auth/auth_stages_spec.rb+++ b/spec/features/auth/auth_stages_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Authentication Stages',- skip_2fa_stage: true do+RSpec.describe 'Authentication Stages', :skip_2fa_stage dobefore do@capybara_ignore_elements = Capybara.ignore_hidden_elementsCapybara.ignore_hidden_elements = true@@ -160,7 +159,7 @@ RSpec.describe 'Authentication Stages',visit "/my/account"- expect(page).not_to have_text user.login # just checking we're really not logged in+ expect(page).to have_no_text user.login # just checking we're really not logged inendit 'redirects to the login page and shows an error on authentication stage failure' do@@ -176,7 +175,7 @@ RSpec.describe 'Authentication Stages',visit "/my/account"- expect(page).not_to have_text user.login # just checking we're really not logged in+ expect(page).to have_no_text user.login # just checking we're really not logged inendit 'redirects to the login page and shows an error on returning to the wrong stage' do@@ -192,7 +191,7 @@ RSpec.describe 'Authentication Stages',visit "/my/account"- expect(page).not_to have_text user.login # just checking we're really not logged in+ expect(page).to have_no_text user.login # just checking we're really not logged inendit 'redirects to the referer if there is one' dodiff --git a/spec/features/auth/consent_auth_stage_spec.rb b/spec/features/auth/consent_auth_stage_spec.rbindex d9f3d1c6bd0..8dd5eb4f60e 100644--- a/spec/features/auth/consent_auth_stage_spec.rb+++ b/spec/features/auth/consent_auth_stage_spec.rb@@ -50,18 +50,18 @@ RSpec.describe 'Authentication Stages' dodef expect_logged_in(path = my_page_path)expect(page).to have_current_path(path)visit my_account_path- expect(page).to have_selector('.form--field-container', text: user.login)+ expect(page).to have_css('.form--field-container', text: user.login)enddef expect_not_logged_invisit my_account_path- expect(page).not_to have_selector('.form--field-container', text: user.login)+ expect(page).to have_no_css('.form--field-container', text: user.login)endcontext 'when disabled', with_settings: { consent_required: false } doit 'does not show consent' dologin_with user.login, user_password- expect(page).not_to have_selector('.account-consent')+ expect(page).to have_no_css('.account-consent')expect_logged_inend@@ -70,7 +70,7 @@ RSpec.describe 'Authentication Stages' doexpect(Setting::Autologin.enabled?).to be truelogin_with user.login, user_password, autologin: true- expect(page).not_to have_selector('.account-consent')+ expect(page).to have_no_css('.account-consent')expect_logged_incookies = Capybara.current_session.driver.request.cookies@@ -90,7 +90,7 @@ RSpec.describe 'Authentication Stages' do.at_least(:once).with('Instance is configured to require consent, but no consent_info has been set.')login_with user.login, user_password- expect(page).not_to have_selector('.account-consent')+ expect(page).to have_no_css('.account-consent')expect_logged_inendend@@ -100,7 +100,6 @@ RSpec.describe 'Authentication Stages' doconsent_required: true,consent_info: { de: '# Einwilligung', en: '# Consent header!' }} do-around do |example|Capybara.current_session.driver.header('Accept-Language', 'de')example.call@@ -111,8 +110,8 @@ RSpec.describe 'Authentication Stages' doit 'shows localized consent as defined by the accept language header (ignoring users language)' dologin_with user.login, user_password- expect(page).to have_selector('.account-consent')- expect(page).to have_selector('h1', text: 'Einwilligung')+ expect(page).to have_css('.account-consent')+ expect(page).to have_css('h1', text: 'Einwilligung')endend@@ -122,7 +121,6 @@ RSpec.describe 'Authentication Stages' doconsent_info: { en: '# Consent header!' },consent_required: true} do-after do# Clear session to avoid that the onboarding tour startspage.execute_script("window.sessionStorage.clear();")@@ -132,14 +130,14 @@ RSpec.describe 'Authentication Stages' doexpect(Setting.consent_time).to be_blanklogin_with user.login, user_password- expect(page).to have_selector('.account-consent')- expect(page).to have_selector('h1', text: 'Consent header')+ expect(page).to have_css('.account-consent')+ expect(page).to have_css('h1', text: 'Consent header')# Can't submit without confirmationclick_on I18n.t(:button_continue)- expect(page).to have_selector('.account-consent')- expect(page).to have_selector('h1', text: 'Consent header')+ expect(page).to have_css('.account-consent')+ expect(page).to have_css('h1', text: 'Consent header')SeleniumHubWaiter.wait# Confirm consent@@ -162,7 +160,7 @@ RSpec.describe 'Authentication Stages' dofind_by_id('toggle_consent_time').set(true)click_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')Setting.clear_cacheexpect(Setting.consent_time).to be_present@@ -199,17 +197,17 @@ RSpec.describe 'Authentication Stages' dotoken = Token::Invitation.last.valuevisit "/account/activate?token=#{token}"- expect(page).to have_selector('h1', text: 'Consent header')+ expect(page).to have_css('h1', text: 'Consent header')# Cannot create without acceptingfill_in 'user_password', with: user_passwordfill_in 'user_password_confirmation', with: user_passwordclick_on I18n.t(:button_create)- expect(page).to have_selector('h1', text: 'Consent header')+ expect(page).to have_css('h1', text: 'Consent header')check 'consent_check'click_on I18n.t(:button_create)- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')expect_logged_in('/?first_time_user=true')end@@ -219,13 +217,12 @@ RSpec.describe 'Authentication Stages' doconsent_info: { en: '# Consent header!' },consent_required: true} do-expect(Setting::Autologin.enabled?).to be truelogin_with user.login, user_password, autologin: true- expect(page).to have_selector('.account-consent')- expect(page).to have_selector('h1', text: 'Consent header!')+ expect(page).to have_css('.account-consent')+ expect(page).to have_css('h1', text: 'Consent header!')# Confirm consentSeleniumHubWaiter.wait@@ -245,13 +242,13 @@ RSpec.describe 'Authentication Stages' doit 'shows that address to users when declining' dologin_with user.login, user_password- expect(page).to have_selector('.account-consent')- expect(page).to have_selector('h1', text: 'Consent header')+ expect(page).to have_css('.account-consent')+ expect(page).to have_css('h1', text: 'Consent header')# Decline the consentclick_on I18n.t(:button_decline)- expect(page).to have_selector('.op-toast.-error', text: '[email protected]')+ expect(page).to have_css('.op-toast.-error', text: '[email protected]')endendenddiff --git a/spec/features/auth/login_spec.rb b/spec/features/auth/login_spec.rbindex 1c540eee054..d278dec8fba 100644--- a/spec/features/auth/login_spec.rb+++ b/spec/features/auth/login_spec.rb@@ -40,7 +40,7 @@ RSpec.describe 'Login' dodef expect_being_logged_in(user)expect(page)- .to have_selector("a[title='#{user.name}']")+ .to have_css("a[title='#{user.name}']")enddef expect_not_being_logged_in@@ -157,7 +157,7 @@ RSpec.describe 'Login' doendend- context 'with password expiry', js: true do+ context 'with password expiry', :js dobefore douser.passwords.update_all(created_at: 31.days.ago,updated_at: 31.days.ago)diff --git a/spec/features/auth/logout_spec.rb b/spec/features/auth/logout_spec.rbindex 2ab4e0d09c6..9ff03703d1e 100644--- a/spec/features/auth/logout_spec.rb+++ b/spec/features/auth/logout_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Logout', js: true do+RSpec.describe 'Logout', :js dolet(:user_password) { 'b0B' * 4 }let(:user) docreate(:user,@@ -55,7 +55,7 @@ RSpec.describe 'Logout', js: true do# Can not access the my page but is redirected# to login instead.visit my_page_path-+expect(page).to have_current_path /login/diff --git a/spec/features/auth/lost_password_spec.rb b/spec/features/auth/lost_password_spec.rbindex fef2f6fd99d..fc3d3c0f143 100644--- a/spec/features/auth/lost_password_spec.rb+++ b/spec/features/auth/lost_password_spec.rb@@ -39,14 +39,14 @@ RSpec.describe 'Lost password' dofill_in 'mail', with: 'invalid mail'click_on 'Submit'- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_account_lost_email_sent))+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_account_lost_email_sent))perform_enqueued_jobsexpect(ActionMailer::Base.deliveries.size).to be 0fill_in 'mail', with: user.mailclick_on 'Submit'- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_account_lost_email_sent))+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_account_lost_email_sent))perform_enqueued_jobsexpect(ActionMailer::Base.deliveries.size).to be 1@@ -60,7 +60,7 @@ RSpec.describe 'Lost password' doclick_button 'Save'- expect(page).to have_selector('.op-toast.-info', text: I18n.t(:notice_account_password_updated))+ expect(page).to have_css('.op-toast.-info', text: I18n.t(:notice_account_password_updated))login_with user.login, new_password@@ -79,7 +79,7 @@ RSpec.describe 'Lost password' dofill_in 'mail', with: user.mailclick_on 'Submit'- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_account_lost_email_sent))+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_account_lost_email_sent))perform_enqueued_jobsexpect(ActionMailer::Base.deliveries.size).to be 1@@ -99,7 +99,7 @@ RSpec.describe 'Lost password' dofill_in 'mail', with: user.mailclick_on 'Submit'- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_account_lost_email_sent))+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_account_lost_email_sent))perform_enqueued_jobsexpect(ActionMailer::Base.deliveries.size).to be 1diff --git a/spec/features/categories/delete_spec.rb b/spec/features/categories/delete_spec.rbindex 4aaaadf9c5f..4090dd03104 100644--- a/spec/features/categories/delete_spec.rb+++ b/spec/features/categories/delete_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'features/categories/categories_page'-RSpec.describe 'Deletion', js: true, with_cuprite: true do+RSpec.describe 'Deletion', :js, :with_cuprite dolet(:current_user) docreate(:user,member_with_permissions: { category.project => %i[manage_categories] })@@ -52,9 +52,9 @@ RSpec.describe 'Deletion', js: true, with_cuprite: true doendshared_examples_for 'deleted category' do- it { expect(page).to have_selector('div.generic-table--no-results-container') }+ it { expect(page).to have_css('div.generic-table--no-results-container') }- it { expect(page).not_to have_selector(delete_button) }+ it { expect(page).to have_no_selector(delete_button) }enddescribe 'w/o work package' dodiff --git a/spec/features/custom_fields/activate_in_project_spec.rb b/spec/features/custom_fields/activate_in_project_spec.rbindex c9ca1a24d83..8f7ec8bfffb 100644--- a/spec/features/custom_fields/activate_in_project_spec.rb+++ b/spec/features/custom_fields/activate_in_project_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'support/pages/custom_fields'-RSpec.describe 'custom fields', js: true, with_cuprite: true do+RSpec.describe 'custom fields', :js, :with_cuprite dolet(:user) { create(:admin) }let(:cf_page) { Pages::CustomFields.new }let(:for_all_cf) { create(:list_wp_custom_field, is_for_all: true) }diff --git a/spec/features/custom_fields/create_bool_spec.rb b/spec/features/custom_fields/create_bool_spec.rbindex b94d79872d2..e7ce8dcc5b7 100644--- a/spec/features/custom_fields/create_bool_spec.rb+++ b/spec/features/custom_fields/create_bool_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'require 'support/pages/custom_fields'-RSpec.describe 'custom fields', js: true, with_cuprite: true do+RSpec.describe 'custom fields', :js, :with_cuprite dolet(:user) { create(:admin) }let(:cf_page) { Pages::CustomFields.new }diff --git a/spec/features/custom_fields/create_date_spec.rb b/spec/features/custom_fields/create_date_spec.rbindex cb66d497cc7..c86d2f3e7ac 100644--- a/spec/features/custom_fields/create_date_spec.rb+++ b/spec/features/custom_fields/create_date_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'require 'support/pages/custom_fields'-RSpec.describe 'custom fields', js: true, with_cuprite: true do+RSpec.describe 'custom fields', :js, :with_cuprite dolet(:user) { create(:admin) }let(:cf_page) { Pages::CustomFields.new }diff --git a/spec/features/custom_fields/create_float_spec.rb b/spec/features/custom_fields/create_float_spec.rbindex 4cf3497c496..86ebaaa387a 100644--- a/spec/features/custom_fields/create_float_spec.rb+++ b/spec/features/custom_fields/create_float_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'require 'support/pages/custom_fields'-RSpec.describe 'custom fields', js: true, with_cuprite: true do+RSpec.describe 'custom fields', :js, :with_cuprite dolet(:user) { create(:admin) }let(:cf_page) { Pages::CustomFields.new }diff --git a/spec/features/custom_fields/create_int_spec.rb b/spec/features/custom_fields/create_int_spec.rbindex 4e2a2faf3a2..a8e2d8d7124 100644--- a/spec/features/custom_fields/create_int_spec.rb+++ b/spec/features/custom_fields/create_int_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'require 'support/pages/custom_fields'-RSpec.describe 'custom fields', js: true, with_cuprite: true do+RSpec.describe 'custom fields', :js, :with_cuprite dolet(:user) { create(:admin) }let(:cf_page) { Pages::CustomFields.new }diff --git a/spec/features/custom_fields/create_long_text_spec.rb b/spec/features/custom_fields/create_long_text_spec.rbindex 9b6067078c5..04334270247 100644--- a/spec/features/custom_fields/create_long_text_spec.rb+++ b/spec/features/custom_fields/create_long_text_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'require 'support/pages/custom_fields'-RSpec.describe 'custom fields', js: true do+RSpec.describe 'custom fields', :js dolet(:user) { create(:admin) }let(:cf_page) { Pages::CustomFields.new }let(:editor) { Components::WysiwygEditor.new '#custom_field_form' }@@ -57,8 +57,8 @@ RSpec.describe 'custom fields', js: true dowp_editor.expect_active!wp_editor.ckeditor.in_editor do |container, _|- expect(container).to have_selector('h1', text: 'This is an exemplary test')- expect(container).to have_selector('strong', text: 'Foo bar')+ expect(container).to have_css('h1', text: 'This is an exemplary test')+ expect(container).to have_css('strong', text: 'Foo bar')endendenddiff --git a/spec/features/custom_fields/custom_fields_spec.rb b/spec/features/custom_fields/custom_fields_spec.rbindex 337959d3e62..eafa5778e4a 100644--- a/spec/features/custom_fields/custom_fields_spec.rb+++ b/spec/features/custom_fields/custom_fields_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'require 'support/pages/custom_fields'-RSpec.describe 'custom fields', js: true, with_cuprite: true do+RSpec.describe 'custom fields', :js, :with_cuprite dolet(:user) { create(:admin) }let(:cf_page) { Pages::CustomFields.new }@@ -21,7 +21,7 @@ RSpec.describe 'custom fields', js: true, with_cuprite: true doexpect(page).to have_text("Allow multi-select")check("custom_field_multi_value")- expect(page).to have_selector('.custom-option-row', count: 1)+ expect(page).to have_css('.custom-option-row', count: 1)within all(".custom-option-row").last dofind(".custom-option-value input").set "Windows"find(".custom-option-default-value input").set true@@ -29,14 +29,14 @@ RSpec.describe 'custom fields', js: true, with_cuprite: true dopage.find_test_selector('add-custom-option').click- expect(page).to have_selector('.custom-option-row', count: 2)+ expect(page).to have_css('.custom-option-row', count: 2)within all(".custom-option-row").last dofind(".custom-option-value input").set "Linux"endpage.find_test_selector('add-custom-option').click- expect(page).to have_selector('.custom-option-row', count: 3)+ expect(page).to have_css('.custom-option-row', count: 3)within all(".custom-option-row").last dofind(".custom-option-value input").set "Solaris"@@ -52,7 +52,7 @@ RSpec.describe 'custom fields', js: true, with_cuprite: true doexpect(page).to have_field("custom_field_multi_value", checked: true)- expect(page).to have_selector('.custom-option-row', count: 3)+ expect(page).to have_css('.custom-option-row', count: 3)expect(page).to have_field("custom_field_custom_options_attributes_0_value", with: "Solaris")expect(page).to have_field("custom_field_custom_options_attributes_1_value", with: "Windows")expect(page).to have_field("custom_field_custom_options_attributes_2_value", with: "Linux")@@ -90,67 +90,84 @@ RSpec.describe 'custom fields', js: true, with_cuprite: true dodef expect_page_not_to_have_texts(*text)text.each do |t|- expect(page).not_to have_text(t)+ expect(page).to have_no_text(t)endendselect "Text", from: "custom_field_field_format"expect_page_to_have_texts(- label_min_length, label_max_length, label_regexp, label_default_value, label_is_required)+ label_min_length, label_max_length, label_regexp, label_default_value, label_is_required+ )expect_page_not_to_have_texts(- label_multi_value, label_allow_non_open_versions, label_possible_values)+ label_multi_value, label_allow_non_open_versions, label_possible_values+ )select "Long text", from: "custom_field_field_format"expect_page_to_have_texts(- label_min_length, label_max_length, label_regexp, label_default_value, label_is_required)+ label_min_length, label_max_length, label_regexp, label_default_value, label_is_required+ )expect_page_not_to_have_texts(- label_multi_value, label_allow_non_open_versions, label_possible_values)+ label_multi_value, label_allow_non_open_versions, label_possible_values+ )# Both Integer and Float have min/max_len and regex as well which seems strange.select "Integer", from: "custom_field_field_format"expect_page_to_have_texts(- label_min_length, label_max_length, label_regexp, label_default_value, label_is_required)+ label_min_length, label_max_length, label_regexp, label_default_value, label_is_required+ )expect_page_not_to_have_texts(- label_multi_value, label_allow_non_open_versions, label_possible_values)+ label_multi_value, label_allow_non_open_versions, label_possible_values+ )select "Float", from: "custom_field_field_format"expect_page_to_have_texts(- label_min_length, label_max_length, label_regexp, label_default_value, label_is_required)+ label_min_length, label_max_length, label_regexp, label_default_value, label_is_required+ )expect_page_not_to_have_texts(- label_multi_value, label_allow_non_open_versions, label_possible_values)+ label_multi_value, label_allow_non_open_versions, label_possible_values+ )select "List", from: "custom_field_field_format"expect_page_to_have_texts(- label_multi_value, label_possible_values, label_is_required)+ label_multi_value, label_possible_values, label_is_required+ )expect_page_not_to_have_texts(- label_min_length, label_max_length, label_regexp, label_allow_non_open_versions, label_default_value)+ label_min_length, label_max_length, label_regexp, label_allow_non_open_versions, label_default_value+ )select "Date", from: "custom_field_field_format"expect_page_to_have_texts(label_is_required)expect_page_not_to_have_texts(label_min_length, label_max_length, label_regexp, label_multi_value,- label_allow_non_open_versions, label_possible_values, label_default_value)+ label_allow_non_open_versions, label_possible_values, label_default_value+ )select "Boolean", from: "custom_field_field_format"expect_page_to_have_texts(- label_default_value, label_is_required)+ label_default_value, label_is_required+ )expect_page_not_to_have_texts(label_min_length, label_max_length, label_regexp, label_multi_value,- label_allow_non_open_versions, label_possible_values)+ label_allow_non_open_versions, label_possible_values+ )select "User", from: "custom_field_field_format"expect_page_to_have_texts(- label_multi_value, label_is_required)+ label_multi_value, label_is_required+ )expect_page_not_to_have_texts(label_min_length, label_max_length, label_regexp, label_allow_non_open_versions,- label_possible_values, label_default_value)+ label_possible_values, label_default_value+ )select "Version", from: "custom_field_field_format"expect_page_to_have_texts(- label_multi_value, label_allow_non_open_versions, label_is_required)+ label_multi_value, label_allow_non_open_versions, label_is_required+ )expect_page_not_to_have_texts(label_min_length, label_max_length, label_regexp,- label_possible_values, label_default_value)+ label_possible_values, label_default_value+ )endit "shows the correct breadcrumbs" do@@ -160,8 +177,8 @@ RSpec.describe 'custom fields', js: true, with_cuprite: true dowait_for_reloadpage.within_test_selector('op-breadcrumb') do- expect(page).to have_selector('.breadcrumb-item', text: type)- expect(page).to have_selector('.breadcrumb-item.breadcrumb-item-selected', text: "New custom field")+ expect(page).to have_css('.breadcrumb-item', text: type)+ expect(page).to have_css('.breadcrumb-item.breadcrumb-item-selected', text: "New custom field")endendend@@ -203,7 +220,7 @@ RSpec.describe 'custom fields', js: true, with_cuprite: true dopage.find_test_selector('add-custom-option').clickwait_for_reload- expect(page).to have_selector('.custom-option-row', count: 5)+ expect(page).to have_css('.custom-option-row', count: 5)within all(".custom-option-row").last dofind(".custom-option-value input").set "Sega"end@@ -211,7 +228,7 @@ RSpec.describe 'custom fields', js: true, with_cuprite: true dopage.find_test_selector('add-custom-option').clickwait_for_reload- expect(page).to have_selector('.custom-option-row', count: 6)+ expect(page).to have_css('.custom-option-row', count: 6)within all(".custom-option-row").last dofind(".custom-option-value input").set "Atari"end@@ -220,7 +237,7 @@ RSpec.describe 'custom fields', js: true, with_cuprite: true doexpect(page).to have_text("Successful update")expect(page).to have_text("Platform")- expect(page).to have_selector('.custom-option-row', count: 6)+ expect(page).to have_css('.custom-option-row', count: 6)%w[Playstation Xbox Nintendo PC Sega Atari].each_with_index do |value, i|expect(page).to have_field("custom_field_custom_options_attributes_#{i}_value", with: value)@@ -230,7 +247,7 @@ RSpec.describe 'custom fields', js: true, with_cuprite: true doit "updates the values and orders of the custom options" doexpect(page).to have_text("Platform")- expect(page).to have_selector('.custom-option-row', count: 4)+ expect(page).to have_css('.custom-option-row', count: 4)%w[Playstation Xbox Nintendo PC].each_with_index do |value, i|expect(page).to have_field("custom_field_custom_options_attributes_#{i}_value", with: value)end@@ -261,8 +278,8 @@ RSpec.describe 'custom fields', js: true, with_cuprite: true doit "shows the correct breadcrumbs" dopage.within_test_selector('op-breadcrumb') do- expect(page).to have_selector('.breadcrumb-item', text: "Work packages")- expect(page).to have_selector('.breadcrumb-item.breadcrumb-item-selected', text: "Platform")+ expect(page).to have_css('.breadcrumb-item', text: "Work packages")+ expect(page).to have_css('.breadcrumb-item.breadcrumb-item-selected', text: "Platform")endenddiff --git a/spec/features/custom_fields/multi_user_custom_field_spec.rb b/spec/features/custom_fields/multi_user_custom_field_spec.rbindex 7bfac9806c0..d00bce17040 100644--- a/spec/features/custom_fields/multi_user_custom_field_spec.rb+++ b/spec/features/custom_fields/multi_user_custom_field_spec.rb@@ -85,7 +85,7 @@ RSpec.describe "multi select custom values", :js, :with_cuprite doexpect(page).to have_text "groupfoo"expect(page).to have_text "PLACEHOLDER"- expect(page).not_to have_text "Da Real"+ expect(page).to have_no_text "Da Real"work_package.reloadcvs = work_package@@ -145,11 +145,11 @@ RSpec.describe "multi select custom values", :js, :with_cuprite doclick_on "Reviewer: Save"wp_page.expect_and_dismiss_toaster(message: "Successful update.")- expect(page).to have_selector('.custom-option', count: 2)+ expect(page).to have_css('.custom-option', count: 2)expect(page).to have_text custom_field.nameexpect(page).to have_text "Billy Nobbler"- expect(page).not_to have_text "Anton Lupin"+ expect(page).to have_no_text "Anton Lupin"expect(page).to have_text "Cooper Quatermaine"endenddiff --git a/spec/features/custom_fields/multi_value_custom_field_spec.rb b/spec/features/custom_fields/multi_value_custom_field_spec.rbindex 3ff7a81b3c9..78a911c52f1 100644--- a/spec/features/custom_fields/multi_value_custom_field_spec.rb+++ b/spec/features/custom_fields/multi_value_custom_field_spec.rb@@ -1,9 +1,7 @@require "spec_helper"require "support/pages/work_packages/abstract_work_package"-RSpec.describe "multi select custom values",- js: true,- with_cuprite: true do+RSpec.describe "multi select custom values", :js, :with_cuprite dolet(:type) { create(:type) }let(:wp_page) { Pages::FullWorkPackage.new work_package }let(:wp_table) { Pages::WorkPackagesTable.new project }@@ -89,12 +87,12 @@ RSpec.describe "multi select custom values",edit_field.submit_by_dashboard- expect(page).to have_selector('.custom-option.-multiple-lines', count: 3)+ expect(page).to have_css('.custom-option.-multiple-lines', count: 3)expect(page).to have_text "Successful update"expect(page).to have_text custom_field.nameexpect(page).to have_text "ham"- expect(page).not_to have_text "pineapple"+ expect(page).to have_no_text "pineapple"expect(page).to have_text "onions"expect(page).to have_text "mushrooms"end@@ -130,16 +128,16 @@ RSpec.describe "multi select custom values",# Should show truncated valuesexpect(page).to have_text "ham, pineapple, ...3"- expect(page).not_to have_text "onions"+ expect(page).to have_no_text "onions"# Group by the CFgroup_by.enable_via_menu 'Ingredients'loading_indicator_saveguard# Expect changed groups- expect(page).to have_selector('.group--value .count', count: 2)- expect(page).to have_selector('.group--value', text: 'ham, onions, pineapple (1)')- expect(page).to have_selector('.group--value', text: 'ham (1)')+ expect(page).to have_css('.group--value .count', count: 2)+ expect(page).to have_css('.group--value', text: 'ham, onions, pineapple (1)')+ expect(page).to have_css('.group--value', text: 'ham (1)')wp1_field.activate!@@ -151,8 +149,8 @@ RSpec.describe "multi select custom values",wp_page.expect_and_dismiss_toaster message: 'Successful update'# Expect changed groups- expect(page).to have_selector('.group--value .count', count: 1)- expect(page).to have_selector('.group--value', text: 'ham (2)')+ expect(page).to have_css('.group--value .count', count: 1)+ expect(page).to have_css('.group--value', text: 'ham (2)')# Open split viewsplit_view = wp_table.open_split_view work_package@@ -169,9 +167,9 @@ RSpec.describe "multi select custom values",wp1_field.expect_state_text '-'# Expect changed groups- expect(page).to have_selector('.group--value .count', count: 2)- expect(page).to have_selector('.group--value', text: '- (1)')- expect(page).to have_selector('.group--value', text: 'ham (1)')+ expect(page).to have_css('.group--value .count', count: 2)+ expect(page).to have_css('.group--value', text: '- (1)')+ expect(page).to have_css('.group--value', text: 'ham (1)')# Activate againfield.activate!@@ -182,9 +180,9 @@ RSpec.describe "multi select custom values",field.submit_by_dashboard# Expect changed groups- expect(page).to have_selector('.group--value .count', count: 2)- expect(page).to have_selector('.group--value', text: 'ham, onions (1)')- expect(page).to have_selector('.group--value', text: 'ham (1)')+ expect(page).to have_css('.group--value .count', count: 2)+ expect(page).to have_css('.group--value', text: 'ham, onions (1)')+ expect(page).to have_css('.group--value', text: 'ham (1)')expect(field.display_element).to have_text('ham')expect(field.display_element).to have_text('onions')@@ -201,9 +199,9 @@ RSpec.describe "multi select custom values",expect(field.display_element).to have_text('mushrooms')# Expect changed groups- expect(page).to have_selector('.group--value .count', count: 2)- expect(page).to have_selector('.group--value', text: 'ham, mushrooms, onions, pineapple (1)')- expect(page).to have_selector('.group--value', text: 'ham (1)')+ expect(page).to have_css('.group--value .count', count: 2)+ expect(page).to have_css('.group--value', text: 'ham, mushrooms, onions, pineapple (1)')+ expect(page).to have_css('.group--value', text: 'ham (1)')wp1_field.expect_state_text ", ...4"enddiff --git a/spec/features/custom_fields/multi_version_custom_field_spec.rb b/spec/features/custom_fields/multi_version_custom_field_spec.rbindex 484becbcda6..1fa7fbff6b6 100644--- a/spec/features/custom_fields/multi_version_custom_field_spec.rb+++ b/spec/features/custom_fields/multi_version_custom_field_spec.rb@@ -1,7 +1,7 @@require "spec_helper"require "support/pages/work_packages/abstract_work_package"-RSpec.describe "multi version custom field", js: true do+RSpec.describe "multi version custom field", :js doshared_let(:admin) { create(:admin) }let(:current_user) { admin }let(:wp_page) { Pages::FullWorkPackage.new work_package }@@ -67,8 +67,8 @@ RSpec.describe "multi version custom field", js: true dowp_page.expect_and_dismiss_toaster(message: "Successful update.")expect(page).to have_text "Version Old"- expect(page).not_to have_text "Version Current"- expect(page).not_to have_text "Version Future"+ expect(page).to have_no_text "Version Current"+ expect(page).to have_no_text "Version Future"work_package.reload@@ -105,12 +105,12 @@ RSpec.describe "multi version custom field", js: true doclick_on "Fix version: Save"wp_page.expect_and_dismiss_toaster(message: "Successful update.")# .customField<ID> above is required to ignore Assignee and Accountable which are not interesting for us.- expect(page).to have_selector(".customField#{custom_field.id} .custom-option", count: 2)+ expect(page).to have_css(".customField#{custom_field.id} .custom-option", count: 2)expect(page).to have_text custom_field.nameexpect(page).to have_text "Version Current"expect(page).to have_text "Version Future"- expect(page).not_to have_text "Version Old"+ expect(page).to have_no_text "Version Old"endendenddiff --git a/spec/features/custom_fields/non_open_version_custom_field_spec.rb b/spec/features/custom_fields/non_open_version_custom_field_spec.rbindex bd67c470417..52db22192ba 100644--- a/spec/features/custom_fields/non_open_version_custom_field_spec.rb+++ b/spec/features/custom_fields/non_open_version_custom_field_spec.rb@@ -48,9 +48,9 @@ RSpec.describe "support for non-open version values in version custom field", :jwp_page.expect_and_dismiss_toaster(message: "Successful update.")expect(page).to have_text custom_field.name- expect(page).not_to have_text "Version Open"+ expect(page).to have_no_text "Version Open"expect(page).to have_text "Version Locked"- expect(page).not_to have_text "Version Closed"+ expect(page).to have_no_text "Version Closed"work_package.reload@@ -109,7 +109,7 @@ RSpec.describe "support for non-open version values in version custom field", :jexpect(page).to have_text custom_field.nameexpect(page).to have_text "Version Open"expect(page).to have_text "Version Locked"- expect(page).not_to have_text "Version Closed"+ expect(page).to have_no_text "Version Closed"work_package.reload@@ -158,8 +158,8 @@ RSpec.describe "support for non-open version values in version custom field", :j# We'll just check the options and nothing more, the rest is checked elsewherecf_edit_field.activate!expect(page).to have_text "Version Open"- expect(page).not_to have_text "Version Locked"- expect(page).not_to have_text "Version Closed"+ expect(page).to have_no_text "Version Locked"+ expect(page).to have_no_text "Version Closed"endendenddiff --git a/spec/features/custom_fields/reorder_options_spec.rb b/spec/features/custom_fields/reorder_options_spec.rbindex 706d34e1bdc..a3ffa99f9e1 100644--- a/spec/features/custom_fields/reorder_options_spec.rb+++ b/spec/features/custom_fields/reorder_options_spec.rb@@ -13,7 +13,7 @@ def get_possible_values_reordered(amount)get_possible_values(amount).sortend-RSpec.describe 'Reordering custom options of a list custom field', js: true do+RSpec.describe 'Reordering custom options of a list custom field', :js dolet(:user) { create(:admin) }let(:cf_page) { Pages::CustomFields.new }@@ -38,7 +38,7 @@ RSpec.describe 'Reordering custom options of a list custom field', js: true doclick_link 'Reorder values alphabetically'cf_page.accept_alert_dialog!- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_update))+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_successful_update))expect(custom_field.custom_options.order(:position).pluck(:value)).to eq get_possible_values_reordered(200)enddiff --git a/spec/features/errors/errors_handler_spec.rb b/spec/features/errors/errors_handler_spec.rbindex 47095353a51..a8d227a7cb3 100644--- a/spec/features/errors/errors_handler_spec.rb+++ b/spec/features/errors/errors_handler_spec.rb@@ -7,7 +7,7 @@ RSpec.describe 'Errors handling' dovisit '/500'expect(page).to have_current_path '/500'expect(page).to have_text "An error occurred on the page you were trying to access."- expect(page).not_to have_text "Oh no, this is an internal error!"+ expect(page).to have_no_text "Oh no, this is an internal error!"endit 'renders the not found page' dodiff --git a/spec/features/forums/attachment_upload_spec.rb b/spec/features/forums/attachment_upload_spec.rbindex 379896c3b4b..5cf00c74156 100644--- a/spec/features/forums/attachment_upload_spec.rb+++ b/spec/features/forums/attachment_upload_spec.rb@@ -63,7 +63,7 @@ RSpec.describe 'Upload attachment to forum message', :js doclick_button 'Create'- expect(page).to have_selector('#content .wiki img', count: 1)+ expect(page).to have_css('#content .wiki img', count: 1)expect(page).to have_content('Image uploaded on creation')attachments_list.expect_attached('image.png')@@ -83,7 +83,7 @@ RSpec.describe 'Upload attachment to forum message', :js doclick_button 'Save'- expect(page).to have_selector('#content .wiki img', count: 2)+ expect(page).to have_css('#content .wiki img', count: 2)expect(page).to have_content('Image uploaded on creation')expect(page).to have_content('Image uploaded the second time')diff --git a/spec/features/forums/message_spec.rb b/spec/features/forums/message_spec.rbindex ea868ad0997..5c3cceb7f5e 100644--- a/spec/features/forums/message_spec.rb+++ b/spec/features/forums/message_spec.rb@@ -158,7 +158,7 @@ RSpec.describe 'messages', :js dosubject: 'And now to something completely different',content: 'No, there really isn\'t')- expect(page).to have_selector('blockquote', text: 'But, but there should be one')+ expect(page).to have_css('blockquote', text: 'But, but there should be one')# Quoting the first messageshow_page.quote(subject: 'Also quoting the first message',diff --git a/spec/features/forums/sticky_spec.rb b/spec/features/forums/sticky_spec.rbindex bd419119399..424ba63080c 100644--- a/spec/features/forums/sticky_spec.rb+++ b/spec/features/forums/sticky_spec.rb@@ -60,7 +60,7 @@ RSpec.describe 'sticky messages' dodef expect_order_of_messages(*order)order.each_with_index do |message, index|- expect(page).to have_selector("table tbody tr:nth-of-type(#{index + 1})", text: message.subject)+ expect(page).to have_css("table tbody tr:nth-of-type(#{index + 1})", text: message.subject)endenddiff --git a/spec/features/global_roles/global_create_project_spec.rb b/spec/features/global_roles/global_create_project_spec.rbindex 7d5acafb930..8a6046568c3 100644--- a/spec/features/global_roles/global_create_project_spec.rb+++ b/spec/features/global_roles/global_create_project_spec.rb@@ -48,8 +48,8 @@ RSpec.describe 'Global role: Global Create project',# Then I should not see "Create project"it 'does not show the global permission' dovisit edit_role_path(role)- expect(page).to have_selector('.form--label-with-check-box', text: 'Edit project')- expect(page).not_to have_selector('.form--label-with-check-box', text: 'Create project')+ expect(page).to have_css('.form--label-with-check-box', text: 'Edit project')+ expect(page).to have_no_css('.form--label-with-check-box', text: 'Create project')endend@@ -65,8 +65,8 @@ RSpec.describe 'Global role: Global Create project',it 'does show the global permission' dovisit edit_role_path(role)- expect(page).not_to have_selector('.form--label-with-check-box', text: 'Edit project')- expect(page).to have_selector('.form--label-with-check-box', text: 'Create project')+ expect(page).to have_no_css('.form--label-with-check-box', text: 'Edit project')+ expect(page).to have_css('.form--label-with-check-box', text: 'Create project')endenddiff --git a/spec/features/global_roles/global_role_assignment_spec.rb b/spec/features/global_roles/global_role_assignment_spec.rbindex b95ad35210b..c60b414f584 100644--- a/spec/features/global_roles/global_role_assignment_spec.rb+++ b/spec/features/global_roles/global_role_assignment_spec.rb@@ -29,9 +29,7 @@require 'spec_helper'require_relative 'mock_global_permissions'-RSpec.describe 'Global role: Global role assignment',- js: true,- with_cuprite: true do+RSpec.describe 'Global role: Global role assignment', :js, :with_cuprite dobefore dologin_as current_userend@@ -62,7 +60,7 @@ RSpec.describe 'Global role: Global role assignment',# And I should not see "global_role1" within "#available_principal_roles"# And I should see "global_role2" within "#available_principal_roles"page.within('#available_principal_roles') do- expect(page).not_to have_text 'global_role1'+ expect(page).to have_no_text 'global_role1'expect(page).to have_text 'global_role2'end@@ -83,8 +81,8 @@ RSpec.describe 'Global role: Global role assignment',# And I should not see "global_role1" within "#available_principal_roles"# And I should not see "global_role2" within "#available_principal_roles"page.within('#available_principal_roles') do- expect(page).not_to have_text 'global_role1'- expect(page).not_to have_text 'global_role2'+ expect(page).to have_no_text 'global_role1'+ expect(page).to have_no_text 'global_role2'end# And I delete the assigned role "global_role1"@@ -98,13 +96,13 @@ RSpec.describe 'Global role: Global role assignment',# And I should not see "global_role2" within "#available_principal_roles"page.within('#available_principal_roles') doexpect(page).to have_text 'global_role1'- expect(page).not_to have_text 'global_role2'+ expect(page).to have_no_text 'global_role2'end# And I should not see "global_role1" within "#table_principal_roles"# And I should see "global_role1" within "#table_principal_roles"page.within('#table_principal_roles') do- expect(page).not_to have_text 'global_role1'+ expect(page).to have_no_text 'global_role1'expect(page).to have_text 'global_role2'endenddiff --git a/spec/features/global_roles/global_role_crud_spec.rb b/spec/features/global_roles/global_role_crud_spec.rbindex 9d4dd7f3abd..57150cfc011 100644--- a/spec/features/global_roles/global_role_crud_spec.rb+++ b/spec/features/global_roles/global_role_crud_spec.rb@@ -29,9 +29,7 @@require 'spec_helper'require_relative 'mock_global_permissions'-RSpec.describe 'Global role: Global role CRUD',- js: true,- with_cuprite: true do+RSpec.describe 'Global role: Global role CRUD', :js, :with_cuprite do# Scenario: Global Role creation# Given there is the global permission "glob_test" of the module "global_group"include_context 'with mocked global permissions', [['glob_test', { project_module: 'global_group' }]]@@ -46,17 +44,17 @@ RSpec.describe 'Global role: Global role CRUD',# When I go to the new page of "Role"visit new_role_path# Then I should not see block with "#global_permissions"- expect(page).not_to have_selector('.form--fieldset-legend', text: 'GLOBAL')+ expect(page).to have_no_css('.form--fieldset-legend', text: 'GLOBAL')# When I check "Global role"check 'Global role'# Then I should see block with "#global_permissions"- expect(page).to have_selector('.form--fieldset-legend', text: 'GLOBAL')+ expect(page).to have_css('.form--fieldset-legend', text: 'GLOBAL')# And I should see "Global group"expect(page).to have_text 'GLOBAL GROUP'# And I should see "Glob test"expect(page).to have_text 'Glob test'# And I should not see "Issues can be assigned to this role"- expect(page).not_to have_text 'Issues can be assigned to this role'+ expect(page).to have_no_text 'Issues can be assigned to this role'# When I fill in "Name" with "Manager"fill_in 'Name', with: 'Manager'# And I click on "Create"diff --git a/spec/features/global_roles/global_role_update_spec.rb b/spec/features/global_roles/global_role_update_spec.rbindex 82538980509..3ed2c1eb856 100644--- a/spec/features/global_roles/global_role_update_spec.rb+++ b/spec/features/global_roles/global_role_update_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Role updating', js: true, with_cuprite: true do+RSpec.describe 'Role updating', :js, :with_cuprite dolet!(:admin) { create(:admin) }before dodiff --git a/spec/features/global_roles/member_roles_spec.rb b/spec/features/global_roles/member_roles_spec.rbindex cf9cd08a4f1..5798f463586 100644--- a/spec/features/global_roles/member_roles_spec.rb+++ b/spec/features/global_roles/member_roles_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'Global role: Unchanged Member Roles',- js: true,- with_cuprite: true do+RSpec.describe 'Global role: Unchanged Member Roles', :js, :with_cuprite dolet(:admin) { create(:admin) }let(:project) { create(:project) }let!(:role) { create(:project_role, name: 'MemberRole1') }diff --git a/spec/features/global_roles/no_module_spec.rb b/spec/features/global_roles/no_module_spec.rbindex 71ad8613cc0..419070cd8c2 100644--- a/spec/features/global_roles/no_module_spec.rb+++ b/spec/features/global_roles/no_module_spec.rb@@ -29,9 +29,7 @@require 'spec_helper'require_relative 'mock_global_permissions'-RSpec.describe 'Global role: No module',- js: true,- with_cuprite: true do+RSpec.describe 'Global role: No module', :js, :with_cuprite dolet(:admin) { create(:admin) }let(:project) { create(:project) }let!(:role) { create(:project_role) }@@ -54,6 +52,6 @@ RSpec.describe 'Global role: No module',visit project_settings_modules_path(project)expect(page).to have_text 'Activity'- expect(page).not_to have_text 'Foo'+ expect(page).to have_no_text 'Foo'endenddiff --git a/spec/features/groups/group_memberships_spec.rb b/spec/features/groups/group_memberships_spec.rbindex 4dbec3db9fe..6044195abe7 100644--- a/spec/features/groups/group_memberships_spec.rb+++ b/spec/features/groups/group_memberships_spec.rb@@ -166,8 +166,8 @@ RSpec.describe 'group memberships through groups page', :js, :with_cuprite dogroup_page.open_projects_tab!target_dropdown = group_page.search_for_project 'project'- expect(target_dropdown).to have_selector(".ng-option", text: 'Other project')- expect(target_dropdown).not_to have_selector(".ng-option", text: 'Archived project')+ expect(target_dropdown).to have_css(".ng-option", text: 'Other project')+ expect(target_dropdown).to have_no_css(".ng-option", text: 'Archived project')endendenddiff --git a/spec/features/groups/group_show_spec.rb b/spec/features/groups/group_show_spec.rbindex 69da1359a4b..bd401582d25 100644--- a/spec/features/groups/group_show_spec.rb+++ b/spec/features/groups/group_show_spec.rb@@ -42,9 +42,9 @@ RSpec.describe 'group show page' doit 'I can visit the group page' dovisit show_group_path(group)- expect(page).to have_selector('h2', text: "Bob's Team")- expect(page).to have_selector('.toolbar-item', text: 'Edit')- expect(page).to have_selector('li', text: member.name)+ expect(page).to have_css('h2', text: "Bob's Team")+ expect(page).to have_css('.toolbar-item', text: 'Edit')+ expect(page).to have_css('li', text: member.name)endend@@ -53,9 +53,9 @@ RSpec.describe 'group show page' doit 'I can visit the group page' dovisit show_group_path(group)- expect(page).to have_selector('h2', text: "Bob's Team")- expect(page).not_to have_selector('.toolbar-item')- expect(page).not_to have_selector('li', text: member.name)+ expect(page).to have_css('h2', text: "Bob's Team")+ expect(page).to have_no_css('.toolbar-item')+ expect(page).to have_no_css('li', text: member.name)endendenddiff --git a/spec/features/groups/groups_spec.rb b/spec/features/groups/groups_spec.rbindex 3628cde31e3..9fc76a04a08 100644--- a/spec/features/groups/groups_spec.rb+++ b/spec/features/groups/groups_spec.rb@@ -45,7 +45,7 @@ RSpec.describe 'group memberships through groups page', :js, :with_cuprite dogroups_page.delete_group! "Bob's Team"- expect(page).to have_selector('.op-toast.-info', text: I18n.t(:notice_deletion_scheduled))+ expect(page).to have_css('.op-toast.-info', text: I18n.t(:notice_deletion_scheduled))expect(groups_page).to have_group "Bob's Team"perform_enqueued_jobsdiff --git a/spec/features/homescreen/index_spec.rb b/spec/features/homescreen/index_spec.rbindex 19d2cdc5cc0..2a20840dafe 100644--- a/spec/features/homescreen/index_spec.rb+++ b/spec/features/homescreen/index_spec.rb@@ -55,13 +55,13 @@ RSpec.describe 'Homescreen', 'index', :with_cuprite dologin_as uservisit root_urlexpect(page)- .to have_selector("a[href=\"#{OpenProject::Application.root_url}/projects/public-project\"]")+ .to have_css("a[href=\"#{OpenProject::Application.root_url}/projects/public-project\"]")click_link "a link to the public project"expect(page).to have_current_path project_path(project)end- it 'can change the welcome text and still have a valid link', js: true do+ it 'can change the welcome text and still have a valid link', :js dologin_as admingeneral_settings_page.visit!@@ -75,7 +75,7 @@ RSpec.describe 'Homescreen', 'index', :with_cuprite dovisit root_urlexpect(page)- .to have_selector("a[href=\"#{OpenProject::Application.root_url}/projects/public-project\"]")+ .to have_css("a[href=\"#{OpenProject::Application.root_url}/projects/public-project\"]")click_link "a link to the public project"expect(page).to have_current_path /#{Regexp.escape(project_path(project))}\/?$/diff --git a/spec/features/ldap_auth_sources/crud_spec.rb b/spec/features/ldap_auth_sources/crud_spec.rbindex 326d5da16f2..24a66d38277 100644--- a/spec/features/ldap_auth_sources/crud_spec.rb+++ b/spec/features/ldap_auth_sources/crud_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'CRUD LDAP connections',- js: true,- with_cuprite: true do+RSpec.describe 'CRUD LDAP connections', :js, :with_cuprite doshared_let(:admin) { create(:admin) }let(:ldap_page) { Pages::Admin::LdapAuthSources::Index.new }@@ -57,8 +55,8 @@ RSpec.describe 'CRUD LDAP connections',click_on 'Create'ldap_page.expect_and_dismiss_toaster message: 'Successful creation.'- expect(page).to have_selector('td.name', text: 'My LDAP connection')- expect(page).to have_selector('td.host', text: 'localhost')+ expect(page).to have_css('td.name', text: 'My LDAP connection')+ expect(page).to have_css('td.host', text: 'localhost')created_connection = LdapAuthSource.lastconnection = created_connection.dup@@ -77,11 +75,11 @@ RSpec.describe 'CRUD LDAP connections',ldap_page.expect_and_dismiss_toaster message: 'Successful deletion.'- expect(page).not_to have_text 'My LDAP connection'+ expect(page).to have_no_text 'My LDAP connection'expect(page).to have_text 'Admin connection'page.within("#ldap-auth-source-#{connection.id}") do- expect(page).not_to have_link 'Delete'+ expect(page).to have_no_link 'Delete'endpage.within("#ldap-auth-source-#{connection.id}") do@@ -93,7 +91,7 @@ RSpec.describe 'CRUD LDAP connections',click_on 'Save'ldap_page.expect_and_dismiss_toaster message: 'Successful update.'- expect(page).to have_selector('td.name', text: 'Updated Admin connection')+ expect(page).to have_css('td.name', text: 'Updated Admin connection')endcontext 'when providing seed variables',@@ -115,7 +113,7 @@ RSpec.describe 'CRUD LDAP connections',expect(page).to have_text(I18n.t(:label_seeded_from_env_warning))expect(page).to have_field('ldap_auth_source_name', with: 'foobar', disabled: true)- expect(page).not_to have_button 'Save'+ expect(page).to have_no_button 'Save'endendenddiff --git a/spec/features/members/error_messages_spec.rb b/spec/features/members/error_messages_spec.rbindex c6b207109c3..6c3646bdf5a 100644--- a/spec/features/members/error_messages_spec.rb+++ b/spec/features/members/error_messages_spec.rb@@ -43,7 +43,7 @@ RSpec.describe 'Group memberships through groups page' doendshared_examples 'errors when adding members' do- it 'adding a role without a principal', js: true do+ it 'adding a role without a principal', :js domembers_page.visit!expect_angular_frontend_initializedmembers_page.add_user! nil, as: 'Manager'diff --git a/spec/features/members/invitation_spec.rb b/spec/features/members/invitation_spec.rbindex 41e90b6a1f3..53629341fb9 100644--- a/spec/features/members/invitation_spec.rb+++ b/spec/features/members/invitation_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'invite user via email', js: true do+RSpec.describe 'invite user via email', :js dolet!(:project) { create(:project, name: 'Project 1', identifier: 'project1', members: project_members) }let!(:developer) { create(:project_role, name: 'Developer') }let(:project_members) { {} }@@ -86,8 +86,8 @@ RSpec.describe 'invite user via email', js: true domembers_page.search_and_select_principal! '[email protected]','Send invite to [email protected]'- expect(members_page).not_to have_text sanitize_string(I18n.t(:warning_user_limit_reached)),- normalize_ws: true+ expect(members_page).to have_no_text sanitize_string(I18n.t(:warning_user_limit_reached)),+ normalize_ws: truemembers_page.search_and_select_principal! '[email protected]','Send invite to [email protected]'diff --git a/spec/features/members/membership_filter_spec.rb b/spec/features/members/membership_filter_spec.rbindex ad00142b074..1d96a2e9d29 100644--- a/spec/features/members/membership_filter_spec.rb+++ b/spec/features/members/membership_filter_spec.rb@@ -63,19 +63,19 @@ RSpec.describe 'group memberships through groups page', :js domembers_page.search_for_name 'pan'members_page.find_user 'Pan Hannibal'- expect(page).not_to have_selector('td.mail', text: hannibal.mail)+ expect(page).to have_no_css('td.mail', text: hannibal.mail)members_page.find_user 'Peter Pan'members_page.find_mail peter.mailmembers_page.search_for_name '@example'members_page.find_user 'Pan Hannibal'- expect(page).not_to have_selector('td.mail', text: hannibal.mail)+ expect(page).to have_no_css('td.mail', text: hannibal.mail)members_page.find_user 'Peter Pan'members_page.find_mail peter.mailmembers_page.search_for_name '@example.org'members_page.find_user 'Peter Pan'members_page.find_mail peter.mail- expect(page).not_to have_selector('td.mail', text: hannibal.mail)+ expect(page).to have_no_css('td.mail', text: hannibal.mail)endenddiff --git a/spec/features/members/membership_spec.rb b/spec/features/members/membership_spec.rbindex 135b5b60ef6..304f708083e 100644--- a/spec/features/members/membership_spec.rb+++ b/spec/features/members/membership_spec.rb@@ -100,8 +100,8 @@ RSpec.describe 'Administrating memberships via the project settings', :js, :withexpect(members_page.contents('status', raw: true)).to eq %w(invited active active)# Cannot sort by group, roles or status- expect(page).not_to have_selector('.generic-table--sort-header a', text: 'ROLES')- expect(page).not_to have_selector('.generic-table--sort-header a', text: 'GROUP')+ expect(page).to have_no_css('.generic-table--sort-header a', text: 'ROLES')+ expect(page).to have_no_css('.generic-table--sort-header a', text: 'GROUP')endit 'navigating the menu' do@@ -143,7 +143,7 @@ RSpec.describe 'Administrating memberships via the project settings', :js, :withmembers_page.add_user! 'A-Team', as: 'Manager'expect(members_page).to have_added_group('A-Team')- expect(page).to have_selector '.op-avatar_group'+ expect(page).to have_css '.op-avatar_group'SeleniumHubWaiter.waitmembers_page.remove_group! 'A-Team'@@ -155,7 +155,7 @@ RSpec.describe 'Administrating memberships via the project settings', :js, :withmembers_page.add_user! 'Hannibal Smith', as: 'Manager'expect(members_page).to have_added_user 'Hannibal Smith'- expect(page).to have_selector '.op-avatar_user'+ expect(page).to have_css '.op-avatar_user'SeleniumHubWaiter.waitmembers_page.remove_user! 'Hannibal Smith'@@ -167,7 +167,7 @@ RSpec.describe 'Administrating memberships via the project settings', :js, :withmembers_page.add_user! developer_placeholder.name, as: developer.nameexpect(members_page).to have_added_user developer_placeholder.name- expect(page).to have_selector '.op-avatar_placeholder-user'+ expect(page).to have_css '.op-avatar_placeholder-user'SeleniumHubWaiter.waitmembers_page.remove_user! developer_placeholder.namediff --git a/spec/features/members/pagination_spec.rb b/spec/features/members/pagination_spec.rbindex 4e7f9674647..56f0b6b2636 100644--- a/spec/features/members/pagination_spec.rb+++ b/spec/features/members/pagination_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'members pagination', js: true do+RSpec.describe 'members pagination', :js doshared_let(:admin) { create(:admin) }let(:project) docreate(:project,diff --git a/spec/features/menu_items/help_menu_spec.rb b/spec/features/menu_items/help_menu_spec.rbindex 157f465d736..2e9c27e3974 100644--- a/spec/features/menu_items/help_menu_spec.rb+++ b/spec/features/menu_items/help_menu_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'Help menu items',- js: true,- with_cuprite: true do+RSpec.describe 'Help menu items', :js, :with_cuprite dolet(:user) { create(:admin) }let(:help_item) { find('.op-app-help .op-app-menu--item-action') }let(:help_menu_dropdown_selector) { '.op-app-menu--dropdown.op-menu' }@@ -45,8 +43,8 @@ RSpec.describe 'Help menu items',help_item.click- expect(page).to have_selector('.op-app-help .op-menu--item-action',- text: I18n.t('homescreen.links.user_guides'))+ expect(page).to have_css('.op-app-help .op-menu--item-action',+ text: I18n.t('homescreen.links.user_guides'))endend@@ -62,7 +60,7 @@ RSpec.describe 'Help menu items',visit home_pathexpect(help_item[:href]).to eq(custom_url)- expect(page).not_to have_selector('.op-app-help .op-app-menu--dropdown', visible: false)+ expect(page).to have_no_css('.op-app-help .op-app-menu--dropdown', visible: false)endenddiff --git a/spec/features/menu_items/menu_permissions_spec.rb b/spec/features/menu_items/menu_permissions_spec.rbindex 833b9504d67..de1aba6a07c 100644--- a/spec/features/menu_items/menu_permissions_spec.rb+++ b/spec/features/menu_items/menu_permissions_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'menu permissions',- js: true,- with_cuprite: true do+RSpec.describe 'menu permissions', :js, :with_cuprite dolet(:user) docreate(:user,member_with_permissions: { project => %i[manage_versions view_work_packages] })@@ -48,14 +46,14 @@ RSpec.describe 'menu permissions',endit 'I can see all menu entries' do- expect(page).to have_selector('#menu-sidebar .op-menu--item-title', text: 'Versions')- expect(page).to have_selector('#menu-sidebar .op-menu--item-title', text: 'Information')- expect(page).to have_selector('#menu-sidebar .op-menu--item-title', text: 'Modules')+ expect(page).to have_css('#menu-sidebar .op-menu--item-title', text: 'Versions')+ expect(page).to have_css('#menu-sidebar .op-menu--item-title', text: 'Information')+ expect(page).to have_css('#menu-sidebar .op-menu--item-title', text: 'Modules')endspecify 'the parent node directs to the general settings page' do# The settings menu item exists- expect(page).to have_selector('#menu-sidebar .main-item-wrapper', text: 'Project settings', visible: false)+ expect(page).to have_css('#menu-sidebar .main-item-wrapper', text: 'Project settings', visible: false)# Clicking the menu parent item leads to the version pagefind('.main-menu--parent-node', text: 'Project settings').click@@ -72,14 +70,14 @@ RSpec.describe 'menu permissions',endit 'I can only see the version settings page' do- expect(page).to have_selector('#menu-sidebar .op-menu--item-title', text: 'Versions')- expect(page).not_to have_selector('#menu-sidebar .op-menu--item-title', text: 'Information')- expect(page).not_to have_selector('#menu-sidebar .op-menu--item-title', text: 'Modules')+ expect(page).to have_css('#menu-sidebar .op-menu--item-title', text: 'Versions')+ expect(page).to have_no_css('#menu-sidebar .op-menu--item-title', text: 'Information')+ expect(page).to have_no_css('#menu-sidebar .op-menu--item-title', text: 'Modules')endspecify 'the parent node directs to the only visible children page' do# The settings menu item exists- expect(page).to have_selector('#menu-sidebar .main-item-wrapper', text: 'Project settings', visible: false)+ expect(page).to have_css('#menu-sidebar .main-item-wrapper', text: 'Project settings', visible: false)# Clicking the menu parent item leads to the version pagefind('.main-menu--parent-node', text: 'Project settings').clickdiff --git a/spec/features/menu_items/query_menu_item_spec.rb b/spec/features/menu_items/query_menu_item_spec.rbindex 454f6eef44a..e03c144309f 100644--- a/spec/features/menu_items/query_menu_item_spec.rb+++ b/spec/features/menu_items/query_menu_item_spec.rb@@ -31,9 +31,7 @@ require 'features/page_objects/notification'require 'features/work_packages/shared_contexts'require 'features/work_packages/work_packages_page'-RSpec.describe 'Query menu items',- js: true,- with_cuprite: true do+RSpec.describe 'Query menu items', :js, :with_cuprite dolet(:user) { create(:admin) }let(:project) { create(:project) }let(:work_packages_page) { WorkPackagesPage.new(project) }@@ -95,7 +93,7 @@ RSpec.describe 'Query menu items',click_on 'Save'notification.expect_success('Successful update')- expect(page).to have_selector('.op-sidemenu--item', text: query.name)+ expect(page).to have_css('.op-sidemenu--item', text: query.name)endend@@ -137,7 +135,7 @@ RSpec.describe 'Query menu items',it 'is renaming and reordering the list' do# Renaming the query should also reorder the queries. As it is renamed# from zzzz to aaaa, it should now be the first query menu item.- expect(page).to have_selector('.op-sidemenu--items li:first-child', text: new_name)+ expect(page).to have_css('.op-sidemenu--items li:first-child', text: new_name)endendenddiff --git a/spec/features/menu_items/top_menu_item_spec.rb b/spec/features/menu_items/top_menu_item_spec.rbindex 557496f80c8..46c511999a1 100644--- a/spec/features/menu_items/top_menu_item_spec.rb+++ b/spec/features/menu_items/top_menu_item_spec.rb@@ -39,14 +39,14 @@ RSpec.describe 'Top menu items', :js, :with_cuprite doexpect(page).to have_link(item.label)end(all_items - items).each do |item|- expect(page).not_to have_link(item.label)+ expect(page).to have_no_link(item.label)endendenddef click_link_in_open_menu(title)within '.op-app-menu--dropdown[aria-expanded=true]' do- expect(page).not_to have_css('[style~=overflow]')+ expect(page).to have_no_css('[style~=overflow]')click_link(title)end@@ -180,7 +180,7 @@ RSpec.describe 'Top menu items', :js, :with_cuprite doit 'does not display new_project' doexpect(page).to have_css('a.button', exact_text: all_projects)- expect(page).not_to have_css('a.button', exact_text: add_project)+ expect(page).to have_no_css('a.button', exact_text: add_project)endend@@ -195,7 +195,7 @@ RSpec.describe 'Top menu items', :js, :with_cuprite doendit 'does not show the menu' do- expect(page).not_to have_css('#projects-menu')+ expect(page).to have_no_css('#projects-menu')endendenddiff --git a/spec/features/menu_items/wiki_menu_item_spec.rb b/spec/features/menu_items/wiki_menu_item_spec.rbindex bfff2d7e640..bc60a2f588e 100644--- a/spec/features/menu_items/wiki_menu_item_spec.rb+++ b/spec/features/menu_items/wiki_menu_item_spec.rb@@ -99,12 +99,12 @@ RSpec.describe 'Wiki menu items' doclick_button "Save"expect(page)- .to have_selector('.main-menu--children-menu-header', text: wiki_page.title)+ .to have_css('.main-menu--children-menu-header', text: wiki_page.title)find('.main-menu--arrow-left-to-project').clickexpect(page)- .to have_selector('.main-item-wrapper', text: wiki_page.title)+ .to have_css('.main-item-wrapper', text: wiki_page.title)# clicking the menu item leads to the pageclick_link wiki_page.title@@ -127,10 +127,10 @@ RSpec.describe 'Wiki menu items' do# the other page is now the main headingexpect(page)- .to have_selector('.main-menu--children-menu-header', text: other_wiki_page.title)+ .to have_css('.main-menu--children-menu-header', text: other_wiki_page.title)expect(page)- .to have_selector('.wiki-menu--sub-item', text: 'Custom page name')+ .to have_css('.wiki-menu--sub-item', text: 'Custom page name')click_link 'Custom page name'@@ -141,7 +141,7 @@ RSpec.describe 'Wiki menu items' dofind('.main-menu--arrow-left-to-project').clickexpect(page)- .not_to have_selector('.main-item-wrapper', text: 'Custom page name')+ .to have_no_css('.main-item-wrapper', text: 'Custom page name')# deleting the page will remove the menu itemvisit project_wiki_path(project, wiki_page)@@ -152,7 +152,7 @@ RSpec.describe 'Wiki menu items' doendwithin '#menu-sidebar' do- expect(page).not_to have_content('Custom page name')+ expect(page).to have_no_content('Custom page name')end# removing the menu item which is also the last wiki menu item@@ -173,9 +173,9 @@ RSpec.describe 'Wiki menu items' doclick_button 'Save'expect(page)- .not_to have_selector('.main-menu--children-menu-header', text: other_wiki_page.title)+ .to have_no_css('.main-menu--children-menu-header', text: other_wiki_page.title)expect(page)- .to have_selector('.main-menu--children-menu-header', text: another_wiki_page.title)+ .to have_css('.main-menu--children-menu-header', text: another_wiki_page.title)endenddiff --git a/spec/features/my/autologin_tokens_management_spec.rb b/spec/features/my/autologin_tokens_management_spec.rbindex 4bc0e93af27..ec3c6e4971a 100644--- a/spec/features/my/autologin_tokens_management_spec.rb+++ b/spec/features/my/autologin_tokens_management_spec.rb@@ -45,7 +45,7 @@ RSpec.describe 'My account autologin tokens management', :js, :with_cuprite docontext 'with autologin disabled', with_settings: { autologin: 0 } doit 'does not show tokens' do- expect(page).not_to have_text "Remembered devices"+ expect(page).to have_no_text "Remembered devices"expect(page).not_to have_test_selector('Users::AutoLoginTokens::TableComponent')endend@@ -58,12 +58,12 @@ RSpec.describe 'My account autologin tokens management', :js, :with_cuprite doexpect(trs[0]).to have_text('unknown browser')expect(trs[0]).to have_text('unknown operating system')expect(trs[0]).to have_css('.buttons a')- expect(trs[0]).not_to have_css('.icon-yes')+ expect(trs[0]).to have_no_css('.icon-yes')expect(trs[0]).to have_text format_date(1.year.ago + 1.day)expect(trs[1]).to have_text('Mozilla Firefox (Version 12.3)')expect(trs[1]).to have_text('Linux')- expect(trs[1]).not_to have_css('.icon-yes')+ expect(trs[1]).to have_no_css('.icon-yes')expect(trs[1]).to have_css('.buttons a')expect(trs[1]).to have_text format_date(1.day.from_now)diff --git a/spec/features/my/sessions_management_spec.rb b/spec/features/my/sessions_management_spec.rbindex b901fc70406..20c5171838a 100644--- a/spec/features/my/sessions_management_spec.rb+++ b/spec/features/my/sessions_management_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'My account session management', js: true do+RSpec.describe 'My account session management', :js doinclude Redmine::I18nlet(:user) { create(:user) }@@ -51,18 +51,18 @@ RSpec.describe 'My account session management', js: true doclick_on 'Session management'page.within_test_selector('Users::Sessions::TableComponent') do- expect(page).to have_selector('.generic-table tbody tr', count: 2)+ expect(page).to have_css('.generic-table tbody tr', count: 2)trs = page.all('.generic-table tbody tr')- expect(trs[0]).to have_selector('.icon-yes')+ expect(trs[0]).to have_css('.icon-yes')expect(trs[0]).to have_text('Current session')expect(trs[0]).to have_text('unknown browser')expect(trs[0]).to have_text('unknown operating system')- expect(trs[0]).not_to have_selector('.buttons a')- expect(trs[1]).not_to have_selector('.spot-icon_yes')+ expect(trs[0]).to have_no_css('.buttons a')+ expect(trs[1]).to have_no_css('.spot-icon_yes')expect(trs[1]).to have_text('Mozilla Firefox (Version 12.3)')expect(trs[1]).to have_text('Linux')expect(trs[1]).to have_text format_time(old_session_time)- expect(trs[1]).to have_selector('.buttons a')+ expect(trs[1]).to have_css('.buttons a')trs[1].find('.buttons a').clickend@@ -70,7 +70,7 @@ RSpec.describe 'My account session management', js: true dopage.driver.browser.switch_to.alert.acceptpage.within_test_selector('Users::Sessions::TableComponent') do- expect(page).to have_selector('.generic-table tbody tr', count: 1)+ expect(page).to have_css('.generic-table tbody tr', count: 1)endexpect { user_session.reload }.to raise_error(ActiveRecord::RecordNotFound)diff --git a/spec/features/news/creation_and_commenting_spec.rb b/spec/features/news/creation_and_commenting_spec.rbindex 067d417a177..76ff2000fd2 100644--- a/spec/features/news/creation_and_commenting_spec.rb+++ b/spec/features/news/creation_and_commenting_spec.rb@@ -70,7 +70,7 @@ RSpec.describe 'News creation and commenting', :js, :with_cuprite do.to eq 1expect(ActionMailer::Base.deliveries.last.to)- .to match_array [other_user.mail]+ .to contain_exactly(other_user.mail)expect(ActionMailer::Base.deliveries.last.subject).to include 'My new news'@@ -93,7 +93,7 @@ RSpec.describe 'News creation and commenting', :js, :with_cuprite do.to eq 2expect(ActionMailer::Base.deliveries.last.to)- .to match_array [other_user.mail]+ .to contain_exactly(other_user.mail)expect(ActionMailer::Base.deliveries.last.subject).to include 'My new news'diff --git a/spec/features/news/global_menu_item_spec.rb b/spec/features/news/global_menu_item_spec.rbindex 3c7506069a1..4b68172028c 100644--- a/spec/features/news/global_menu_item_spec.rb+++ b/spec/features/news/global_menu_item_spec.rb@@ -51,7 +51,7 @@ RSpec.describe 'News global menu item spec', :js, :with_cuprite doexpect(page).to have_current_path(news_index_path)within '#main-menu' do- expect(page).to have_selector('.selected', text: 'News')+ expect(page).to have_css('.selected', text: 'News')endendend@@ -61,7 +61,7 @@ RSpec.describe 'News global menu item spec', :js, :with_cuprite doit "doesn't render the menu item" dowithin '#main-menu' do- expect(page).not_to have_link 'News'+ expect(page).to have_no_link 'News'endendenddiff --git a/spec/features/notifications/navigation_spec.rb b/spec/features/notifications/navigation_spec.rbindex 95f79afb89d..28296f3c42c 100644--- a/spec/features/notifications/navigation_spec.rb+++ b/spec/features/notifications/navigation_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe "Notification center navigation", js: true, with_cuprite: true do+RSpec.describe "Notification center navigation", :js, :with_cuprite doshared_association_default(:project) { create(:project) }shared_let(:work_package) { create(:work_package, project:) }diff --git a/spec/features/notifications/notification_center/notification_center_date_alerts_spec.rb b/spec/features/notifications/notification_center/notification_center_date_alerts_spec.rbindex 35b04ea9cbf..f5d25a3b493 100644--- a/spec/features/notifications/notification_center/notification_center_date_alerts_spec.rb+++ b/spec/features/notifications/notification_center/notification_center_date_alerts_spec.rb@@ -2,9 +2,7 @@ require 'spec_helper'require 'features/page_objects/notification'# rubocop:disable RSpec/ScatteredLet-RSpec.describe "Notification center date alerts",- js: true,- with_cuprite: true,+RSpec.describe "Notification center date alerts", :js, :with_cuprite,with_settings: { journal_aggregation_time_minutes: 0 } doinclude ActiveSupport::Testing::TimeHelpersdiff --git a/spec/features/notifications/notification_center/notification_center_spec.rb b/spec/features/notifications/notification_center/notification_center_spec.rbindex eb260d66cc6..e2c10e9dc37 100644--- a/spec/features/notifications/notification_center/notification_center_spec.rb+++ b/spec/features/notifications/notification_center/notification_center_spec.rb@@ -58,7 +58,7 @@ RSpec.describe "Notification center", :js, :with_cuprite,describe 'notification for a new journal' docurrent_user { recipient }- it 'will not show all details of the journal' do+ it 'does not show all details of the journal' dovisit home_pathwait_for_reloadcenter.expect_bell_count 2diff --git a/spec/features/notifications/notification_center/split_screen_spec.rb b/spec/features/notifications/notification_center/split_screen_spec.rbindex bf81b401255..afe4ca0d5e3 100644--- a/spec/features/notifications/notification_center/split_screen_spec.rb+++ b/spec/features/notifications/notification_center/split_screen_spec.rb@@ -1,8 +1,6 @@require 'spec_helper'-RSpec.describe "Split screen in the notification center",- js: true,- with_cuprite: true do+RSpec.describe "Split screen in the notification center", :js, :with_cuprite dolet(:global_html_title) { Components::HtmlTitle.new }let(:center) { Pages::Notifications::Center.new }let(:split_screen) { Pages::Notifications::SplitScreen.new work_package }diff --git a/spec/features/notifications/reminder_mail_spec.rb b/spec/features/notifications/reminder_mail_spec.rbindex 1fd43fffd3c..1ffc320e21a 100644--- a/spec/features/notifications/reminder_mail_spec.rb+++ b/spec/features/notifications/reminder_mail_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'require_relative '../users/notifications/shared_examples'-RSpec.describe "Reminder email sending", js: true, with_cuprite: true do+RSpec.describe "Reminder email sending", :js, :with_cuprite dolet!(:project) { create(:project, members: { current_user => role }) }let!(:mute_project) { create(:project, members: { current_user => role }) }let(:role) { create(:project_role, permissions: %i[view_work_packages]) }diff --git a/spec/features/notifications/settings/immediate_reminder_spec.rb b/spec/features/notifications/settings/immediate_reminder_spec.rbindex 8895e4924ea..8ed9850430b 100644--- a/spec/features/notifications/settings/immediate_reminder_spec.rb+++ b/spec/features/notifications/settings/immediate_reminder_spec.rb@@ -1,8 +1,6 @@require 'spec_helper'-RSpec.describe "Immediate reminder settings",- js: true,- with_cuprite: true do+RSpec.describe "Immediate reminder settings", :js, :with_cuprite doshared_examples 'immediate reminder settings' doit 'allows to configure the reminder settings' do# Save prefs so we can reload them laterdiff --git a/spec/features/notifications/settings/pause_reminder_settings_spec.rb b/spec/features/notifications/settings/pause_reminder_settings_spec.rbindex caa823e3b86..19c5a55cb1c 100644--- a/spec/features/notifications/settings/pause_reminder_settings_spec.rb+++ b/spec/features/notifications/settings/pause_reminder_settings_spec.rb@@ -1,8 +1,6 @@require 'spec_helper'-RSpec.describe "Pause reminder settings",- js: true,- with_cuprite: true do+RSpec.describe "Pause reminder settings", :js, :with_cuprite doshared_examples 'pause reminder settings' dolet(:first) { Time.zone.today.beginning_of_month }let(:last) { (Time.zone.today.beginning_of_month + 10.days) }diff --git a/spec/features/notifications/settings/reminder_email_settings_spec.rb b/spec/features/notifications/settings/reminder_email_settings_spec.rbindex 83e1d1dd1e6..90d933f3f89 100644--- a/spec/features/notifications/settings/reminder_email_settings_spec.rb+++ b/spec/features/notifications/settings/reminder_email_settings_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'require_relative '../../users/notifications/shared_examples'-RSpec.describe "Reminder email", js: true, with_cuprite: true do+RSpec.describe "Reminder email", :js, :with_cuprite doshared_examples 'reminder settings' doit 'allows to configure the reminder settings' do# Configure the digestdiff --git a/spec/features/notifications/settings/workdays_settings_spec.rb b/spec/features/notifications/settings/workdays_settings_spec.rbindex 0a13c99c321..2b3b2ee6b03 100644--- a/spec/features/notifications/settings/workdays_settings_spec.rb+++ b/spec/features/notifications/settings/workdays_settings_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe "Workday notification settings", js: true, with_cuprite: true do+RSpec.describe "Workday notification settings", :js, :with_cuprite doshared_examples 'workday settings' dobefore docurrent_user.language = localediff --git a/spec/features/oauth/authorization_code_flow_spec.rb b/spec/features/oauth/authorization_code_flow_spec.rbindex 94e5a838cd6..01477b34c1f 100644--- a/spec/features/oauth/authorization_code_flow_spec.rb+++ b/spec/features/oauth/authorization_code_flow_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'OAuth authorization code flow',- js: true do+RSpec.describe 'OAuth authorization code flow', :js dolet!(:user) { create(:user) }let!(:redirect_uri) { 'urn:ietf:wg:oauth:2.0:oob' }let!(:allowed_redirect_uri) { redirect_uri }@@ -66,11 +65,11 @@ RSpec.describe 'OAuth authorization code flow',login_with user.login, 'adminADMIN!', visit_signin_path: false# We get to the authorization screen- expect(page).to have_selector('h2', text: 'Authorize Cool API app!')+ expect(page).to have_css('h2', text: 'Authorize Cool API app!')# With the correct scope printed- expect(page).to have_selector('li strong', text: I18n.t('oauth.scopes.api_v3'))- expect(page).to have_selector('li', text: I18n.t('oauth.scopes.api_v3_text'))+ expect(page).to have_css('li strong', text: I18n.t('oauth.scopes.api_v3'))+ expect(page).to have_css('li', text: I18n.t('oauth.scopes.api_v3_text'))SeleniumHubWaiter.wait# Authorize@@ -90,8 +89,8 @@ RSpec.describe 'OAuth authorization code flow',visit my_account_pathclick_on 'Access token'- expect(page).to have_selector("#oauth-application-grant-#{app.id}", text: app.name)- expect(page).to have_selector('td', text: app.name)+ expect(page).to have_css("#oauth-application-grant-#{app.id}", text: app.name)+ expect(page).to have_css('td', text: app.name)# Revoke the applicationwithin("#oauth-application-grant-#{app.id}") do@@ -102,8 +101,8 @@ RSpec.describe 'OAuth authorization code flow',page.driver.browser.switch_to.alert.accept# Should be back on access_token path- expect(page).to have_selector('.op-toast.-success')- expect(page).not_to have_selector("[id^=oauth-application-grant]")+ expect(page).to have_css('.op-toast.-success')+ expect(page).to have_no_css("[id^=oauth-application-grant]")expect(page).to have_current_path /\/my\/access_token/@@ -119,8 +118,8 @@ RSpec.describe 'OAuth authorization code flow',login_with user.login, 'adminADMIN!', visit_signin_path: false# But we got no further- expect(page).to have_selector('.op-toast.-error',- text: 'Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.')+ expect(page).to have_css('.op-toast.-error',+ text: 'Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.')# And also have no grant for this applicationuser.oauth_grants.reload@@ -175,7 +174,7 @@ RSpec.describe 'OAuth authorization code flow',login_with user.login, 'adminADMIN!', visit_signin_path: false# We get to the authorization screen- expect(page).to have_selector('h2', text: 'Authorize Cool API app!')+ expect(page).to have_css('h2', text: 'Authorize Cool API app!')# Authorizefind('input.button[value="Authorize"]').clickdiff --git a/spec/features/oauth/pkce_spec.rb b/spec/features/oauth/pkce_spec.rbindex c7a62bc31ab..35322e39006 100644--- a/spec/features/oauth/pkce_spec.rb+++ b/spec/features/oauth/pkce_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'OAuth authorization code flow with PKCE',- js: true do+RSpec.describe 'OAuth authorization code flow with PKCE', :js dolet!(:user) { create(:user) }let!(:redirect_uri) { 'urn:ietf:wg:oauth:2.0:oob' }let!(:allowed_redirect_uri) { redirect_uri }@@ -83,11 +82,11 @@ RSpec.describe 'OAuth authorization code flow with PKCE',login_with user.login, 'adminADMIN!', visit_signin_path: false# We get to the authorization screen- expect(page).to have_selector('h2', text: 'Authorize Public mobile client')+ expect(page).to have_css('h2', text: 'Authorize Public mobile client')# With the correct scope printed- expect(page).to have_selector('li strong', text: I18n.t('oauth.scopes.api_v3'))- expect(page).to have_selector('li', text: I18n.t('oauth.scopes.api_v3_text'))+ expect(page).to have_css('li strong', text: I18n.t('oauth.scopes.api_v3'))+ expect(page).to have_css('li', text: I18n.t('oauth.scopes.api_v3_text'))SeleniumHubWaiter.wait# Authorize@@ -107,7 +106,7 @@ RSpec.describe 'OAuth authorization code flow with PKCE',visit my_account_pathclick_on 'Access token'- expect(page).to have_selector("#oauth-application-grant-#{app.id}", text: app.name)- expect(page).to have_selector('td', text: app.name)+ expect(page).to have_css("#oauth-application-grant-#{app.id}", text: app.name)+ expect(page).to have_css('td', text: app.name)endenddiff --git a/spec/features/onboarding/onboarding_tour_spec.rb b/spec/features/onboarding/onboarding_tour_spec.rbindex 175c2018ee3..ccd8b8aecf1 100644--- a/spec/features/onboarding/onboarding_tour_spec.rb+++ b/spec/features/onboarding/onboarding_tour_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'onboarding tour for new users', js: true do+RSpec.describe 'onboarding tour for new users', :js dolet(:user) { create(:admin) }let(:project) docreate(:project, name: 'Demo project', identifier: 'demo-project', public: true,@@ -66,7 +66,7 @@ RSpec.describe 'onboarding tour for new users', js: true doit 'I can start the tour without selecting a language' dovisit home_path start_home_onboarding_tour: trueexpect(page).to have_text sanitize_string(I18n.t('js.onboarding.steps.welcome')), normalize_ws: true- expect(page).to have_selector '.enjoyhint_next_btn:not(.enjoyhint_hide)'+ expect(page).to have_css '.enjoyhint_next_btn:not(.enjoyhint_hide)'endcontext 'the tutorial does not start' do@@ -103,7 +103,7 @@ RSpec.describe 'onboarding tour for new users', js: true do# The tutorial appearsexpect(page).to have_text sanitize_string(I18n.t('js.onboarding.steps.welcome')), normalize_ws: true- expect(page).to have_selector '.enjoyhint_next_btn:not(.enjoyhint_hide)'+ expect(page).to have_css '.enjoyhint_next_btn:not(.enjoyhint_hide)'endend@@ -127,21 +127,21 @@ RSpec.describe 'onboarding tour for new users', js: true doit 'directly after the language selection' do# The tutorial appearsexpect(page).to have_text sanitize_string(I18n.t('js.onboarding.steps.welcome')), normalize_ws: true- expect(page).to have_selector '.enjoyhint_next_btn:not(.enjoyhint_hide)'+ expect(page).to have_css '.enjoyhint_next_btn:not(.enjoyhint_hide)'endit 'and I skip the tutorial' dofind('.enjoyhint_skip_btn').click# The tutorial disappears- expect(page).not_to have_text sanitize_string(I18n.t('js.onboarding.steps.welcome')), normalize_ws: true- expect(page).not_to have_selector '.enjoyhint_next_btn'+ expect(page).to have_no_text sanitize_string(I18n.t('js.onboarding.steps.welcome')), normalize_ws: true+ expect(page).to have_no_css '.enjoyhint_next_btn'page.driver.browser.navigate.refresh# The tutorial did not start again- expect(page).not_to have_text sanitize_string(I18n.t('js.onboarding.steps.welcome')), normalize_ws: true- expect(page).not_to have_selector '.enjoyhint_next_btn'+ expect(page).to have_no_text sanitize_string(I18n.t('js.onboarding.steps.welcome')), normalize_ws: true+ expect(page).to have_no_css '.enjoyhint_next_btn'endit 'and I continue the tutorial' dodiff --git a/spec/features/page_objects/notification.rb b/spec/features/page_objects/notification.rbindex 0bcbf791532..d894b34e7df 100644--- a/spec/features/page_objects/notification.rb+++ b/spec/features/page_objects/notification.rb@@ -39,7 +39,7 @@ module PageObjectsdef expect_type(type, message)raise "Unimplemented type #{type}." unless types.include?(type)- expect(page).to have_selector(".op-toast.-#{type}", text: message, wait: 10)+ expect(page).to have_css(".op-toast.-#{type}", text: message, wait: 10)enddef expect_success(message)diff --git a/spec/features/placeholder_users/create_spec.rb b/spec/features/placeholder_users/create_spec.rbindex 264ed370d84..e7209916620 100644--- a/spec/features/placeholder_users/create_spec.rb+++ b/spec/features/placeholder_users/create_spec.rb@@ -40,7 +40,7 @@ RSpec.describe 'create placeholder users', :selenium donew_placeholder_user_page.submit!- expect(page).to have_selector('.op-toast', text: 'Successful creation.')+ expect(page).to have_css('.op-toast', text: 'Successful creation.')new_placeholder_user = PlaceholderUser.order(Arel.sql('id DESC')).firstdiff --git a/spec/features/placeholder_users/delete_spec.rb b/spec/features/placeholder_users/delete_spec.rbindex dbc98751ec0..c3a45a94d60 100644--- a/spec/features/placeholder_users/delete_spec.rb+++ b/spec/features/placeholder_users/delete_spec.rb@@ -35,21 +35,21 @@ RSpec.describe 'delete placeholder user', :js doit 'can delete name' dovisit placeholder_user_path(placeholder_user)- expect(page).to have_selector '.button', text: 'Delete'+ expect(page).to have_css '.button', text: 'Delete'visit edit_placeholder_user_path(placeholder_user)- expect(page).to have_selector '.button', text: 'Delete'+ expect(page).to have_css '.button', text: 'Delete'click_on 'Delete'# Expect to be on delete confirmation- expect(page).to have_selector('.danger-zone--verification button[disabled]')+ expect(page).to have_css('.danger-zone--verification button[disabled]')fill_in 'name_verification', with: placeholder_user.name- expect(page).to have_selector('.danger-zone--verification button:not([disabled])')+ expect(page).to have_css('.danger-zone--verification button:not([disabled])')click_on 'Delete'- expect(page).to have_selector('.op-toast.-info', text: I18n.t(:notice_deletion_scheduled))+ expect(page).to have_css('.op-toast.-info', text: I18n.t(:notice_deletion_scheduled))# The user is still thereplaceholder_user.reload@@ -89,11 +89,11 @@ RSpec.describe 'delete placeholder user', :js dovisit placeholder_user_path(placeholder_user)- expect(page).to have_selector '.button.-disabled', text: 'Delete'+ expect(page).to have_css '.button.-disabled', text: 'Delete'visit edit_placeholder_user_path(placeholder_user)- expect(page).to have_selector '.button.-disabled', text: 'Delete'+ expect(page).to have_css '.button.-disabled', text: 'Delete'endenddiff --git a/spec/features/placeholder_users/edit_placeholder_users_spec.rb b/spec/features/placeholder_users/edit_placeholder_users_spec.rbindex 759202e3634..46f4274f283 100644--- a/spec/features/placeholder_users/edit_placeholder_users_spec.rb+++ b/spec/features/placeholder_users/edit_placeholder_users_spec.rb@@ -35,13 +35,13 @@ RSpec.describe 'edit placeholder users', :js doit 'can edit name' dovisit edit_placeholder_user_path(placeholder_user)- expect(page).to have_selector '#placeholder_user_name'+ expect(page).to have_css '#placeholder_user_name'fill_in 'placeholder_user[name]', with: 'NewName', fill_options: { clear: :backspace }click_on 'Save'- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.')+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.')placeholder_user.reloaddiff --git a/spec/features/placeholder_users/placeholder_user_memberships_spec.rb b/spec/features/placeholder_users/placeholder_user_memberships_spec.rbindex 49ef44eb5f5..1ddabc11b4c 100644--- a/spec/features/placeholder_users/placeholder_user_memberships_spec.rb+++ b/spec/features/placeholder_users/placeholder_user_memberships_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require_relative '../principals/shared_memberships_examples'-RSpec.describe 'placeholder user memberships through placeholder user page', js: true do+RSpec.describe 'placeholder user memberships through placeholder user page', :js doshared_let(:principal) { create(:placeholder_user, name: 'UX Designer') }shared_let(:principal_page) { Pages::Admin::IndividualPrincipals::Edit.new(principal) }diff --git a/spec/features/principals/shared_memberships_examples.rb b/spec/features/principals/shared_memberships_examples.rbindex 13f1c7b9cf4..0221d36bd10 100644--- a/spec/features/principals/shared_memberships_examples.rb+++ b/spec/features/principals/shared_memberships_examples.rb@@ -30,7 +30,7 @@ RSpec.shared_examples 'principal membership management flows' doprincipal_page.expect_project(project.name)principal_page.edit_roles!(member, %w())- expect(page).to have_selector('.op-toast.-error', text: 'Roles need to be assigned.')+ expect(page).to have_css('.op-toast.-error', text: 'Roles need to be assigned.')# Remove the user from the projectprincipal_page.remove_from_project!(project.name)@@ -73,8 +73,8 @@ RSpec.shared_examples 'global user principal membership management flows' do |peprincipal_page.visit!principal_page.open_projects_tab!- expect(page).not_to have_selector('#membership_project_id option', text: project.name, visible: :all)- expect(page).not_to have_selector('#membership_project_id option', text: project2.name, visible: :all)+ expect(page).to have_no_css('#membership_project_id option', text: project.name, visible: :all)+ expect(page).to have_no_css('#membership_project_id option', text: project2.name, visible: :all)endit 'does not show the membership' do@@ -87,10 +87,10 @@ RSpec.shared_examples 'global user principal membership management flows' do |peprincipal_page.visit!principal_page.open_projects_tab!- expect(page).not_to have_selector('tr.member')+ expect(page).to have_no_css('tr.member')expect(page).to have_text 'There is currently nothing to display.'- expect(page).not_to have_text project2.name- expect(page).not_to have_text project2.name+ expect(page).to have_no_text project2.name+ expect(page).to have_no_text project2.nameendendend@@ -106,10 +106,10 @@ RSpec.shared_examples 'global user principal membership management flows' do |peprincipal_page.visit!principal_page.open_projects_tab!- expect(page).not_to have_selector('tr.member')+ expect(page).to have_no_css('tr.member')expect(page).to have_text 'There is currently nothing to display.'- expect(page).not_to have_text project.name- expect(page).not_to have_text project2.name+ expect(page).to have_no_text project.name+ expect(page).to have_no_text project2.nameendend@@ -119,7 +119,7 @@ RSpec.shared_examples 'global user principal membership management flows' do |peit 'returns an error' doprincipal_page.visit!expect(page).to have_text 'You are not authorized to access this page.'- expect(page).not_to have_text principal.name+ expect(page).to have_no_text principal.nameendendenddiff --git a/spec/features/projects/attribute_help_texts_spec.rb b/spec/features/projects/attribute_help_texts_spec.rbindex cd7f7f92f48..387b99a9650 100644--- a/spec/features/projects/attribute_help_texts_spec.rb+++ b/spec/features/projects/attribute_help_texts_spec.rb@@ -68,7 +68,7 @@ RSpec.describe 'Project attribute help texts', :js, :with_cuprite doclick_link "Overview"end- expect(page).to have_selector("#{test_selector('op-widget-box--header')} .help-text--entry", wait: 10)+ expect(page).to have_css("#{test_selector('op-widget-box--header')} .help-text--entry", wait: 10)# Open help text modalmodal.open!diff --git a/spec/features/projects/copy_spec.rb b/spec/features/projects/copy_spec.rbindex bebff0ecf5c..9ea35aab52b 100644--- a/spec/features/projects/copy_spec.rb+++ b/spec/features/projects/copy_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Projects copy', :with_cuprite, js: true do+RSpec.describe 'Projects copy', :js, :with_cuprite dodescribe 'with a full copy example' dolet!(:project) docreate(:project,diff --git a/spec/features/projects/create_spec.rb b/spec/features/projects/create_spec.rbindex cbd3d19b3d9..dea5ad1e81f 100644--- a/spec/features/projects/create_spec.rb+++ b/spec/features/projects/create_spec.rb@@ -104,8 +104,8 @@ RSpec.describe 'Projects', 'creation',find('.op-fieldset--toggle', text: 'ADVANCED SETTINGS').click- expect(page).not_to have_content 'Active'- expect(page).not_to have_content 'Identifier'+ expect(page).to have_no_content 'Active'+ expect(page).to have_no_content 'Identifier'endcontext 'with optional and required custom fields' do@@ -130,7 +130,7 @@ RSpec.describe 'Projects', 'creation',within('.op-fieldset') doexpect(page).to have_text 'Optional Foo'- expect(page).not_to have_text 'Required Foo'+ expect(page).to have_no_text 'Required Foo'endendenddiff --git a/spec/features/projects/destroy_spec.rb b/spec/features/projects/destroy_spec.rbindex ca0328a1bf2..ff5e8e45b30 100644--- a/spec/features/projects/destroy_spec.rb+++ b/spec/features/projects/destroy_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'Projects#destroy',- js: true,- with_cuprite: true do+RSpec.describe 'Projects#destroy', :js, :with_cuprite dolet!(:project) { create(:project, name: 'foo', identifier: 'foo') }let(:project_page) { Pages::Projects::Destroy.new(project) }let(:danger_zone) { DangerZone.new(page) }@@ -64,7 +62,7 @@ RSpec.describe 'Projects#destroy',expect(danger_zone).not_to be_disableddanger_zone.danger_button.click- expect(page).to have_selector '.op-toast.-success', text: I18n.t('projects.delete.scheduled')+ expect(page).to have_css '.op-toast.-success', text: I18n.t('projects.delete.scheduled')perform_enqueued_jobsdiff --git a/spec/features/projects/edit_settings_spec.rb b/spec/features/projects/edit_settings_spec.rbindex f446006dd4b..f6be75da0e2 100644--- a/spec/features/projects/edit_settings_spec.rb+++ b/spec/features/projects/edit_settings_spec.rb@@ -44,8 +44,8 @@ RSpec.describe 'Projects', 'editing settings', :js, :with_cuprite doit 'hides the field whose functionality is presented otherwise' dovisit project_settings_general_path(project.id)- expect(page).not_to have_text :all, 'Active'- expect(page).not_to have_text :all, 'Identifier'+ expect(page).to have_no_text :all, 'Active'+ expect(page).to have_no_text :all, 'Identifier'enddescribe 'identifier edit' dodiff --git a/spec/features/projects/export_spec.rb b/spec/features/projects/export_spec.rbindex 51f2ed5705d..ca48eb8a2f9 100644--- a/spec/features/projects/export_spec.rb+++ b/spec/features/projects/export_spec.rb@@ -80,7 +80,7 @@ RSpec.describe 'project export', :js, :with_cuprite dolet(:export_type) { 'CSV' }it 'exports the visible projects' do- expect(page).to have_selector('td.name', text: important_project.name)+ expect(page).to have_css('td.name', text: important_project.name)export!@@ -101,12 +101,12 @@ RSpec.describe 'project export', :js, :with_cuprite doclick_on 'Apply'expect(page).to have_text(important_project.name)- expect(page).not_to have_text(party_project.name)+ expect(page).to have_no_text(party_project.name)export!expect(subject).to have_text(important_project.name)- expect(subject).not_to have_text(party_project.name)+ expect(subject).to have_no_text(party_project.name)endendenddiff --git a/spec/features/projects/modules_spec.rb b/spec/features/projects/modules_spec.rbindex ef17e5c8102..81a76efc5f3 100644--- a/spec/features/projects/modules_spec.rb+++ b/spec/features/projects/modules_spec.rb@@ -73,10 +73,10 @@ RSpec.describe 'Projects module administration' doclick_button 'Save'expect(page)- .to have_selector '.op-toast.-error',- text: I18n.t(:'activerecord.errors.models.project.attributes.enabled_modules.dependency_missing',- dependency: 'Work packages',- module: 'Calendars')+ .to have_css '.op-toast.-error',+ text: I18n.t(:'activerecord.errors.models.project.attributes.enabled_modules.dependency_missing',+ dependency: 'Work packages',+ module: 'Calendars')check 'Work packages'@@ -107,7 +107,7 @@ RSpec.describe 'Projects module administration' doit "I can't see the modules menu item" doexpect(page)- .not_to have_selector('[data-name="settings_modules"]')+ .to have_no_css('[data-name="settings_modules"]')endendenddiff --git a/spec/features/projects/project_autocomplete_spec.rb b/spec/features/projects/project_autocomplete_spec.rbindex e67ae7c49c0..4d82b5a180d 100644--- a/spec/features/projects/project_autocomplete_spec.rb+++ b/spec/features/projects/project_autocomplete_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Projects autocomplete page', js: true, with_cuprite: true do+RSpec.describe 'Projects autocomplete page', :js, :with_cuprite dolet!(:user) { create(:user) }let(:top_menu) { Components::Projects::TopMenu.new }@@ -110,8 +110,8 @@ RSpec.describe 'Projects autocomplete page', js: true, with_cuprite: true do# Expect highlightswithin(top_menu.search_results) do- expect(page).to have_selector('.op-search-highlight', text: '<strong')- expect(page).not_to have_selector('strong')+ expect(page).to have_css('.op-search-highlight', text: '<strong')+ expect(page).to have_no_css('strong')end# Expect fuzzy matches for plain@@ -156,7 +156,7 @@ RSpec.describe 'Projects autocomplete page', js: true, with_cuprite: true do# Keeps the current modulevisit project_news_index_path(project2)- expect(page).to have_selector('.news-menu-item.selected')+ expect(page).to have_css('.news-menu-item.selected')retry_block dotop_menu.toggle@@ -165,7 +165,7 @@ RSpec.describe 'Projects autocomplete page', js: true, with_cuprite: true doendexpect(page).to have_current_path(project_news_index_path(project), ignore_query: true)- expect(page).to have_selector('.news-menu-item.selected')+ expect(page).to have_css('.news-menu-item.selected')endit 'navigates to the first project upon hitting enter in the search bar' dodiff --git a/spec/features/projects/project_status_administration_spec.rb b/spec/features/projects/project_status_administration_spec.rbindex d25a00d0aa4..a9c186ec14e 100644--- a/spec/features/projects/project_status_administration_spec.rb+++ b/spec/features/projects/project_status_administration_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'Projects status administration',- js: true,- with_cuprite: true do+RSpec.describe 'Projects status administration', :js, :with_cuprite doinclude_context 'ng-select-autocomplete helpers'let(:current_user) dodiff --git a/spec/features/projects/projects_custom_fields_spec.rb b/spec/features/projects/projects_custom_fields_spec.rbindex 519b52d5fe0..856274324bd 100644--- a/spec/features/projects/projects_custom_fields_spec.rb+++ b/spec/features/projects/projects_custom_fields_spec.rb@@ -110,7 +110,7 @@ RSpec.describe 'Projects custom fields', :js, :with_cuprite dovisit project_settings_general_path(project.id)# expect CF, description and status description ckeditor-augmented-textarea- expect(page).to have_selector('.op-ckeditor--wrapper', count: 3)+ expect(page).to have_css('.op-ckeditor--wrapper', count: 3)# single hash autocompleteeditor.insert_link 'http://example.org/link with spaces'@@ -126,7 +126,7 @@ RSpec.describe 'Projects custom fields', :js, :with_cuprite docv = project.custom_values.find_by(custom_field_id: custom_field.id).valueexpect(cv).to include '[http://example.org/link with spaces](http://example.org/link%20with%20spaces)'- expect(page).to have_selector('a[href="http://example.org/link with spaces"]')+ expect(page).to have_css('a[href="http://example.org/link with spaces"]')endend@@ -289,7 +289,7 @@ RSpec.describe 'Projects custom fields', :js, :with_cuprite docf_field.expect_visiblecf_field.expect_no_option invisible_user- expect(page).not_to have_selector('.ng-dropdown-footer button', text: 'Invite')+ expect(page).to have_no_css('.ng-dropdown-footer button', text: 'Invite')endendenddiff --git a/spec/features/projects/projects_index_spec.rb b/spec/features/projects/projects_index_spec.rbindex b98265e95b1..4c0b5b4cfd1 100644--- a/spec/features/projects/projects_index_spec.rb+++ b/spec/features/projects/projects_index_spec.rb@@ -74,8 +74,8 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,def expect_project_at_place(project, place)expect(page)- .to have_selector("#project-table .project:nth-of-type(#{place}) td.name",- text: project.name)+ .to have_css("#project-table .project:nth-of-type(#{place}) td.name",+ text: project.name)enddef expect_projects_in_order(*projects)@@ -90,11 +90,11 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,ProjectRole.anonymousvisit projects_path- expect(page).not_to have_text(project.name)+ expect(page).to have_no_text(project.name)expect(page).to have_text(public_project.name)# Test that the 'More' menu stays invisible on hover- expect(page).not_to have_css('.icon-show-more-horizontal')+ expect(page).to have_no_css('.icon-show-more-horizontal')endend@@ -114,11 +114,11 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,expect(page).to have_text(development_project.name)expect(page).to have_text(public_project.name)- expect(page).not_to have_text(project.name)+ expect(page).to have_no_text(project.name)# Non-admin users shall not see invisible CFs.- expect(page).not_to have_text(invisible_custom_field.name.upcase)- expect(page).not_to have_select('add_filter_select', with_options: [invisible_custom_field.name])+ expect(page).to have_no_text(invisible_custom_field.name.upcase)+ expect(page).to have_no_select('add_filter_select', with_options: [invisible_custom_field.name])endend@@ -147,13 +147,13 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,expect(page).to have_text(development_project.name)expect(page).to have_text(public_project.name)- expect(page).not_to have_text(project.name)+ expect(page).to have_no_text(project.name)# They should not see the description, status or custom fields for the project- expect(page).not_to have_text(development_project.description)- expect(page).not_to have_text(project_status_name(development_project.status_code))- expect(page).not_to have_text(development_project.status_explanation)- expect(page).not_to have_text(development_project.custom_value_for(custom_field))+ expect(page).to have_no_text(development_project.description)+ expect(page).to have_no_text(project_status_name(development_project.status_code))+ expect(page).to have_no_text(development_project.status_explanation)+ expect(page).to have_no_text(development_project.custom_value_for(custom_field))endend@@ -217,9 +217,9 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,load_and_open_filters admin# CF's columns are not present:- expect(page).not_to have_text(custom_field.name.upcase)+ expect(page).to have_no_text(custom_field.name.upcase)# CF's filters are not present:- expect(page).not_to have_select('add_filter_select', with_options: [custom_field.name])+ expect(page).to have_no_select('add_filter_select', with_options: [custom_field.name])endend@@ -228,7 +228,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,load_and_open_filters admin# CF's columns are not shown due to setting- expect(page).not_to have_text(custom_field.name.upcase)+ expect(page).to have_no_text(custom_field.name.upcase)endspecify 'CF columns and filters are visible when added to settings' do@@ -384,7 +384,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,projects_page.expect_projects_listed(public_project)projects_page.expect_projects_not_listed(project, # Filtered outdevelopment_project) # Present on page 1- expect(page).not_to have_text('Next') # Filters kept active, so there is no third page.+ expect(page).to have_no_text('Next') # Filters kept active, so there is no third page.# Sorts DESC by nameclick_on 'Ascending sorted by "Name"'@@ -395,7 +395,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,projects_page.expect_projects_not_listed(project, # Filtered outpublic_project) # Present on page 1- expect(page).not_to have_text('Next') # Filters kept active, so there is no third page.+ expect(page).to have_no_text('Next') # Filters kept active, so there is no third page.expect(page).to have_css('.sort.desc', text: 'NAME')# Sending the filter form again what implies to compose the request freshly@@ -495,10 +495,10 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,projects_page.activate_menu_of(parent_project) do |menu|expect(menu).to have_text('Unarchive')expect(menu).to have_text('Delete')- expect(menu).not_to have_text('Archive')- expect(menu).not_to have_text('Copy')- expect(menu).not_to have_text('Settings')- expect(menu).not_to have_text('New subproject')+ expect(menu).to have_no_text('Archive')+ expect(menu).to have_no_text('Copy')+ expect(menu).to have_no_text('Settings')+ expect(menu).to have_no_text('New subproject')click_link('Unarchive')end@@ -584,7 +584,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,wait_for_reloadexpect(page).to have_text(green_project.name)- expect(page).not_to have_text(no_status_project.name)+ expect(page).to have_no_text(no_status_project.name)projects_page.set_filter('project_status_code','Project status',@@ -595,7 +595,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,wait_for_reloadexpect(page).to have_text(green_project.name)- expect(page).not_to have_text(no_status_project.name)+ expect(page).to have_no_text(no_status_project.name)projects_page.set_filter('project_status_code','Project status',@@ -605,7 +605,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,click_on 'Apply'wait_for_reload- expect(page).not_to have_text(green_project.name)+ expect(page).to have_no_text(green_project.name)expect(page).to have_text(no_status_project.name)projects_page.set_filter('project_status_code',@@ -616,7 +616,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,click_on 'Apply'wait_for_reload- expect(page).not_to have_text(green_project.name)+ expect(page).to have_no_text(green_project.name)expect(page).to have_text(no_status_project.name)endend@@ -688,8 +688,8 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,wait_for_reloadexpect(page).to have_text(project_created_on_today.name)- expect(page).not_to have_text(project_created_on_this_week.name)- expect(page).not_to have_text(project_created_on_fixed_date.name)+ expect(page).to have_no_text(project_created_on_this_week.name)+ expect(page).to have_no_text(project_created_on_fixed_date.name)# created on 'this week' shows projects that were created within the last seven daysremove_filter('created_at')@@ -703,7 +703,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,expect(page).to have_text(project_created_on_today.name)expect(page).to have_text(project_created_on_this_week.name)- expect(page).not_to have_text(project_created_on_fixed_date.name)+ expect(page).to have_no_text(project_created_on_fixed_date.name)# created on 'on' shows projects that were created within the last seven daysremove_filter('created_at')@@ -717,8 +717,8 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,wait_for_reloadexpect(page).to have_text(project_created_on_fixed_date.name)- expect(page).not_to have_text(project_created_on_today.name)- expect(page).not_to have_text(project_created_on_this_week.name)+ expect(page).to have_no_text(project_created_on_today.name)+ expect(page).to have_no_text(project_created_on_this_week.name)# created on 'less than days ago'remove_filter('created_at')@@ -732,7 +732,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,wait_for_reloadexpect(page).to have_text(project_created_on_today.name)- expect(page).not_to have_text(project_created_on_fixed_date.name)+ expect(page).to have_no_text(project_created_on_fixed_date.name)# created on 'more than days ago'remove_filter('created_at')@@ -746,7 +746,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,wait_for_reloadexpect(page).to have_text(project_created_on_fixed_date.name)- expect(page).not_to have_text(project_created_on_today.name)+ expect(page).to have_no_text(project_created_on_today.name)# created on 'between'remove_filter('created_at')@@ -760,7 +760,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,wait_for_reloadexpect(page).to have_text(project_created_on_fixed_date.name)- expect(page).not_to have_text(project_created_on_today.name)+ expect(page).to have_no_text(project_created_on_today.name)# Latest activity at 'today'. This spot check would fail if the data does not get collected from multiple tablesremove_filter('created_at')@@ -773,7 +773,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,wait_for_reloadexpect(page).to have_text(project_created_on_today.name)- expect(page).not_to have_text(project_created_on_fixed_date.name)+ expect(page).to have_no_text(project_created_on_fixed_date.name)# CF Listremove_filter('latest_activity_at')@@ -787,7 +787,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,wait_for_reloadexpect(page).to have_text(project_created_on_today.name)- expect(page).not_to have_text(project_created_on_fixed_date.name)+ expect(page).to have_no_text(project_created_on_fixed_date.name)# switching to multiselect keeps the current selectioncf_filter = page.find("li[filter-name='#{list_custom_field.column_name}']")@@ -821,7 +821,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,click_on 'Toggle multiselect'expect(cf_filter.find(:select, 'value')).not_to be_multipleexpect(cf_filter).to have_select('value', selected: list_custom_field.possible_values[1].value)- expect(cf_filter).not_to have_select('value', selected: list_custom_field.possible_values[3].value)+ expect(cf_filter).to have_no_select('value', selected: list_custom_field.possible_values[3].value)endclick_on 'Apply'@@ -845,7 +845,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,wait_for_reloadexpect(page).to have_text(project_created_on_today.name)- expect(page).not_to have_text(project_created_on_fixed_date.name)+ expect(page).to have_no_text(project_created_on_fixed_date.name)endpending "NOT WORKING YET: Date vs. DateTime issue: Selecting same date for from and to value shows projects of that date"@@ -923,7 +923,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,# 'More' does not become visible on hoverpage.find('tbody tr').hover- expect(page).not_to have_css('.icon-show-more-horizontal')+ expect(page).to have_no_css('.icon-show-more-horizontal')# For a project member with :copy_projects privilege the 'More' menu is visible.login_as(can_copy_projects_manager)@@ -940,10 +940,10 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,page.find('tbody tr .icon-show-more-horizontal').clickmenu = page.find('tbody tr .project-actions')expect(menu).to have_text('Copy')- expect(menu).not_to have_text('New subproject')- expect(menu).not_to have_text('Delete')- expect(menu).not_to have_text('Archive')- expect(menu).not_to have_text('Unarchive')+ expect(menu).to have_no_text('New subproject')+ expect(menu).to have_no_text('Delete')+ expect(menu).to have_no_text('Archive')+ expect(menu).to have_no_text('Unarchive')# For a project member with :add_subprojects privilege the 'More' menu is visible.login_as(can_add_subprojects_manager)@@ -958,23 +958,23 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,page.find('tbody tr .icon-show-more-horizontal').clickmenu = page.find('tbody tr .project-actions')expect(menu).to have_text('New subproject')- expect(menu).not_to have_text('Copy')- expect(menu).not_to have_text('Delete')- expect(menu).not_to have_text('Archive')- expect(menu).not_to have_text('Unrchive')+ expect(menu).to have_no_text('Copy')+ expect(menu).to have_no_text('Delete')+ expect(menu).to have_no_text('Archive')+ expect(menu).to have_no_text('Unrchive')# Test admin only properties are invisiblewithin('#project-table') doexpect(page)- .not_to have_css('th', text: 'REQUIRED DISK STORAGE')+ .to have_no_css('th', text: 'REQUIRED DISK STORAGE')expect(page)- .not_to have_css('th', text: 'CREATED ON')+ .to have_no_css('th', text: 'CREATED ON')expect(page)- .not_to have_css('td', text: project.created_at.strftime('%m/%d/%Y'))+ .to have_no_css('td', text: project.created_at.strftime('%m/%d/%Y'))expect(page)- .not_to have_css('th', text: 'LATEST ACTIVITY AT')+ .to have_no_css('th', text: 'LATEST ACTIVITY AT')expect(page)- .not_to have_css('td', text: news.created_at.strftime('%m/%d/%Y'))+ .to have_no_css('td', text: news.created_at.strftime('%m/%d/%Y'))endendend@@ -1078,9 +1078,9 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,it 'is not visible' doload_and_open_filters admin- expect(page).not_to have_select('add_filter_select', with_options: ["Principal"])- expect(page).not_to have_select('add_filter_select', with_options: ["ID"])- expect(page).not_to have_select('add_filter_select', with_options: ["Subproject of"])+ expect(page).to have_no_select('add_filter_select', with_options: ["Principal"])+ expect(page).to have_no_select('add_filter_select', with_options: ["ID"])+ expect(page).to have_no_select('add_filter_select', with_options: ["Subproject of"])endend@@ -1107,7 +1107,7 @@ RSpec.describe 'Projects index page', :js, :with_cuprite,.where(value: %w[A B]).reorder(:id).pluck(:value)- expect(page).to have_selector(".#{list_custom_field.column_name}.format-list", text: expected_sort.join(", "))+ expect(page).to have_css(".#{list_custom_field.column_name}.format-list", text: expected_sort.join(", "))endenddiff --git a/spec/features/projects/projects_portfolio_spec.rb b/spec/features/projects/projects_portfolio_spec.rbindex 4b32bd8f654..6f349325dd5 100644--- a/spec/features/projects/projects_portfolio_spec.rb+++ b/spec/features/projects/projects_portfolio_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'Projects index page',- js: true,- with_cuprite: true,+RSpec.describe 'Projects index page', :js, :with_cuprite,with_ee: %i[custom_fields_in_projects_list], with_settings: { login_required?: false } doshared_let(:admin) { create(:admin) }@@ -86,7 +84,7 @@ RSpec.describe 'Projects index page',# It has checked all selected settingsSetting.enabled_projects_columns.each do |name|- expect(page).to have_selector(%(input[value="#{name}"]:checked))+ expect(page).to have_css(%(input[value="#{name}"]:checked))end# Uncheck all selected columns@@ -98,8 +96,8 @@ RSpec.describe 'Projects index page',find('input[value="project_status"]').checkfind(%(input[value="#{string_cf.column_name}"])).check- expect(page).to have_selector('input[value="project_status"]:checked')- expect(page).to have_selector(%(input[value="#{string_cf.column_name}"]:checked))+ expect(page).to have_css('input[value="project_status"]:checked')+ expect(page).to have_css(%(input[value="#{string_cf.column_name}"]:checked))# Edit the project gantt queryscroll_to_and_click(find('button', text: 'Edit query'))@@ -122,7 +120,7 @@ RSpec.describe 'Projects index page',# Save the pagescroll_to_and_click(find('.button', text: 'Save'))- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.')+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.')RequestStore.clear!query = JSON.parse Setting.project_gantt_query@@ -138,8 +136,8 @@ RSpec.describe 'Projects index page',wp_table.expect_work_package_listed work_package_a, work_package_b# Expect grouped and filtered for both projects- expect(page).to have_selector '.group--value', text: 'A'- expect(page).to have_selector '.group--value', text: 'B'+ expect(page).to have_css '.group--value', text: 'A'+ expect(page).to have_css '.group--value', text: 'B'# Expect type and project filtersdropdown.expect_count 2diff --git a/spec/features/projects/subproject_creation_spec.rb b/spec/features/projects/subproject_creation_spec.rbindex 511073fe5d1..d2d62e9effb 100644--- a/spec/features/projects/subproject_creation_spec.rb+++ b/spec/features/projects/subproject_creation_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Subproject creation', js: true, with_cuprite: true do+RSpec.describe 'Subproject creation', :js, :with_cuprite dolet(:name_field) { FormFields::InputFormField.new :name }let(:parent_field) { FormFields::SelectFormField.new :parent }let(:add_subproject_role) { create(:project_role, permissions: %i[edit_project add_subprojects]) }diff --git a/spec/features/projects/template_spec.rb b/spec/features/projects/template_spec.rbindex 02a475747d3..de4ab027df2 100644--- a/spec/features/projects/template_spec.rb+++ b/spec/features/projects/template_spec.rb@@ -44,13 +44,13 @@ RSpec.describe 'Project templates', :js, :with_cuprite do# Make a templatefind('.button', text: 'Set as template').click- expect(page).to have_selector('.button', text: 'Remove from templates')+ expect(page).to have_css('.button', text: 'Remove from templates')project.reloadexpect(project).to be_templated# unset templatefind('.button', text: 'Remove from templates').click- expect(page).to have_selector('.button', text: 'Set as template')+ expect(page).to have_css('.button', text: 'Set as template')project.reloadexpect(project).not_to be_templated@@ -99,7 +99,7 @@ RSpec.describe 'Project templates', :js, :with_cuprite doname_field.set_value 'Foo bar'expect(page)- .not_to have_content('COPY OPTIONS')+ .to have_no_content('COPY OPTIONS')template_field.select_option 'My template'@@ -123,7 +123,7 @@ RSpec.describe 'Project templates', :js, :with_cuprite dopage.find('.op-fieldset--toggle', text: 'COPY OPTIONS').click# Now shows the send notifications field.- expect(page).to have_selector('[data-qa-field-name="sendNotifications"]')+ expect(page).to have_css('[data-qa-field-name="sendNotifications"]')# And allows to deselect copying the members.uncheck I18n.t(:'projects.copy.members')diff --git a/spec/features/projects/work_package_type_mgmt_spec.rb b/spec/features/projects/work_package_type_mgmt_spec.rbindex 1005f8bf680..4d0296e9e32 100644--- a/spec/features/projects/work_package_type_mgmt_spec.rb+++ b/spec/features/projects/work_package_type_mgmt_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'Projects', 'work package type mgmt',- js: true,- with_cuprite: true do+RSpec.describe 'Projects', :js, :with_cuprite, 'work package type mgmt' docurrent_user { create(:user, member_with_permissions: { project => %i[edit_project manage_types] }) }let(:phase_type) { create(:type, name: 'Phase', is_default: true) }diff --git a/spec/features/repositories/checkout_instructions_spec.rb b/spec/features/repositories/checkout_instructions_spec.rbindex 0e6dfaf56cd..7308c777d73 100644--- a/spec/features/repositories/checkout_instructions_spec.rb+++ b/spec/features/repositories/checkout_instructions_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Create repository', js: true do+RSpec.describe 'Create repository', :js dolet(:current_user) { create (:admin) }let(:project) { create(:project) }let(:enabled_scms) { %w[git] }@@ -66,12 +66,12 @@ RSpec.describe 'Create repository', js: true doit 'toggles checkout instructions' dovisit project_repository_path(project)- expect(page).to have_selector('#repository--checkout-instructions')+ expect(page).to have_css('#repository--checkout-instructions')button = find_by_id('repository--checkout-instructions-toggle')button.click- expect(page).not_to have_selector('#repository--checkout-instructions')+ expect(page).to have_no_css('#repository--checkout-instructions')endendenddiff --git a/spec/features/repositories/create_repository_spec.rb b/spec/features/repositories/create_repository_spec.rbindex 2abcf49ddf8..53b9afb1901 100644--- a/spec/features/repositories/create_repository_spec.rb+++ b/spec/features/repositories/create_repository_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'features/repositories/repository_settings_page'-RSpec.describe 'Create repository', js: true, selenium: true do+RSpec.describe 'Create repository', :js, :selenium dolet(:current_user) { create(:admin) }let(:project) { create(:project) }let(:settings_page) { RepositorySettingsPage.new(project) }@@ -59,7 +59,7 @@ RSpec.describe 'Create repository', js: true, selenium: true doit 'displays the vendor selection' doexpect(scm_vendor_input).not_to be_nilenabled_scms.each do |scm|- expect(scm_vendor_input).to have_selector('option', text: scm.camelize)+ expect(scm_vendor_input).to have_css('option', text: scm.camelize)endendend@@ -73,7 +73,7 @@ RSpec.describe 'Create repository', js: true, selenium: true doit_behaves_like 'shows enabled scms'it 'does not show git' do- expect(scm_vendor_input).not_to have_selector('option', text: 'Git')+ expect(scm_vendor_input).to have_no_css('option', text: 'Git')endendend@@ -149,9 +149,9 @@ RSpec.describe 'Create repository', js: true, selenium: true doclick_button(I18n.t(:button_create))- expect(page).to have_selector('div.op-toast.-success',- text: I18n.t('repositories.create_successful'))- expect(page).to have_selector('a.icon-delete', text: I18n.t(:button_delete))+ expect(page).to have_css('div.op-toast.-success',+ text: I18n.t('repositories.create_successful'))+ expect(page).to have_css('a.icon-delete', text: I18n.t(:button_delete))endend@@ -162,10 +162,10 @@ RSpec.describe 'Create repository', js: true, selenium: true doclick_button(I18n.t(:button_create))- expect(page).to have_selector('div.op-toast.-success',- text: I18n.t('repositories.create_successful'))- expect(page).to have_selector('button[type="submit"]', text: I18n.t(:button_save))- expect(page).to have_selector('a.icon-remove', text: I18n.t(:button_remove))+ expect(page).to have_css('div.op-toast.-success',+ text: I18n.t('repositories.create_successful'))+ expect(page).to have_css('button[type="submit"]', text: I18n.t(:button_save))+ expect(page).to have_css('a.icon-remove', text: I18n.t(:button_remove))endend@@ -208,7 +208,7 @@ RSpec.describe 'Create repository', js: true, selenium: true doendend- describe 'remote managed repositories', webmock: true do+ describe 'remote managed repositories', :webmock dolet(:vendor) { 'git' }let(:url) { 'http://myreposerver.example.com/api/' }let(:config) { { git: { manages: url } } }diff --git a/spec/features/repositories/repository_settings_spec.rb b/spec/features/repositories/repository_settings_spec.rbindex e5ae64250fc..4674e2b3262 100644--- a/spec/features/repositories/repository_settings_spec.rb+++ b/spec/features/repositories/repository_settings_spec.rb@@ -30,7 +30,7 @@ require 'spec_helper'require 'features/repositories/repository_settings_page'require 'features/support/components/danger_zone'-RSpec.describe 'Repository Settings', js: true do+RSpec.describe 'Repository Settings', :js dolet(:current_user) { create (:admin) }let(:project) { create(:project) }let(:settings_page) { RepositorySettingsPage.new(project) }@@ -54,7 +54,7 @@ RSpec.describe 'Repository Settings', js: true doshared_examples 'manages the repository' do |type|it 'displays the repository' do- expect(page).to have_selector('select[name="scm_vendor"]')+ expect(page).to have_css('select[name="scm_vendor"]')expect(find("#attributes-group--content-#{type}", visible: true)).not_to be_nilend@@ -84,7 +84,7 @@ RSpec.describe 'Repository Settings', js: true doelseSeleniumHubWaiter.waitfind('a.icon-remove', text: I18n.t(:button_remove)).click- expect(page).to have_selector('.op-toast.-warning')+ expect(page).to have_css('.op-toast.-warning')SeleniumHubWaiter.waitfind('a', text: I18n.t(:button_remove)).clickend@@ -105,7 +105,7 @@ RSpec.describe 'Repository Settings', js: true doshared_examples 'manages the repository with' do |name, type, _repository_type, _project_name|let(:repository) do- create("repository_#{name}".to_sym,+ create(:"repository_#{name}",scm_type: type,project:)end@@ -151,7 +151,7 @@ RSpec.describe 'Repository Settings', js: true doendend- context 'remote', webmock: true do+ context 'remote', :webmock dolet(:url) { 'http://myreposerver.example.com/api/' }let(:config) do{@@ -192,9 +192,9 @@ RSpec.describe 'Repository Settings', js: true dofill_in('repository-password-placeholder', with: 'password')click_button(I18n.t(:button_save))- expect(page).to have_selector('[name="repository[login]"][value="foobar"]')- expect(page).to have_selector('.op-toast',- text: I18n.t('repositories.update_settings_successful'))+ expect(page).to have_css('[name="repository[login]"][value="foobar"]')+ expect(page).to have_css('.op-toast',+ text: I18n.t('repositories.update_settings_successful'))endendenddiff --git a/spec/features/roles/create_spec.rb b/spec/features/roles/create_spec.rbindex 76cdbf50f3f..ad25b27de8e 100644--- a/spec/features/roles/create_spec.rb+++ b/spec/features/roles/create_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'Role creation',- js: true,- with_cuprite: true do+RSpec.describe 'Role creation', :js, :with_cuprite dolet!(:admin) { create(:admin) }let!(:existing_role) { create(:project_role) }let!(:existing_workflow) { create(:workflow_with_default_status, role: existing_role, type:) }@@ -58,7 +56,7 @@ RSpec.describe 'Role creation',click_button 'Create'expect(page)- .to have_selector('.errorExplanation', text: 'Name has already been taken')+ .to have_css('.errorExplanation', text: 'Name has already been taken')fill_in 'Name', with: 'New role name'@@ -68,8 +66,8 @@ RSpec.describe 'Role creation',click_button 'Create'expect(page)- .to have_selector('.errorExplanation',- text: "Permissions need to also include 'View members' as 'Manage members' is selected.")+ .to have_css('.errorExplanation',+ text: "Permissions need to also include 'View members' as 'Manage members' is selected.")check 'View members'select existing_role.name, from: 'Copy workflow from'@@ -77,13 +75,13 @@ RSpec.describe 'Role creation',click_button 'Create'expect(page)- .to have_selector('.-success', text: 'Successful creation.')+ .to have_css('.-success', text: 'Successful creation.')expect(page).to have_current_path(roles_path)expect(page)- .to have_selector('table td', text: 'New role name')+ .to have_css('table td', text: 'New role name')click_link 'New role name'diff --git a/spec/features/search/recently_viewed_work_packages_spec.rb b/spec/features/search/recently_viewed_work_packages_spec.rbindex c1cffef35e2..7c5eb94f9fa 100644--- a/spec/features/search/recently_viewed_work_packages_spec.rb+++ b/spec/features/search/recently_viewed_work_packages_spec.rb@@ -47,7 +47,7 @@ RSpec.describe 'Recently viewed work packages',global_search.click_inputexpect(global_search.dropdown).to be_visible- expect(global_search.dropdown).not_to have_text(recently_viewed_header_text)+ expect(global_search.dropdown).to have_no_text(recently_viewed_header_text)endend@@ -77,7 +77,7 @@ RSpec.describe 'Recently viewed work packages',# clicking goes to the work package viewglobal_search.click_work_package(work_package)expect(page)- .to have_selector('.subject', text: work_package.subject)+ .to have_css('.subject', text: work_package.subject)expect(page).to have_current_path project_work_package_path(work_package.project, work_package, state: 'activity')end@@ -89,7 +89,7 @@ RSpec.describe 'Recently viewed work packages',global_search.search('random text')# recently viewed items not shown- expect(global_search.dropdown).not_to have_text(recently_viewed_header_text)+ expect(global_search.dropdown).to have_no_text(recently_viewed_header_text)global_search.expect_no_work_package_option(work_package)endenddiff --git a/spec/features/search/search_spec.rb b/spec/features/search/search_spec.rbindex 639efd9dcce..630b99e1126 100644--- a/spec/features/search/search_spec.rb+++ b/spec/features/search/search_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Search', js: true, with_settings: { per_page_options: '5' } do+RSpec.describe 'Search', :js, with_settings: { per_page_options: '5' } doinclude Components::Autocompleter::NgSelectAutocompleteHelpersshared_let(:admin) { create(:admin) }@@ -89,7 +89,7 @@ RSpec.describe 'Search', js: true, with_settings: { per_page_options: '5' } dodef expect_range(param_a, param_b)(param_a..param_b).each do |n|expect(page).to have_content("No. #{n} WP")- expect(page).to have_selector("a[href*='#{work_package_path(work_packages[n - 1].id)}']")+ expect(page).to have_css("a[href*='#{work_package_path(work_packages[n - 1].id)}']")endend@@ -131,7 +131,7 @@ RSpec.describe 'Search', js: true, with_settings: { per_page_options: '5' } doglobal_search.click_work_package(target_work_package)expect(page)- .to have_selector('.subject', text: target_work_package.subject)+ .to have_css('.subject', text: target_work_package.subject)expect(page).to have_current_path project_work_package_path(target_work_package.project, target_work_package, state: 'activity')@@ -148,7 +148,7 @@ RSpec.describe 'Search', js: true, with_settings: { per_page_options: '5' } doglobal_search.submit_with_enterexpect(page)- .to have_selector('.subject', text: search_target.subject)+ .to have_css('.subject', text: search_target.subject)expect(page).to have_current_path project_work_package_path(search_target.project, search_target, state: 'activity')@@ -293,7 +293,7 @@ RSpec.describe 'Search', js: true, with_settings: { per_page_options: '5' } doglobal_search.submit_in_current_project# Expect that the "All" tab is selected.- expect(page).to have_selector('[data-qa-tab-id="all"][data-qa-tab-selected]')+ expect(page).to have_css('[data-qa-tab-id="all"][data-qa-tab-selected]')# Expect that the project scope is set to current_project and no module (this is the "all" tab) is requested.expect(current_url).to match(/\/#{project.identifier}\/search\?q=#{query}&scope=current_project$/)@@ -305,7 +305,7 @@ RSpec.describe 'Search', js: true, with_settings: { per_page_options: '5' } doexpect(current_url).to match(/\/search\?q=#{query}&work_packages=1&scope=current_project$/)# Expect that the "Work packages" tab is selected.- expect(page).to have_selector('[data-qa-tab-id="work_packages"][data-qa-tab-selected]')+ expect(page).to have_css('[data-qa-tab-id="work_packages"][data-qa-tab-selected]')table = Pages::EmbeddedWorkPackagesTable.new(find('.work-packages-embedded-view--container'))table.expect_work_package_count(5) # because we set the page size to this@@ -378,7 +378,7 @@ RSpec.describe 'Search', js: true, with_settings: { per_page_options: '5' } doglobal_search.submit_in_project_and_subproject_scope# Expect that the "Work packages" tab is selected.- expect(page).to have_selector('[data-qa-tab-id="work_packages"][data-qa-tab-selected]')+ expect(page).to have_css('[data-qa-tab-id="work_packages"][data-qa-tab-selected]')expect(page).to have_text "Search for \"#{other_work_package.subject}\" in #{project.name} and all subprojects"@@ -431,7 +431,7 @@ RSpec.describe 'Search', js: true, with_settings: { per_page_options: '5' } do.to have_content attachment_textexpect(page)- .to have_selector(".search-highlight", text: query)+ .to have_css(".search-highlight", text: query)page.find('[data-qa-tab-id="work_packages"]').click@@ -463,7 +463,7 @@ RSpec.describe 'Search', js: true, with_settings: { per_page_options: '5' } doglobal_search.submit_in_global_scopewithin('dt.work_package-note + dd') do- expect(page).to have_selector(".description", text: note_two.notes)+ expect(page).to have_css(".description", text: note_two.notes)end# links to work package with anchor to highlighted note@@ -492,7 +492,7 @@ RSpec.describe 'Search', js: true, with_settings: { per_page_options: '5' } do.to have_link(searched_for_project.name)expect(page)- .not_to have_link(other_project.name)+ .to have_no_link(other_project.name)endendend@@ -587,7 +587,7 @@ RSpec.describe 'Search', js: true, with_settings: { per_page_options: '5' } doit 'opens and focuses the global search when you press the [s] hotkey' dovisit home_pathpage.find('body').send_keys('s')- expect(page).to have_selector '[data-qa-search-open="1"]', wait: 10+ expect(page).to have_css '[data-qa-search-open="1"]', wait: 10endendenddiff --git a/spec/features/security/expire_sessions_spec.rb b/spec/features/security/expire_sessions_spec.rbindex 3fac6979060..fcf64e58494 100644--- a/spec/features/security/expire_sessions_spec.rb+++ b/spec/features/security/expire_sessions_spec.rb@@ -34,7 +34,7 @@ RSpec.describe 'Expire old user sessions' dobefore do# Delete all previous sesssions- ::Sessions::UserSession.delete_all+ Sessions::UserSession.delete_alllogin_with(admin.login, admin_password)diff --git a/spec/features/security/session_ttl_spec.rb b/spec/features/security/session_ttl_spec.rbindex 45dee5a9cda..8e4feb04ee9 100644--- a/spec/features/security/session_ttl_spec.rb+++ b/spec/features/security/session_ttl_spec.rb@@ -46,13 +46,13 @@ RSpec.describe 'Session TTL',describe 'outdated TTL on Rails request' doit 'expires on the next Rails request' dovisit '/my/account'- expect(page).to have_selector('.form--field-container', text: admin.login)+ expect(page).to have_css('.form--field-container', text: admin.login)# Expire the sessionexpire!visit '/'- expect(page).to have_selector('.action-login')+ expect(page).to have_css('.action-login')endenddiff --git a/spec/features/support/components/attribute_help_text_modal.rb b/spec/features/support/components/attribute_help_text_modal.rbindex c90fe9a28f4..c02e8abbf72 100644--- a/spec/features/support/components/attribute_help_text_modal.rb+++ b/spec/features/support/components/attribute_help_text_modal.rb@@ -69,14 +69,14 @@ module Componentsendelement.click(x: -((width / 2) - 10), y: -((height / 2) - 10))end- expect(page).not_to have_css('[data-test-selector="attribute-help-text--header"]', text: help_text.attribute_caption)+ expect(page).to have_no_css('[data-test-selector="attribute-help-text--header"]', text: help_text.attribute_caption)enddef expect_edit(editable:)if editableexpect(page).to have_css('.help-text--edit-button')else- expect(page).not_to have_css('.help-text--edit-button')+ expect(page).to have_no_css('.help-text--edit-button')endenddiff --git a/spec/features/support/components/time_logging_modal.rb b/spec/features/support/components/time_logging_modal.rbindex b277b0b3de1..1e9273d8913 100644--- a/spec/features/support/components/time_logging_modal.rb+++ b/spec/features/support/components/time_logging_modal.rb@@ -55,7 +55,7 @@ module Components.to have_text(I18n.t('js.button_log_time'))endelse- expect(page).not_to have_selector '.spot-modal'+ expect(page).to have_no_css '.spot-modal'endend@@ -67,16 +67,16 @@ module Componentsdef expect_work_package(subject)within modal_container do- expect(page).to have_selector('.ng-value', text: subject, wait: 10)+ expect(page).to have_css('.ng-value', text: subject, wait: 10)endenddef shows_field(field, visible)within modal_container doif visible- expect(page).to have_selector "##{field_identifier(field)}"+ expect(page).to have_css "##{field_identifier(field)}"else- expect(page).not_to have_selector "##{field_identifier(field)}"+ expect(page).to have_no_css "##{field_identifier(field)}"endendend@@ -134,7 +134,7 @@ module Componentsprivatedef field_object(field_name)- send("#{field_name}_field")+ send(:"#{field_name}_field")enddef modal_containerdiff --git a/spec/features/support/work_package_table.rb b/spec/features/support/work_package_table.rbindex 0cd1ae5486a..05c098447e2 100644--- a/spec/features/support/work_package_table.rb+++ b/spec/features/support/work_package_table.rb@@ -34,7 +34,7 @@ RSpec.shared_context 'work package table helpers' dopreceeding_elements.each_with_index do |wp_1, i|wp_2 = following_elements[i]- expect(self).to have_selector(".wp-row-#{wp_1.id} + \+ expect(self).to have_css(".wp-row-#{wp_1.id} + \.wp-row-#{wp_2.id}")endenddiff --git a/spec/features/types/activate_in_project_spec.rb b/spec/features/types/activate_in_project_spec.rbindex 8f7d04f8018..7ad7e689e31 100644--- a/spec/features/types/activate_in_project_spec.rb+++ b/spec/features/types/activate_in_project_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'support/pages/custom_fields'-RSpec.describe 'types', js: true, with_cuprite: true do+RSpec.describe 'types', :js, :with_cuprite dolet(:user) docreate(:user,member_with_permissions: { project => %i(edit_project manage_types add_work_packages view_work_packages) })diff --git a/spec/features/types/crud_spec.rb b/spec/features/types/crud_spec.rbindex 7212948cd29..42f54f5a99f 100644--- a/spec/features/types/crud_spec.rb+++ b/spec/features/types/crud_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Types', js: true, with_cuprite: true do+RSpec.describe 'Types', :js, :with_cuprite doshared_let(:admin) { create(:admin) }shared_let(:existing_role) { create(:project_role) }@@ -53,7 +53,7 @@ RSpec.describe 'Types', js: true, with_cuprite: true doclick_button 'Create'expect(page)- .to have_selector('.errorExplanation', text: "Name has already been taken.")+ .to have_css('.errorExplanation', text: "Name has already been taken.")# Values are retainedexpect(page)diff --git a/spec/features/types/form_configuration_query_spec.rb b/spec/features/types/form_configuration_query_spec.rbindex 42c03fcc777..ebf1bcaf75b 100644--- a/spec/features/types/form_configuration_query_spec.rb+++ b/spec/features/types/form_configuration_query_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'form query configuration', js: true, with_cuprite: true do+RSpec.describe 'form query configuration', :js, :with_cuprite doshared_let(:admin) { create(:admin) }let(:type_bug) { create(:type_bug) }let(:type_task) { create(:type_task) }@@ -93,7 +93,7 @@ RSpec.describe 'form query configuration', js: true, with_cuprite: true doit 'can save an empty query group' doform.add_query_group('Empty test', :children)form.save_changes- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.', wait: 10)type_bug.reloadquery_group = type_bug.attribute_groups.detect { |x| x.is_a?(Type::QueryGroup) }@@ -105,7 +105,7 @@ RSpec.describe 'form query configuration', js: true, with_cuprite: true doform.add_query_group('Subtasks', :children)# Save changed queryform.save_changes- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.', wait: 10)# Visit wp_tablewp_table.visit!@@ -131,13 +131,13 @@ RSpec.describe 'form query configuration', js: true, with_cuprite: true doform.add_query_group('Subtasks', :children)# Save changed queryform.save_changes- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.', wait: 10)# Visit new wp pagevisit new_project_work_packages_path(project)wp_page.expect_no_group 'Subtasks'- expect(page).not_to have_text 'Subtasks'+ expect(page).to have_no_text 'Subtasks'endend@@ -156,7 +156,7 @@ RSpec.describe 'form query configuration', js: true, with_cuprite: true dofilters.saveform.save_changes- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.', wait: 10)archived.update_attribute(:active, false)@@ -184,7 +184,7 @@ RSpec.describe 'form query configuration', js: true, with_cuprite: true do# Save changed queryform.save_changes- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.', wait: 10)type_bug.reloadquery = type_bug.attribute_groups.detect { |x| x.key == 'Columns Test' }@@ -206,7 +206,7 @@ RSpec.describe 'form query configuration', js: true, with_cuprite: true do# Save changed queryform.save_changes- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.', wait: 10)type_bug.reloadquery = type_bug.attribute_groups.detect { |x| x.key == 'Columns Test' }@@ -253,7 +253,7 @@ RSpec.describe 'form query configuration', js: true, with_cuprite: true dofilters.saveform.save_changes- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.', wait: 10)# Visit work package with that typewp_page.visit!@@ -274,7 +274,7 @@ RSpec.describe 'form query configuration', js: true, with_cuprite: true dowait_for_fetched_options: falseexpect(results).to have_text "Unrelated task"- expect(results).not_to have_text "Bug ##{unrelated_task.id} Unrelated bug"+ expect(results).to have_no_text "Bug ##{unrelated_task.id} Unrelated bug"# Cancel that referencingpage.find('.wp-create-relation--cancel').clickdiff --git a/spec/features/types/form_configuration_spec.rb b/spec/features/types/form_configuration_spec.rbindex 5638152f7d6..b4e94a74aba 100644--- a/spec/features/types/form_configuration_spec.rb+++ b/spec/features/types/form_configuration_spec.rb@@ -78,7 +78,7 @@ RSpec.describe 'form configuration', :js do# Wait for page reloadsleep 1- expect(page).not_to have_css('.group-head', text: 'WHATEVER')+ expect(page).to have_no_css('.group-head', text: 'WHATEVER')form.expect_group('details', 'Details')form.expect_attribute(key: :assignee)end@@ -159,7 +159,7 @@ RSpec.describe 'form configuration', :js doinput.set('FOOBAR')input.send_keys(:escape)expect(page).to have_css('.group-edit-handler', text: 'COOL STUFF')- expect(page).not_to have_css('.group-edit-handler', text: 'FOOBAR')+ expect(page).to have_no_css('.group-edit-handler', text: 'FOOBAR')# Create new groupform.add_attribute_group('New Group')@@ -309,8 +309,8 @@ RSpec.describe 'form configuration', :js do# when adding them to the form configurationproject_settings_page.visit_tab!('custom_fields')- expect(page).to have_selector(".custom-field-#{custom_field.id} td", text: 'MyNumber')- expect(page).to have_selector(".custom-field-#{custom_field.id} td", text: type.name)+ expect(page).to have_css(".custom-field-#{custom_field.id} td", text: 'MyNumber')+ expect(page).to have_css(".custom-field-#{custom_field.id} td", text: type.name)id_checkbox = find("#project_work_package_custom_field_ids_#{custom_field.id}")expect(id_checkbox).to be_checked@@ -328,8 +328,8 @@ RSpec.describe 'form configuration', :js do# Enable in project, should then be visibleproject_settings_page.visit_tab!('custom_fields')- expect(page).to have_selector(".custom-field-#{custom_field.id} td", text: 'MyNumber')- expect(page).to have_selector(".custom-field-#{custom_field.id} td", text: type.name)+ expect(page).to have_css(".custom-field-#{custom_field.id} td", text: 'MyNumber')+ expect(page).to have_css(".custom-field-#{custom_field.id} td", text: type.name)id_checkbox = find("#project_work_package_custom_field_ids_#{custom_field.id}")expect(id_checkbox).not_to be_checked@@ -369,9 +369,9 @@ RSpec.describe 'form configuration', :js do# Ensure CF is checkedproject_settings_page.visit_tab!('custom_fields')- expect(page).to have_selector(".custom-field-#{custom_field.id} td", text: 'MyNumber')- expect(page).to have_selector(".custom-field-#{custom_field.id} td", text: type.name)- expect(page).to have_selector("#project_work_package_custom_field_ids_#{custom_field.id}[checked]")+ expect(page).to have_css(".custom-field-#{custom_field.id} td", text: 'MyNumber')+ expect(page).to have_css(".custom-field-#{custom_field.id} td", text: type.name)+ expect(page).to have_css("#project_work_package_custom_field_ids_#{custom_field.id}[checked]")endendenddiff --git a/spec/features/types/reset_form_configuration_spec.rb b/spec/features/types/reset_form_configuration_spec.rbindex 1a7880903cb..b3040f06763 100644--- a/spec/features/types/reset_form_configuration_spec.rb+++ b/spec/features/types/reset_form_configuration_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Reset form configuration', js: true do+RSpec.describe 'Reset form configuration', :js doshared_let(:admin) { create(:admin) }let(:type) { create(:type) }@@ -60,7 +60,7 @@ RSpec.describe 'Reset form configuration', js: true doform.expect_attribute(key: cf_identifier)form.save_changes- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.', wait: 10)SeleniumHubWaiter.waitform.reset_button.click@@ -70,8 +70,8 @@ RSpec.describe 'Reset form configuration', js: true do# Wait for page reloadSeleniumHubWaiter.wait- expect(page).not_to have_selector('.group-head', text: 'NEW GROUP')- expect(page).not_to have_selector('.group-head', text: 'OTHER')+ expect(page).to have_no_css('.group-head', text: 'NEW GROUP')+ expect(page).to have_no_css('.group-head', text: 'OTHER')type.reloadexpect(type.custom_field_ids).to be_emptydiff --git a/spec/features/users/create_spec.rb b/spec/features/users/create_spec.rbindex 1cbdf997190..7047e250c6b 100644--- a/spec/features/users/create_spec.rb+++ b/spec/features/users/create_spec.rb@@ -45,7 +45,7 @@ RSpec.describe 'create users', :with_cuprite doshared_examples_for 'successful user creation' do |redirect_to_edit_page: true|it 'creates the user' do- expect(page).to have_selector('.op-toast', text: 'Successful creation.')+ expect(page).to have_css('.op-toast', text: 'Successful creation.')new_user = User.order(Arel.sql('id DESC')).firstdiff --git a/spec/features/users/delete_spec.rb b/spec/features/users/delete_spec.rbindex e4313f247d9..e49c341e3a3 100644--- a/spec/features/users/delete_spec.rb+++ b/spec/features/users/delete_spec.rb@@ -61,7 +61,7 @@ RSpec.describe 'user deletion:', :js, :with_cuprite dovisit my_account_pathwithin '#main-menu' do- expect(page).not_to have_content 'Delete account'+ expect(page).to have_no_content 'Delete account'endendend@@ -75,7 +75,7 @@ RSpec.describe 'user deletion:', :js, :with_cuprite dovisit edit_user_path(user)expect(page).to have_content "#{user.firstname} #{user.lastname}"- expect(page).not_to have_content 'Delete account'+ expect(page).to have_no_content 'Delete account'visit deletion_info_user_path(user)expect(page).to have_text 'Error 404'@@ -137,7 +137,7 @@ RSpec.describe 'user deletion:', :js, :with_cuprite doSetting.users_deletable_by_admins = 0visit edit_user_path(user)- expect(page).not_to have_content 'Delete account'+ expect(page).to have_no_content 'Delete account'endit 'can change the deletablilty settings' do@@ -146,8 +146,8 @@ RSpec.describe 'user deletion:', :js, :with_cuprite dovisit admin_settings_users_path- find(:css, "#settings_users_deletable_by_admins").set(true)- find(:css, "#settings_users_deletable_by_self").set(true)+ find_by_id('settings_users_deletable_by_admins').set(true)+ find_by_id('settings_users_deletable_by_self').set(true)click_on 'Save'diff --git a/spec/features/users/edit_users_spec.rb b/spec/features/users/edit_users_spec.rbindex fdbb1490817..0fb5ed885d9 100644--- a/spec/features/users/edit_users_spec.rb+++ b/spec/features/users/edit_users_spec.rb@@ -60,7 +60,7 @@ RSpec.describe 'edit users', :js, :with_cuprite doit 'hides password settings when switching to an LDAP auth source' doauth_select.select auth_source.name- expect(page).not_to have_field('#user_password')+ expect(page).to have_no_field('#user_password')endend@@ -74,7 +74,7 @@ RSpec.describe 'edit users', :js, :with_cuprite doit 'shows external authentication being selected and no password settings' doexpect(auth_select.value).to eq auth_source.id.to_s- expect(page).not_to have_field('#user_password')+ expect(page).to have_no_field('#user_password')endit 'shows password settings when switching back to internal authentication' do@@ -106,17 +106,17 @@ RSpec.describe 'edit users', :js, :with_cuprite doexpect(page).to have_visible_tab('GENERAL')- expect(page).not_to have_selector('.admin-overview-menu-item', text: 'Overview')- expect(page).not_to have_selector('.users-and-permissions-menu-item', text: 'Users and permissions')- expect(page).to have_selector('.users-menu-item.selected', text: 'Users')+ expect(page).to have_no_css('.admin-overview-menu-item', text: 'Overview')+ expect(page).to have_no_css('.users-and-permissions-menu-item', text: 'Users and permissions')+ expect(page).to have_css('.users-menu-item.selected', text: 'Users')expect(page).to have_select(id: 'user_ldap_auth_source_id')- expect(page).not_to have_field '#user_password'+ expect(page).to have_no_field '#user_password'- expect(page).to have_selector '#user_login'- expect(page).to have_selector '#user_firstname'- expect(page).to have_selector '#user_lastname'- expect(page).to have_selector '#user_mail'+ expect(page).to have_css '#user_login'+ expect(page).to have_css '#user_firstname'+ expect(page).to have_css '#user_lastname'+ expect(page).to have_css '#user_mail'firstname_field = find_by_id('user_firstname')firstname_field.value.length.times do@@ -127,7 +127,7 @@ RSpec.describe 'edit users', :js, :with_cuprite doclick_button 'Save'- expect(page).to have_selector('.op-toast.-success', text: 'Successful update.')+ expect(page).to have_css('.op-toast.-success', text: 'Successful update.')user.reload@@ -140,7 +140,7 @@ RSpec.describe 'edit users', :js, :with_cuprite doclick_button 'Send invitation'- expect(page).to have_selector('.op-toast.-success', text: 'An invitation has been sent to [email protected]')+ expect(page).to have_css('.op-toast.-success', text: 'An invitation has been sent to [email protected]')endit 'can not edit attributes of an admin user' dodiff --git a/spec/features/users/invitation_spec.rb b/spec/features/users/invitation_spec.rbindex 669912bebe5..79a29d73db0 100644--- a/spec/features/users/invitation_spec.rb+++ b/spec/features/users/invitation_spec.rb@@ -50,7 +50,7 @@ RSpec.describe 'invitations', :js, :with_cuprite do# Visit invitation link with correct tokenvisit account_activate_path(token: Token::Invitation.last.value)- expect(page).to have_selector('.spot-modal--header', text: 'Welcome to OpenProject')+ expect(page).to have_css('.spot-modal--header', text: 'Welcome to OpenProject')endenddiff --git a/spec/features/users/invite_user_modal/custom_fields_spec.rb b/spec/features/users/invite_user_modal/custom_fields_spec.rbindex 435b8e32820..173584716cb 100644--- a/spec/features/users/invite_user_modal/custom_fields_spec.rb+++ b/spec/features/users/invite_user_modal/custom_fields_spec.rb@@ -103,7 +103,7 @@ RSpec.describe 'Invite user modal custom fields', :js, :with_cuprite doexpect(page).to have_text "Multi list can't be blank."# Does not show the non req field- expect(page).not_to have_text non_req_cf.name+ expect(page).to have_no_text non_req_cf.nameend# Fill all fieldsdiff --git a/spec/features/users/invite_user_modal/invite_user_modal_spec.rb b/spec/features/users/invite_user_modal/invite_user_modal_spec.rbindex df8b28500ab..22bc0fb189c 100644--- a/spec/features/users/invite_user_modal/invite_user_modal_spec.rb+++ b/spec/features/users/invite_user_modal/invite_user_modal_spec.rb@@ -115,7 +115,7 @@ RSpec.describe 'Invite user modal', :js, :with_cuprite dofind('.ng-dropdown-footer button', text: 'Invite', wait: 10).clickmodal.run_all_steps- expect(page).to have_selector('.ng-value-label', text: principal.name)+ expect(page).to have_css('.ng-value-label', text: principal.name)wp_page.save!wp_page.expect_and_dismiss_toaster(message: 'Successful creation.')@@ -182,7 +182,7 @@ RSpec.describe 'Invite user modal', :js, :with_cuprite domodal.project_stepngselect = modal.open_select_in_step 'op-ium-principal-search', query: principal.mailexpect(ngselect).to have_text "No users were found"- expect(ngselect).not_to have_text "Invite: #{principal.mail}"+ expect(ngselect).to have_no_text "Invite: #{principal.mail}"endend@@ -216,7 +216,7 @@ RSpec.describe 'Invite user modal', :js, :with_cuprite doit 'disables projects for which you do not have rights', with_cuprite: false dongselect = modal.open_select_in_step '.ng-select-container'- expect(ngselect).not_to have_text archived_project+ expect(ngselect).to have_no_text archived_projectendendend@@ -296,7 +296,7 @@ RSpec.describe 'Invite user modal', :js, :with_cuprite doit 'cannot add an existing user to the project' doassignee_field.activate!- expect(page).not_to have_selector('.ng-dropdown-footer', text: 'Invite')+ expect(page).to have_no_css('.ng-dropdown-footer', text: 'Invite')endendenddiff --git a/spec/features/users/invite_user_modal/permission_lacking_current_project_spec.rb b/spec/features/users/invite_user_modal/permission_lacking_current_project_spec.rbindex f843529d684..6a84b423df6 100644--- a/spec/features/users/invite_user_modal/permission_lacking_current_project_spec.rb+++ b/spec/features/users/invite_user_modal/permission_lacking_current_project_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'Inviting user in project the current user is lacking permission in',- js: true,- with_cuprite: true do+RSpec.describe 'Inviting user in project the current user is lacking permission in', :js, :with_cuprite dolet(:modal) doComponents::Users::InviteUserModal.new project: invite_project,principal: other_user,diff --git a/spec/features/users/invite_user_modal/subproject_invite_spec.rb b/spec/features/users/invite_user_modal/subproject_invite_spec.rbindex 1d394244e74..05289dac3ff 100644--- a/spec/features/users/invite_user_modal/subproject_invite_spec.rb+++ b/spec/features/users/invite_user_modal/subproject_invite_spec.rb@@ -65,7 +65,7 @@ RSpec.describe 'Invite user modal subprojects', :js, :with_cuprite domodal.expect_openmodal.within_modal do- expect(page).to have_selector '.ng-value', text: 'Subproject'+ expect(page).to have_css '.ng-value', text: 'Subproject'endmodal.run_all_steps@@ -87,9 +87,9 @@ RSpec.describe 'Invite user modal subprojects', :js, :with_cuprite doassignee_field.activate!- expect(page).to have_selector '.ng-dropdown-panel'+ expect(page).to have_css '.ng-dropdown-panel'- expect(page).not_to have_selector('.ng-dropdown-footer button', text: 'Invite')+ expect(page).to have_no_css('.ng-dropdown-footer button', text: 'Invite')endendenddiff --git a/spec/features/users/my_spec.rb b/spec/features/users/my_spec.rbindex afaa7747a78..f0063f97b18 100644--- a/spec/features/users/my_spec.rb+++ b/spec/features/users/my_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'my', js: true, with_cuprite: true do+RSpec.describe 'my', :js, :with_cuprite dolet(:user_password) { 'bob' * 4 }let(:user) docreate(:user,@@ -140,7 +140,7 @@ RSpec.describe 'my', js: true, with_cuprite: true doit 'API tokens can generated and revoked' dovisit my_access_token_path- expect(page).not_to have_content('API tokens are not enabled by the administrator.')+ expect(page).to have_no_content('API tokens are not enabled by the administrator.')within '#api-token-section' doexpect(page).to have_test_selector('api-token-add', text: 'API token')@@ -193,7 +193,7 @@ RSpec.describe 'my', js: true, with_cuprite: true doit 'in Access Tokens they can generate and revoke their RSS key' dovisit my_access_token_path- expect(page).not_to have_content('RSS tokens are not enabled by the administrator.')+ expect(page).to have_no_content('RSS tokens are not enabled by the administrator.')within '#rss-token-section' doexpect(page).to have_test_selector('rss-token-add', text: 'RSS token')@@ -263,7 +263,7 @@ RSpec.describe 'my', js: true, with_cuprite: true doit 'shows iCalendar tokens with their calender and project info' dovisit my_access_token_path- expect(page).not_to have_content('To add an iCalendar token') # ...+ expect(page).to have_no_content('To add an iCalendar token') # ...within '#icalendar-token-section' do[@@ -277,7 +277,7 @@ RSpec.describe 'my', js: true, with_cuprite: true doexpect(page).to have_test_selector("ical-token-row-#{ical_token.id}-name", text: token_name)expect(page).to have_test_selector("ical-token-row-#{ical_token.id}-query-name", text: query.name)expect(page).to have_test_selector("ical-token-row-#{ical_token.id}-project-name",- text: query.project.name)+ text: query.project.name)endendenddiff --git a/spec/features/users/password_change_spec.rb b/spec/features/users/password_change_spec.rbindex 734de1f7016..be6dd3137cb 100644--- a/spec/features/users/password_change_spec.rb+++ b/spec/features/users/password_change_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'random password generation', js: true, with_cuprite: true do+RSpec.describe 'random password generation', :js, :with_cuprite doshared_let(:admin) { create(:admin) }let(:old_password) { 'old_Password!123' }@@ -44,23 +44,23 @@ RSpec.describe 'random password generation', js: true, with_cuprite: true doit 'can log in with a random generated password' douser_page.visit!- expect(page).to have_selector('#user_password')- expect(page).to have_selector('#user_password_confirmation')+ expect(page).to have_css('#user_password')+ expect(page).to have_css('#user_password_confirmation')check 'user_assign_random_password'- expect(page).to have_selector('#user_password[disabled]')- expect(page).to have_selector('#user_password_confirmation[disabled]')+ expect(page).to have_css('#user_password[disabled]')+ expect(page).to have_css('#user_password_confirmation[disabled]')# Remember password for loginpassword = nilexpect(OpenProject::Passwords::Generator)- .to receive(:random_password)- .and_wrap_original { |m, *args| password = m.call(*args) }+ .to(receive(:random_password)+ .and_wrap_original { |m, *args| password = m.call(*args) })click_on 'Save'- expect(page).to have_selector('.op-toast', text: I18n.t(:notice_successful_update))+ expect(page).to have_css('.op-toast', text: I18n.t(:notice_successful_update))expect(password).to be_present# Logout@@ -68,7 +68,7 @@ RSpec.describe 'random password generation', js: true, with_cuprite: true dologin_with user.login, password# Expect password change- expect(page).to have_selector('#new_password')+ expect(page).to have_css('#new_password')# Give wrong passwordfill_in 'password', with: old_password@@ -90,7 +90,7 @@ RSpec.describe 'random password generation', js: true, with_cuprite: true doexpect(Sessions::UserSession.for_user(user.id).count).to be >= 1click_on 'Save'- expect(page).to have_selector('.op-toast.-info', text: I18n.t(:notice_account_password_updated))+ expect(page).to have_css('.op-toast.-info', text: I18n.t(:notice_account_password_updated))# The old session is removedexpect(Sessions::UserSession.find_by(session_id: 'other')).to be_nil@@ -105,7 +105,7 @@ RSpec.describe 'random password generation', js: true, with_cuprite: true dologin_with user.login, new_passwordvisit my_account_path- expect(page).to have_selector('.account-menu-item.selected')+ expect(page).to have_css('.account-menu-item.selected')endit 'can configure and enforce password rules' do@@ -126,7 +126,7 @@ RSpec.describe 'random password generation', js: true, with_cuprite: true dofind_by_id('settings_password_min_adhered_rules').set 3scroll_to_and_click(find('.button', text: 'Save'))- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_update))+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_successful_update))Setting.clear_cache@@ -137,26 +137,26 @@ RSpec.describe 'random password generation', js: true, with_cuprite: true do# Go to user pageuser_page.visit!- expect(page).to have_selector('#user_password')- expect(page).to have_selector('#user_password_confirmation')+ expect(page).to have_css('#user_password')+ expect(page).to have_css('#user_password_confirmation')# And I try to set my new password to "adminADMIN"fill_in 'user_password', with: 'adminADMIN'fill_in 'user_password_confirmation', with: 'adminADMIN'scroll_to_and_click(find('.button', text: 'Save'))- expect(page).to have_selector('.errorExplanation', text: "Password Must contain characters of the following classes")+ expect(page).to have_css('.errorExplanation', text: "Password Must contain characters of the following classes")# 2 of 3 classesfill_in 'user_password', with: 'adminADMIN123'fill_in 'user_password_confirmation', with: 'adminADMIN123'scroll_to_and_click(find('.button', text: 'Save'))- expect(page).to have_selector('.errorExplanation', text: "Password Must contain characters of the following classes")+ expect(page).to have_css('.errorExplanation', text: "Password Must contain characters of the following classes")# All classesfill_in 'user_password', with: 'adminADMIN!'fill_in 'user_password_confirmation', with: 'adminADMIN!'scroll_to_and_click(find('.button', text: 'Save'))- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_update))+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_successful_update))endend@@ -169,12 +169,11 @@ RSpec.describe 'random password generation', js: true, with_cuprite: true douser_page.visit!end- context 'with 2 of lowercase, uppercase, and numeric characters',- js: true, with_settings: {- password_active_rules: %w(lowercase uppercase numeric),- password_min_adhered_rules: 2,- password_min_length: 4- } do+ context 'with 2 of lowercase, uppercase, and numeric characters', :js, with_settings: {+ password_active_rules: %w(lowercase uppercase numeric),+ password_min_adhered_rules: 2,+ password_min_length: 4+ } doit 'enforces those rules' do# Change to valid password according to specuser_page.change_password(old_password, 'password')diff --git a/spec/features/users/self_registration_spec.rb b/spec/features/users/self_registration_spec.rbindex 1cb683a3062..b4de1f33fe3 100644--- a/spec/features/users/self_registration_spec.rb+++ b/spec/features/users/self_registration_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'user self registration', js: true, with_cuprite: true do+RSpec.describe 'user self registration', :js, :with_cuprite dolet(:admin_password) { 'Test123Test123' }let(:admin) { create(:admin, password: admin_password, password_confirmation: admin_password) }let(:home_page) { Pages::Home.new }@@ -55,7 +55,7 @@ RSpec.describe 'user self registration', js: true, with_cuprite: true do.to have_content('Your account was created and is now pending administrator approval.')end- it 'allows self registration and activation by an admin', signout_via_visit: true do+ it 'allows self registration and activation by an admin', :signout_via_visit dohome_page.visit!# registration as an anonymous user@@ -120,7 +120,7 @@ RSpec.describe 'user self registration', js: true, with_cuprite: true dowithin '.op-app-header' doexpect(page)- .to have_selector("a[title='#{registered_user.name}']")+ .to have_css("a[title='#{registered_user.name}']")endendenddiff --git a/spec/features/users/show_spec.rb b/spec/features/users/show_spec.rbindex a2eb351fcaa..597b6132333 100644--- a/spec/features/users/show_spec.rb+++ b/spec/features/users/show_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'index users', js: true, with_cuprite: true do+RSpec.describe 'index users', :js, :with_cuprite docurrent_user { create(:admin) }let(:index_page) { Pages::Admin::Users::Index.new }@@ -43,9 +43,9 @@ RSpec.describe 'index users', js: true, with_cuprite: true dovisit user_path(current_user)- expect(page).to have_selector('li', text: "Project: #{project.name}")+ expect(page).to have_css('li', text: "Project: #{project.name}")expected_work_package_title = "#{work_package.type.name} ##{work_package.id}: #{work_package.subject} " \"(Project: #{work_package.project.name})"- expect(page).to have_selector('li', text: expected_work_package_title)+ expect(page).to have_css('li', text: expected_work_package_title)endenddiff --git a/spec/features/users/user_memberships_spec.rb b/spec/features/users/user_memberships_spec.rbindex cabfaffdca1..23d8e234634 100644--- a/spec/features/users/user_memberships_spec.rb+++ b/spec/features/users/user_memberships_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require_relative '../principals/shared_memberships_examples'-RSpec.describe 'user memberships through user page', js: true, with_cuprite: true do+RSpec.describe 'user memberships through user page', :js, :with_cuprite doinclude_context 'principal membership management context'shared_let(:principal) { create(:user, firstname: 'Foobar', lastname: 'Blabla') }diff --git a/spec/features/versions/delete_spec.rb b/spec/features/versions/delete_spec.rbindex cda7755a22f..906bfeeecb0 100644--- a/spec/features/versions/delete_spec.rb+++ b/spec/features/versions/delete_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'version delete', js: true, with_cuprite: true do+RSpec.describe 'version delete', :js, :with_cuprite dolet!(:project) { create(:project, name: 'Parent') }let!(:archived_child) { create(:project, name: 'Archived child', parent: project, active: false) }@@ -53,8 +53,8 @@ RSpec.describe 'version delete', js: true, with_cuprite: true doendend- expect(page).to have_selector('.op-toast.-error', text: I18n.t(:error_can_not_delete_in_use_archived_undisclosed))- expect(page).not_to have_selector("a", text: 'Archived child')+ expect(page).to have_css('.op-toast.-error', text: I18n.t(:error_can_not_delete_in_use_archived_undisclosed))+ expect(page).to have_no_css("a", text: 'Archived child')user.update!(admin: true)@@ -67,7 +67,7 @@ RSpec.describe 'version delete', js: true, with_cuprite: true doendend- expect(page).to have_selector('.op-toast.-error', text: 'There are also work packages in archived projects.')- expect(page).to have_selector("a", text: 'Archived child')+ expect(page).to have_css('.op-toast.-error', text: 'There are also work packages in archived projects.')+ expect(page).to have_css("a", text: 'Archived child')endenddiff --git a/spec/features/versions/graph_spec.rb b/spec/features/versions/graph_spec.rbindex 70abd75e1d2..8dbb3e60388 100644--- a/spec/features/versions/graph_spec.rb+++ b/spec/features/versions/graph_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'version show graph', js: true do+RSpec.describe 'version show graph', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }let(:version) { create(:version, project:) }@@ -45,7 +45,7 @@ RSpec.describe 'version show graph', js: true doendit 'shows a status graph' do- expect(page).to have_selector('.work-packages-embedded-view--container', wait: 20)- expect(page).to have_selector('.op-wp-embeded-graph', visible: :all, wait: 20)+ expect(page).to have_css('.work-packages-embedded-view--container', wait: 20)+ expect(page).to have_css('.op-wp-embeded-graph', visible: :all, wait: 20)endenddiff --git a/spec/features/watching/toggle_watching_spec.rb b/spec/features/watching/toggle_watching_spec.rbindex a0dd17e7e3f..705b1079259 100644--- a/spec/features/watching/toggle_watching_spec.rb+++ b/spec/features/watching/toggle_watching_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Toggle watching', js: true do+RSpec.describe 'Toggle watching', :js dolet(:project) { create(:project) }let(:role) { create(:project_role, permissions: %i[view_messages view_wiki_pages]) }let(:user) { create(:user, member_with_roles: { project => role }) }diff --git a/spec/features/wiki/adding_editing_history_spec.rb b/spec/features/wiki/adding_editing_history_spec.rbindex 6e28ff17e91..583847e257f 100644--- a/spec/features/wiki/adding_editing_history_spec.rb+++ b/spec/features/wiki/adding_editing_history_spec.rb@@ -66,7 +66,7 @@ RSpec.describe 'wiki pages', :js, with_settings: { journal_aggregation_time_minuit 'adding, editing and history' dovisit project_settings_modules_path(project)- expect(page).not_to have_selector('.menu-sidebar .main-item-wrapper', text: 'Wiki')+ expect(page).to have_no_css('.menu-sidebar .main-item-wrapper', text: 'Wiki')within '#content' docheck 'Wiki'@@ -74,7 +74,7 @@ RSpec.describe 'wiki pages', :js, with_settings: { journal_aggregation_time_minuclick_button 'Save'end- expect(page).to have_selector('.wiki-menu--main-item', text: 'Wiki', visible: :all)+ expect(page).to have_css('.wiki-menu--main-item', text: 'Wiki', visible: :all)# creating by accessing the pagevisit project_wiki_path(project, 'new page')@@ -82,8 +82,8 @@ RSpec.describe 'wiki pages', :js, with_settings: { journal_aggregation_time_minufind('.ck-content').base.send_keys(content_first_version)click_button 'Save'- expect(page).to have_selector('.title-container', text: 'New page')- expect(page).to have_selector('.wiki-content', text: content_first_version)+ expect(page).to have_css('.title-container', text: 'New page')+ expect(page).to have_css('.wiki-content', text: content_first_version)within '.toolbar-items' doSeleniumHubWaiter.wait@@ -94,7 +94,7 @@ RSpec.describe 'wiki pages', :js, with_settings: { journal_aggregation_time_minuSeleniumHubWaiter.waitclick_button 'Save'- expect(page).to have_selector('.wiki-content', text: content_second_version)+ expect(page).to have_css('.wiki-content', text: content_second_version)within '.toolbar-items' doSeleniumHubWaiter.wait@@ -106,8 +106,8 @@ RSpec.describe 'wiki pages', :js, with_settings: { journal_aggregation_time_minuclick_on 'View differences'within '.text-diff' do- expect(page).to have_selector('ins.diffmod', text: 'second')- expect(page).to have_selector('del.diffmod', text: 'first')+ expect(page).to have_css('ins.diffmod', text: 'second')+ expect(page).to have_css('del.diffmod', text: 'first')endSeleniumHubWaiter.wait@@ -119,14 +119,14 @@ RSpec.describe 'wiki pages', :js, with_settings: { journal_aggregation_time_minuSeleniumHubWaiter.waitfind('td.id a', text: 1).click- expect(page).to have_selector('.wiki-version--details', text: 'Version 1/2')- expect(page).to have_selector('.wiki-content', text: content_first_version)+ expect(page).to have_css('.wiki-version--details', text: 'Version 1/2')+ expect(page).to have_css('.wiki-content', text: content_first_version)SeleniumHubWaiter.waitfind('.button', text: 'Next').click- expect(page).to have_selector('.wiki-version--details', text: 'Version 2/2')- expect(page).to have_selector('.wiki-content', text: content_second_version)+ expect(page).to have_css('.wiki-version--details', text: 'Version 2/2')+ expect(page).to have_css('.wiki-content', text: content_second_version)login_as other_user@@ -150,7 +150,7 @@ RSpec.describe 'wiki pages', :js, with_settings: { journal_aggregation_time_minuclick_on 'History'end- expect(page).to have_selector('tr.wiki-page-version:last-of-type .author', text: other_user.name)- expect(page).to have_selector('tr.wiki-page-version:last-of-type .comments', text: other_user_comment)+ expect(page).to have_css('tr.wiki-page-version:last-of-type .author', text: other_user.name)+ expect(page).to have_css('tr.wiki-page-version:last-of-type .comments', text: other_user_comment)endenddiff --git a/spec/features/wiki/attachment_upload_spec.rb b/spec/features/wiki/attachment_upload_spec.rbindex 29b11d4843c..0a431c2c518 100644--- a/spec/features/wiki/attachment_upload_spec.rb+++ b/spec/features/wiki/attachment_upload_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'features/page_objects/notification'-RSpec.describe 'Upload attachment to wiki page', js: true do+RSpec.describe 'Upload attachment to wiki page', :js dolet(:user) docreate(:user,member_with_permissions: { project => %i[view_wiki_pages edit_wiki_pages] })@@ -57,7 +57,7 @@ RSpec.describe 'Upload attachment to wiki page', js: true doclick_on 'Save'expect(page).to have_text("Successful creation")- expect(page).to have_selector('#content img', count: 1)+ expect(page).to have_css('#content img', count: 1)expect(page).to have_content('Image uploaded the first time')attachments_list.expect_attached('image.png')@@ -78,8 +78,8 @@ RSpec.describe 'Upload attachment to wiki page', js: true doeditor.in_editor do |container, _|# Expect URL is mapped to the correct URL- expect(container).to have_selector('img[src^="/api/v3/attachments/"]', count: 2)- expect(container).not_to have_selector('img[src="image.png"]')+ expect(container).to have_css('img[src^="/api/v3/attachments/"]', count: 2)+ expect(container).to have_no_css('img[src="image.png"]')container.find('img[src^="/api/v3/attachments/"]', match: :first).clickend@@ -89,18 +89,18 @@ RSpec.describe 'Upload attachment to wiki page', js: true doclick_on 'Save'expect(page).to have_text("Successful update")- expect(page).to have_selector('#content img', count: 2)+ expect(page).to have_css('#content img', count: 2)# First figcaption is lost by having replaced the markdownexpect(page).to have_content('Image uploaded the second time')attachments_list.expect_attached('image.png', count: 2)# Both images rendered referring to the api endpoint- expect(page).to have_selector('img[src^="/api/v3/attachments/"]', count: 2)+ expect(page).to have_css('img[src^="/api/v3/attachments/"]', count: 2)# The first image is resized using width:yypx style- expect(page).to have_selector 'figure.op-uc-figure img[style*="width:"]'+ expect(page).to have_css 'figure.op-uc-figure img[style*="width:"]'- expect(wiki_page_content).to have_selector '.op-uc-image[src^="/api/v3/attachments"]'+ expect(wiki_page_content).to have_css '.op-uc-image[src^="/api/v3/attachments"]'endit 'can upload an image to new and existing wiki page via drag & drop on attachments' dodiff --git a/spec/features/wiki/child_pages_spec.rb b/spec/features/wiki/child_pages_spec.rbindex 5e685fbfcb8..2c1a6f81857 100644--- a/spec/features/wiki/child_pages_spec.rb+++ b/spec/features/wiki/child_pages_spec.rb@@ -62,12 +62,12 @@ RSpec.describe 'wiki child pages', :js doclick_button 'Save'# hierarchy displayed in the breadcrumb- expect(page).to have_selector("#breadcrumb #{test_selector('op-breadcrumb')}",- text: parent_page.title.to_s)+ expect(page).to have_css("#breadcrumb #{test_selector('op-breadcrumb')}",+ text: parent_page.title.to_s)# hierarchy displayed in the sidebar- expect(page).to have_selector('.pages-hierarchy',- text: "#{parent_page.title}\n#{child_page_name}")+ expect(page).to have_css('.pages-hierarchy',+ text: "#{parent_page.title}\n#{child_page_name}")# on toc pagevisit index_project_wiki_index_path(project)diff --git a/spec/features/wiki/edit_new_page_spec.rb b/spec/features/wiki/edit_new_page_spec.rbindex e0efe3ff3eb..50f0a7b6fb1 100644--- a/spec/features/wiki/edit_new_page_spec.rb+++ b/spec/features/wiki/edit_new_page_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Editing a new wiki page', js: true do+RSpec.describe 'Editing a new wiki page', :js dolet(:project) { create(:project, enabled_module_names: %w[wiki]) }let(:user) { create(:admin) }@@ -41,6 +41,6 @@ RSpec.describe 'Editing a new wiki page', js: true doexpect(page).to have_field 'page_title', with: 'Foobar'click_on 'Save'- expect(page).to have_selector('.op-toast.-success', text: 'Successful creation.', wait: 10)+ expect(page).to have_css('.op-toast.-success', text: 'Successful creation.', wait: 10)endenddiff --git a/spec/features/wiki/restore_main_item_spec.rb b/spec/features/wiki/restore_main_item_spec.rbindex 9f699507ebd..72321e2edbb 100644--- a/spec/features/wiki/restore_main_item_spec.rb+++ b/spec/features/wiki/restore_main_item_spec.rb@@ -45,7 +45,7 @@ RSpec.describe 'Wiki page - restoring main wiki item' dovisit project_path(project)expect(page)- .to have_selector('.wiki-menu--main-item')+ .to have_css('.wiki-menu--main-item')# Delete all items for some reasonMenuItems::WikiMenuItem.main_items(project.wiki).destroy_all@@ -55,7 +55,7 @@ RSpec.describe 'Wiki page - restoring main wiki item' dovisit project_path(project)expect(page)- .to have_selector('.wiki-menu--main-item')+ .to have_css('.wiki-menu--main-item')expect(MenuItems::WikiMenuItem.main_items(project.wiki).count).to eq 1enddiff --git a/spec/features/wiki/wiki_page_external_link_spec.rb b/spec/features/wiki/wiki_page_external_link_spec.rbindex 00307712d10..96b6978fb6e 100644--- a/spec/features/wiki/wiki_page_external_link_spec.rb+++ b/spec/features/wiki/wiki_page_external_link_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Wiki page external link', js: true do+RSpec.describe 'Wiki page external link', :js doshared_let(:admin) { create(:admin) }current_user { admin }diff --git a/spec/features/wiki/wiki_page_navigation_spec.rb b/spec/features/wiki/wiki_page_navigation_spec.rbindex 6abfb2dbf70..3a259602368 100644--- a/spec/features/wiki/wiki_page_navigation_spec.rb+++ b/spec/features/wiki/wiki_page_navigation_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Wiki page navigation spec', js: true do+RSpec.describe 'Wiki page navigation spec', :js doshared_let(:admin) { create(:admin) }current_user { admin }@@ -51,9 +51,9 @@ RSpec.describe 'Wiki page navigation spec', js: true doit 'scrolls to the selected page on load (Regression #36937)' dovisit project_wiki_path(project, wiki_page_55)- expect(page).to have_selector('div.wiki-content')+ expect(page).to have_css('div.wiki-content')- expect(page).to have_selector('.title-container h2', text: 'Wiki Page No. 55')+ expect(page).to have_css('.title-container h2', text: 'Wiki Page No. 55')# Expect scrolled to menu nodeexpect_element_in_view page.find('.tree-menu--item.-selected', text: 'Wiki Page No. 55')diff --git a/spec/features/wiki/wiki_unicode_spec.rb b/spec/features/wiki/wiki_unicode_spec.rbindex 6d120b2ae0b..ed60fb5ef99 100644--- a/spec/features/wiki/wiki_unicode_spec.rb+++ b/spec/features/wiki/wiki_unicode_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Wiki unicode title spec', js: true do+RSpec.describe 'Wiki unicode title spec', :js doshared_let(:admin) { create(:admin) }let(:user) { admin }@@ -90,22 +90,22 @@ RSpec.describe 'Wiki unicode title spec', js: true dofind('.ck-content').base.send_keys(wiki_body)click_button 'Save'- expect(page).to have_selector('.title-container h2', text: 'Wiki')- expect(page).to have_selector('a.wiki-page', count: 5)+ expect(page).to have_css('.title-container h2', text: 'Wiki')+ expect(page).to have_css('a.wiki-page', count: 5)endit 'shows renders correct links' doexpected_titles.each_with_index do |title, i|visit project_wiki_path(project, :wiki)- expect(page).to have_selector('div.wiki-content')+ expect(page).to have_css('div.wiki-content')target_link = all('div.wiki-content a.wiki-page')[i]expect(target_link.text).to eq(title)expect(target_link[:href]).to match("/wiki/#{expected_slugs[i]}")target_link.click- expect(page).to have_selector('.title-container h2', text: title)+ expect(page).to have_css('.title-container h2', text: title)endendenddiff --git a/spec/features/work_package_show_spec.rb b/spec/features/work_package_show_spec.rbindex b0e0c491e03..88336e5d254 100644--- a/spec/features/work_package_show_spec.rb+++ b/spec/features/work_package_show_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Work package show page', selenium: true do+RSpec.describe 'Work package show page', :selenium dolet(:user) { create(:admin) }let(:project) { create(:project) }let(:work_package) do@@ -43,7 +43,7 @@ RSpec.describe 'Work package show page', selenium: true dowork_package.save!end- it 'all different angular based work package views', js: true do+ it 'all different angular based work package views', :js dowp_page = Pages::FullWorkPackage.new(work_package)wp_page.visit!diff --git a/spec/features/work_packages/attachments/attachment_upload_spec.rb b/spec/features/work_packages/attachments/attachment_upload_spec.rbindex 33d083f94a8..479a0ddbfb4 100644--- a/spec/features/work_packages/attachments/attachment_upload_spec.rb+++ b/spec/features/work_packages/attachments/attachment_upload_spec.rb@@ -148,7 +148,7 @@ RSpec.describe 'Upload attachment to work package', :js, :with_cuprite doeditor.in_editor do |_container, editable|expect(editable).to have_css('img[src*="/api/v3/attachments/"]', wait: 20)- expect(editable).not_to have_css('.ck-upload-placeholder-loader')+ expect(editable).to have_no_css('.ck-upload-placeholder-loader')endsleep 2 unless example.metadata[:with_cuprite]@@ -216,7 +216,7 @@ RSpec.describe 'Upload attachment to work package', :js, :with_cuprite doeditor.in_editor do |_container, editable|expect(editable).to have_css('img[src*="/api/v3/attachments/"]', wait: 20)- expect(editable).not_to have_css('.ck-upload-placeholder-loader')+ expect(editable).to have_no_css('.ck-upload-placeholder-loader')endsleep 2 unless example.metadata[:with_cuprite]diff --git a/spec/features/work_packages/bulk/copy_work_package_spec.rb b/spec/features/work_packages/bulk/copy_work_package_spec.rbindex 635f159e6b0..fd9f238613d 100644--- a/spec/features/work_packages/bulk/copy_work_package_spec.rb+++ b/spec/features/work_packages/bulk/copy_work_package_spec.rb@@ -71,9 +71,9 @@ RSpec.describe 'Copy work packages through Rails view', :js, :with_cuprite docontext_menu.choose 'Bulk copy'expect(page).to have_css('#new_project_id') # rubocop:disable RSpec/ExpectInHook-+wait_for_network_idle-+expect_page_reload doselect_autocomplete page.find_test_selector('new_project_id'),query: project2.name,diff --git a/spec/features/work_packages/bulk/move_work_package_spec.rb b/spec/features/work_packages/bulk/move_work_package_spec.rbindex d88b219d166..881fefb192e 100644--- a/spec/features/work_packages/bulk/move_work_package_spec.rb+++ b/spec/features/work_packages/bulk/move_work_package_spec.rb@@ -2,7 +2,7 @@ require 'spec_helper'require 'features/page_objects/notification'require 'support/components/autocompleter/ng_select_autocomplete_helpers'-RSpec.describe 'Moving a work package through Rails view', js: true do+RSpec.describe 'Moving a work package through Rails view', :js doinclude Components::Autocompleter::NgSelectAutocompleteHelperslet(:dev_role) do@@ -82,7 +82,7 @@ RSpec.describe 'Moving a work package through Rails view', js: true docontext_menu.choose 'Change project'# On work packages move page- expect(page).to have_selector('#new_project_id')+ expect(page).to have_css('#new_project_id')select_autocomplete page.find_test_selector('new_project_id'),query: 'Target',select_text: 'Target',@@ -159,9 +159,9 @@ RSpec.describe 'Moving a work package through Rails view', js: true doendexpect(page)- .to have_selector('.op-toast.-error',- text: I18n.t(:'work_packages.bulk.none_could_be_saved',- total: 1))+ .to have_css('.op-toast.-error',+ text: I18n.t(:'work_packages.bulk.none_could_be_saved',+ total: 1))child_wp.reloadwork_package.reloadexpect(work_package.project_id).to eq(project.id)@@ -180,7 +180,7 @@ RSpec.describe 'Moving a work package through Rails view', js: true doclick_on 'Move and follow'end- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')child_wp.reloadwork_package.reload@@ -224,21 +224,21 @@ RSpec.describe 'Moving a work package through Rails view', js: true doit 'displays an error message explaining which work package could not be moved and why' doexpect(page)- .to have_selector('.op-toast.-error',- text: I18n.t('work_packages.bulk.could_not_be_saved'))+ .to have_css('.op-toast.-error',+ text: I18n.t('work_packages.bulk.could_not_be_saved'))expect(page)- .to have_selector(+ .to have_css('.op-toast.-error',text: "#{work_package2.id}: Project #{I18n.t('activerecord.errors.messages.error_readonly')}")expect(page)- .to have_selector('.op-toast.-error',- text: I18n.t('work_packages.bulk.x_out_of_y_could_be_saved',- failing: 1,- total: 2,- success: 1))+ .to have_css('.op-toast.-error',+ text: I18n.t('work_packages.bulk.x_out_of_y_could_be_saved',+ failing: 1,+ total: 2,+ success: 1))expect(work_package.reload.project_id).to eq(project2.id)expect(work_package2.reload.project_id).to eq(project.id)diff --git a/spec/features/work_packages/bulk/update_work_package_spec.rb b/spec/features/work_packages/bulk/update_work_package_spec.rbindex 84bfb998bfb..0b5392c67cf 100644--- a/spec/features/work_packages/bulk/update_work_package_spec.rb+++ b/spec/features/work_packages/bulk/update_work_package_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'require 'features/page_objects/notification'-RSpec.describe 'Bulk update work packages through Rails view', js: true, with_cuprite: true do+RSpec.describe 'Bulk update work packages through Rails view', :js, :with_cuprite doshared_let(:type) { create(:type, name: 'Bug') }shared_let(:project) { create(:project, name: 'Source', types: [type]) }shared_let(:status) { create(:status) }@@ -108,19 +108,19 @@ RSpec.describe 'Bulk update work packages through Rails view', js: true, with_cuclick_on 'Submit'expect(page)- .to have_selector(+ .to have_css('.op-toast.-error',text: I18n.t('work_packages.bulk.none_could_be_saved', total: 2))expect(page)- .to have_selector(+ .to have_css('.op-toast.-error',text: "#{work_package.id}: Parent #{I18n.t('activerecord.errors.messages.does_not_exist')}")expect(page)- .to have_selector(+ .to have_css('.op-toast.-error',text: <<~MSG.squish#{work_package2.id}:@@ -149,13 +149,13 @@ RSpec.describe 'Bulk update work packages through Rails view', js: true, with_cuclick_on 'Submit'expect(page)- .to have_selector(+ .to have_css('.op-toast.-error',text: I18n.t('work_packages.bulk.x_out_of_y_could_be_saved', total: 2, failing: 1, success: 1))expect(page)- .to have_selector(+ .to have_css('.op-toast.-error',text: <<~MSG.squish#{work_package2.id}:@@ -184,7 +184,7 @@ RSpec.describe 'Bulk update work packages through Rails view', js: true, with_cufill_in custom_field.name, with: 'Custom field text'click_on 'Submit'- expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_update))+ expect(page).to have_css('.op-toast.-success', text: I18n.t(:notice_successful_update))# Should update 2 work package custom fieldswork_package.reloaddiff --git a/spec/features/work_packages/cancel_editing_spec.rb b/spec/features/work_packages/cancel_editing_spec.rbindex 8994187d29f..038d1cd3694 100644--- a/spec/features/work_packages/cancel_editing_spec.rb+++ b/spec/features/work_packages/cancel_editing_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Cancel editing work package', js: true do+RSpec.describe 'Cancel editing work package', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }let(:work_package) { create(:work_package, project:) }@@ -53,7 +53,7 @@ RSpec.describe 'Cancel editing work package', js: true dodef expect_active_edit(path)visit pathexpect_angular_frontend_initialized- expect(page).to have_selector('#wp-new-inline-edit--field-subject', wait: 10)+ expect(page).to have_css('#wp-new-inline-edit--field-subject', wait: 10)enddef expect_subject(val)@@ -65,7 +65,7 @@ RSpec.describe 'Cancel editing work package', js: true dofind('.op-logo--link').clickpage.driver.browser.switch_to.alert.accept if alert- expect(page).to have_selector('#projects-menu', text: 'Select a project')+ expect(page).to have_css('#projects-menu', text: 'Select a project')endit 'does not show an alert when moving to other pages' do@@ -92,7 +92,7 @@ RSpec.describe 'Cancel editing work package', js: true dowp_table.open_split_view(work_package2)page.driver.browser.switch_to.alert.dismiss- expect(page).to have_selector('#wp-new-inline-edit--field-subject')+ expect(page).to have_css('#wp-new-inline-edit--field-subject')expect(wp_page).not_to have_alert_dialogend@@ -138,14 +138,14 @@ RSpec.describe 'Cancel editing work package', js: true dofind('.work-packages-show-view-button').clickexpect(wp_page).not_to have_alert_dialog- expect(page).to have_selector('#wp-new-inline-edit--field-subject')+ expect(page).to have_css('#wp-new-inline-edit--field-subject')expect_subject('foobar')# Moving back also workspage.execute_script('window.history.back()')expect(wp_page).not_to have_alert_dialog- expect(page).to have_selector('#wp-new-inline-edit--field-subject')+ expect(page).to have_css('#wp-new-inline-edit--field-subject')expect_subject('foobar')# Cancel edition@@ -193,8 +193,8 @@ RSpec.describe 'Cancel editing work package', js: true dowp_table.open_split_view(work_package2)expect(wp_page).not_to have_alert_dialog- expect(page).not_to have_selector('#wp-new-inline-edit--field-subject')- expect(page).to have_selector('.work-packages--details--subject', text: work_package2.subject)+ expect(page).to have_no_css('#wp-new-inline-edit--field-subject')+ expect(page).to have_css('.work-packages--details--subject', text: work_package2.subject)# Moving somewhere elseexpect_active_edit(new_split_work_packages_path)diff --git a/spec/features/work_packages/cards/wp_card_status_spec.rb b/spec/features/work_packages/cards/wp_card_status_spec.rbindex e05d15aa4f4..0e5ddd9444a 100644--- a/spec/features/work_packages/cards/wp_card_status_spec.rb+++ b/spec/features/work_packages/cards/wp_card_status_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Update status from WP card', js: true, with_cuprite: true do+RSpec.describe 'Update status from WP card', :js, :with_cuprite dolet(:manager_role) docreate(:project_role, permissions: %i[view_work_packages edit_work_packages])enddiff --git a/spec/features/work_packages/copy_spec.rb b/spec/features/work_packages/copy_spec.rbindex cebe4f303be..53ccc792d3b 100644--- a/spec/features/work_packages/copy_spec.rb+++ b/spec/features/work_packages/copy_spec.rb@@ -100,9 +100,9 @@ RSpec.describe 'Work package copy', :js, :selenium doto_copy_work_package_page.update_attributes Description: 'Copied WP Description'to_copy_work_package_page.save!- expect(page).to have_selector('.op-toast--content',- text: I18n.t('js.notice_successful_create'),- wait: 20)+ expect(page).to have_css('.op-toast--content',+ text: I18n.t('js.notice_successful_create'),+ wait: 20)copied_work_package = WorkPackage.order(created_at: 'desc').first@@ -123,7 +123,7 @@ RSpec.describe 'Work package copy', :js, :selenium dowork_package_page.visit_tab! :relationsexpect_angular_frontend_initialized- expect(page).to have_selector('.relation-group--header', text: 'RELATED TO', wait: 20)+ expect(page).to have_css('.relation-group--header', text: 'RELATED TO', wait: 20)expect(page).to have_test_selector('op-relation--row-subject', text: original_work_package.subject)end@@ -176,7 +176,7 @@ RSpec.describe 'Work package copy', :js, :selenium dowork_package_page.visit_tab!('relations')expect_angular_frontend_initialized- expect(page).to have_selector('.relation-group--header', text: 'RELATED TO', wait: 20)+ expect(page).to have_css('.relation-group--header', text: 'RELATED TO', wait: 20)expect(page).to have_test_selector('op-relation--row-subject', text: original_work_package.subject)endenddiff --git a/spec/features/work_packages/datepicker/datepicker_follows_relation_spec.rb b/spec/features/work_packages/datepicker/datepicker_follows_relation_spec.rbindex b2bbbfca5f1..b8d4a3ceb30 100644--- a/spec/features/work_packages/datepicker/datepicker_follows_relation_spec.rb+++ b/spec/features/work_packages/datepicker/datepicker_follows_relation_spec.rb@@ -29,9 +29,7 @@require 'spec_helper'require 'support/edit_fields/edit_field'-RSpec.describe 'Datepicker logic on follow relationships',- js: true,- with_cuprite: true,+RSpec.describe 'Datepicker logic on follow relationships', :js, :with_cuprite,with_settings: { date_format: '%Y-%m-%d' } doshared_let(:user) { create(:admin) }@@ -45,7 +43,6 @@ RSpec.describe 'Datepicker logic on follow relationships',due_date: Date.parse('2024-02-05'))end-let(:work_packages_page) { Pages::FullWorkPackage.new(follower) }let(:datepicker) { date_field.datepicker }diff --git a/spec/features/work_packages/datepicker/datepicker_logic_spec.rb b/spec/features/work_packages/datepicker/datepicker_logic_spec.rbindex 919fc1d5078..3d1a10a9a0b 100644--- a/spec/features/work_packages/datepicker/datepicker_logic_spec.rb+++ b/spec/features/work_packages/datepicker/datepicker_logic_spec.rb@@ -29,9 +29,7 @@require 'spec_helper'require 'support/edit_fields/edit_field'-RSpec.describe 'Datepicker modal logic test cases (WP #43539)',- js: true,- with_cuprite: true, with_settings: { date_format: '%Y-%m-%d' } do+RSpec.describe 'Datepicker modal logic test cases (WP #43539)', :js, :with_cuprite, with_settings: { date_format: '%Y-%m-%d' } doshared_let(:user) { create(:admin) }shared_let(:type_bug) { create(:type_bug) }diff --git a/spec/features/work_packages/datepicker/datepicker_non_working_day_spec.rb b/spec/features/work_packages/datepicker/datepicker_non_working_day_spec.rbindex 279e8234193..a5e34ae11eb 100644--- a/spec/features/work_packages/datepicker/datepicker_non_working_day_spec.rb+++ b/spec/features/work_packages/datepicker/datepicker_non_working_day_spec.rb@@ -29,8 +29,7 @@require 'spec_helper'require 'support/edit_fields/edit_field'-RSpec.describe 'Datepicker modal individual non working days (WP #44453)',- js: true,+RSpec.describe 'Datepicker modal individual non working days (WP #44453)', :js,with_settings: { date_format: '%Y-%m-%d' } doshared_let(:user) { create(:admin) }shared_let(:project) { create(:project) }diff --git a/spec/features/work_packages/datepicker/datepicker_parent_spec.rb b/spec/features/work_packages/datepicker/datepicker_parent_spec.rbindex a437506ce6e..1aa18d14b62 100644--- a/spec/features/work_packages/datepicker/datepicker_parent_spec.rb+++ b/spec/features/work_packages/datepicker/datepicker_parent_spec.rb@@ -29,8 +29,7 @@require 'spec_helper'require 'support/edit_fields/edit_field'-RSpec.describe 'Datepicker logic on parents',- js: true, with_settings: { date_format: '%Y-%m-%d' } do+RSpec.describe 'Datepicker logic on parents', :js, with_settings: { date_format: '%Y-%m-%d' } doshared_let(:user) { create(:admin) }# assume sat+sun are non working daysdiff --git a/spec/features/work_packages/details/closed_status_and_version_spec.rb b/spec/features/work_packages/details/closed_status_and_version_spec.rbindex 875e2aa8297..46293fc9c65 100644--- a/spec/features/work_packages/details/closed_status_and_version_spec.rb+++ b/spec/features/work_packages/details/closed_status_and_version_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Closed status and version in full view', js: true do+RSpec.describe 'Closed status and version in full view', :js dolet(:type) { create(:type) }let(:status) { create(:closed_status) }@@ -25,6 +25,6 @@ RSpec.describe 'Closed status and version in full view', js: true dowp_page.expect_and_dismiss_toaster type: :error,message: I18n.t('js.work_packages.message_work_package_status_blocked')- expect(page).to have_selector("#{test_selector('op-wp-status-button')} button[disabled]")+ expect(page).to have_css("#{test_selector('op-wp-status-button')} button[disabled]")endenddiff --git a/spec/features/work_packages/details/context_menu_spec.rb b/spec/features/work_packages/details/context_menu_spec.rbindex 1145d71dae1..54cab9a7b52 100644--- a/spec/features/work_packages/details/context_menu_spec.rb+++ b/spec/features/work_packages/details/context_menu_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Work package single context menu', js: true do+RSpec.describe 'Work package single context menu', :js dolet(:user) { create(:admin) }let(:work_package) { create(:work_package) }@@ -14,8 +14,8 @@ RSpec.describe 'Work package single context menu', js: true doit 'sets the correct copy project link' dofind('.menu-item', text: 'Copy to other project', exact_text: true).click- expect(page).to have_selector('h2', text: I18n.t(:button_copy))- expect(page).to have_selector('a.work_package', text: "##{work_package.id}")+ expect(page).to have_css('h2', text: I18n.t(:button_copy))+ expect(page).to have_css('a.work_package', text: "##{work_package.id}")expect(page).to have_current_path /work_packages\/move\/new\?copy=true&ids\[\]=#{work_package.id}/enddiff --git a/spec/features/work_packages/details/custom_fields/custom_field_spec.rb b/spec/features/work_packages/details/custom_fields/custom_field_spec.rbindex ceeb3586bab..5ce3fc766c4 100644--- a/spec/features/work_packages/details/custom_fields/custom_field_spec.rb+++ b/spec/features/work_packages/details/custom_fields/custom_field_spec.rb@@ -2,7 +2,7 @@ require 'spec_helper'require 'features/work_packages/work_packages_page'require 'features/work_packages/details/inplace_editor/shared_examples'-RSpec.describe 'custom field inplace editor', js: true do+RSpec.describe 'custom field inplace editor', :js dolet(:user) { create(:admin) }let(:type) { create(:type_standard, custom_fields:) }let(:project) dodiff --git a/spec/features/work_packages/details/date_editor_spec.rb b/spec/features/work_packages/details/date_editor_spec.rbindex ac8791a7bee..b91f1fe192f 100644--- a/spec/features/work_packages/details/date_editor_spec.rb+++ b/spec/features/work_packages/details/date_editor_spec.rb@@ -33,8 +33,7 @@ require 'features/work_packages/shared_contexts'require 'support/edit_fields/edit_field'require 'features/work_packages/work_packages_page'-RSpec.describe 'date inplace editor',- js: true, selenium: true, with_settings: { date_format: '%Y-%m-%d' } do+RSpec.describe 'date inplace editor', :js, :selenium, with_settings: { date_format: '%Y-%m-%d' } doshared_let(:project) { create(:project_with_types, public: true) }shared_let(:user) { create(:admin) }shared_let(:type) { project.types.first }@@ -271,7 +270,7 @@ RSpec.describe 'date inplace editor',work_packages_page.accept_alert_dialog! if work_packages_page.has_alert_dialog?# Ensure no modal survives- expect(page).not_to have_selector('.spot-modal')+ expect(page).to have_no_css('.spot-modal')endcontext 'with a date custom field' do@@ -353,17 +352,17 @@ RSpec.describe 'date inplace editor',let(:schedule_manually) { true }it 'shows a banner that the relations are ignored' do- expect(page).to have_selector("#{test_selector('op-modal-banner-warning')} span",- text: 'Manual scheduling enabled, all relations ignored.',- wait: 5)+ expect(page).to have_css("#{test_selector('op-modal-banner-warning')} span",+ text: 'Manual scheduling enabled, all relations ignored.',+ wait: 5)# When toggling manually scheduledstart_date.toggle_scheduling_mode# Expect new banner infoexpect(page)- .to have_selector("#{test_selector('op-modal-banner-warning')} span",- text: 'Changing these dates will affect dates of related work packages.')+ .to have_css("#{test_selector('op-modal-banner-warning')} span",+ text: 'Changing these dates will affect dates of related work packages.')new_window = window_opened_by { click_on 'Show relations' }switch_to_window new_window@@ -381,15 +380,15 @@ RSpec.describe 'date inplace editor',it 'shows a banner that the start date is limited' doexpect(page)- .to have_selector("#{test_selector('op-modal-banner-warning')} span",- text: 'Changing these dates will affect dates of related work packages.',- wait: 5)+ .to have_css("#{test_selector('op-modal-banner-warning')} span",+ text: 'Changing these dates will affect dates of related work packages.',+ wait: 5)# When toggling manually scheduledstart_date.toggle_scheduling_mode- expect(page).to have_selector("#{test_selector('op-modal-banner-warning')} span",- text: 'Manual scheduling enabled, all relations ignored.')+ expect(page).to have_css("#{test_selector('op-modal-banner-warning')} span",+ text: 'Manual scheduling enabled, all relations ignored.')endendend@@ -411,15 +410,15 @@ RSpec.describe 'date inplace editor',let(:schedule_manually) { true }it 'shows a banner that the relations are ignored' do- expect(page).to have_selector("#{test_selector('op-modal-banner-warning')} span",- text: 'Manual scheduling enabled, all relations ignored.')+ expect(page).to have_css("#{test_selector('op-modal-banner-warning')} span",+ text: 'Manual scheduling enabled, all relations ignored.')# When toggling manually scheduledstart_date.toggle_scheduling_mode# Expect banner to switch- expect(page).to have_selector("#{test_selector('op-modal-banner-info')} span",- text: 'Automatically scheduled. Dates are derived from relations.')+ expect(page).to have_css("#{test_selector('op-modal-banner-info')} span",+ text: 'Automatically scheduled. Dates are derived from relations.')new_window = window_opened_by { click_on 'Show relations' }switch_to_window new_window@@ -434,14 +433,14 @@ RSpec.describe 'date inplace editor',let(:schedule_manually) { false }it 'shows a banner that the dates are not editable' do- expect(page).to have_selector("#{test_selector('op-modal-banner-info')} span",- text: 'Automatically scheduled. Dates are derived from relations.')+ expect(page).to have_css("#{test_selector('op-modal-banner-info')} span",+ text: 'Automatically scheduled. Dates are derived from relations.')# When toggling manually scheduledstart_date.toggle_scheduling_mode- expect(page).to have_selector("#{test_selector('op-modal-banner-warning')} span",- text: 'Manual scheduling enabled, all relations ignored.')+ expect(page).to have_css("#{test_selector('op-modal-banner-warning')} span",+ text: 'Manual scheduling enabled, all relations ignored.')new_window = window_opened_by { click_on 'Show relations' }switch_to_window new_window@@ -461,8 +460,8 @@ RSpec.describe 'date inplace editor',endit 'allows switching to manual scheduling to set the ignore NWD (Regression #43933)' do- expect(page).to have_selector("#{test_selector('op-modal-banner-info')} span",- text: 'Automatically scheduled. Dates are derived from relations.')+ expect(page).to have_css("#{test_selector('op-modal-banner-info')} span",+ text: 'Automatically scheduled. Dates are derived from relations.')# Expect "Working days only" to be checkeddatepicker.expect_ignore_non_working_days_disabled@@ -474,16 +473,16 @@ RSpec.describe 'date inplace editor',datepicker.toggle_ignore_non_working_daysdatepicker.expect_ignore_non_working_days true- expect(page).to have_selector("#{test_selector('op-modal-banner-warning')} span",- text: 'Manual scheduling enabled, all relations ignored.')+ expect(page).to have_css("#{test_selector('op-modal-banner-warning')} span",+ text: 'Manual scheduling enabled, all relations ignored.')# Reset when disabledstart_date.toggle_scheduling_modedatepicker.expect_ignore_non_working_days_disableddatepicker.expect_ignore_non_working_days false, disabled: true- expect(page).to have_selector("#{test_selector('op-modal-banner-info')} span",- text: 'Automatically scheduled. Dates are derived from relations.')+ expect(page).to have_css("#{test_selector('op-modal-banner-info')} span",+ text: 'Automatically scheduled. Dates are derived from relations.')endendend@@ -509,15 +508,15 @@ RSpec.describe 'date inplace editor',let(:schedule_manually) { true }it 'shows a banner that the relations are ignored' do- expect(page).to have_selector("#{test_selector('op-modal-banner-warning')} span",- text: 'Manual scheduling enabled, all relations ignored.')+ expect(page).to have_css("#{test_selector('op-modal-banner-warning')} span",+ text: 'Manual scheduling enabled, all relations ignored.')# When toggling manually scheduledstart_date.toggle_scheduling_mode# Expect new banner info- expect(page).to have_selector("#{test_selector('op-modal-banner-info')} span",- text: 'Available start and finish dates are limited by relations.')+ expect(page).to have_css("#{test_selector('op-modal-banner-info')} span",+ text: 'Available start and finish dates are limited by relations.')new_window = window_opened_by { click_on 'Show relations' }switch_to_window new_window@@ -532,14 +531,14 @@ RSpec.describe 'date inplace editor',let(:schedule_manually) { false }it 'shows a banner that the start date is limited' do- expect(page).to have_selector("#{test_selector('op-modal-banner-info')} span",- text: 'Available start and finish dates are limited by relations.')+ expect(page).to have_css("#{test_selector('op-modal-banner-info')} span",+ text: 'Available start and finish dates are limited by relations.')# When toggling manually scheduledstart_date.toggle_scheduling_mode- expect(page).to have_selector("#{test_selector('op-modal-banner-warning')} span",- text: 'Manual scheduling enabled, all relations ignored.')+ expect(page).to have_css("#{test_selector('op-modal-banner-warning')} span",+ text: 'Manual scheduling enabled, all relations ignored.')endendend@@ -564,15 +563,15 @@ RSpec.describe 'date inplace editor',let(:schedule_manually) { true }it 'shows a banner that the relations are ignored' do- expect(page).to have_selector("#{test_selector('op-modal-banner-warning')} span",- text: 'Manual scheduling enabled, all relations ignored.')+ expect(page).to have_css("#{test_selector('op-modal-banner-warning')} span",+ text: 'Manual scheduling enabled, all relations ignored.')# When toggling manually scheduledstart_date.toggle_scheduling_modeexpect(page)- .to have_selector("#{test_selector('op-modal-banner-warning')} span",- text: 'Changing these dates will affect dates of related work packages.')+ .to have_css("#{test_selector('op-modal-banner-warning')} span",+ text: 'Changing these dates will affect dates of related work packages.')new_window = window_opened_by { click_on 'Show relations' }switch_to_window new_window@@ -588,14 +587,14 @@ RSpec.describe 'date inplace editor',it 'shows a banner that the start date is limited' doexpect(page)- .to have_selector("#{test_selector('op-modal-banner-warning')} span",- text: 'Changing these dates will affect dates of related work packages.')+ .to have_css("#{test_selector('op-modal-banner-warning')} span",+ text: 'Changing these dates will affect dates of related work packages.')# When toggling manually scheduledstart_date.toggle_scheduling_mode- expect(page).to have_selector("#{test_selector('op-modal-banner-warning')} span",- text: 'Manual scheduling enabled, all relations ignored.')+ expect(page).to have_css("#{test_selector('op-modal-banner-warning')} span",+ text: 'Manual scheduling enabled, all relations ignored.')endendenddiff --git a/spec/features/work_packages/details/details_toolbar_spec.rb b/spec/features/work_packages/details/details_toolbar_spec.rbindex 0d5d5a303e6..48b9ed001fa 100644--- a/spec/features/work_packages/details/details_toolbar_spec.rb+++ b/spec/features/work_packages/details/details_toolbar_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'features/work_packages/work_packages_page'-RSpec.describe 'Work package details toolbar', js: true, selenium: true do+RSpec.describe 'Work package details toolbar', :js, :selenium dolet(:project) { create(:project_with_types, public: true) }let!(:work_package) { create(:work_package, project:) }let(:work_packages_page) { WorkPackagesPage.new(project) }@@ -44,15 +44,15 @@ RSpec.describe 'Work package details toolbar', js: true, selenium: true doit 'toggles the watch state' doexpect(work_package.watcher_users).not_to include(user)- expect(page).to have_selector('.work-packages--details-toolbar button', text: 'Watch')+ expect(page).to have_css('.work-packages--details-toolbar button', text: 'Watch')within '.work-packages--details-toolbar' doclick_button 'Watch'end- expect(page).to have_selector('.work-packages--details-toolbar button', text: 'Unwatch')+ expect(page).to have_css('.work-packages--details-toolbar button', text: 'Unwatch')expect(work_package.reload.watcher_users).to include(user)- expect(page).to have_selector('.work-packages--details-toolbar button', text: 'Unwatch')+ expect(page).to have_css('.work-packages--details-toolbar button', text: 'Unwatch')endendenddiff --git a/spec/features/work_packages/details/inplace_editor/shared_examples.rb b/spec/features/work_packages/details/inplace_editor/shared_examples.rbindex a95d07c66f3..1b7c1a9e7ad 100644--- a/spec/features/work_packages/details/inplace_editor/shared_examples.rb+++ b/spec/features/work_packages/details/inplace_editor/shared_examples.rb@@ -101,7 +101,7 @@ RSpec.shared_examples 'a workpackage autocomplete field' dofield.activate!field.clearfield.type(" ##{wp2.id}")- expect(page).to have_selector('.mention-list-item', text: wp2.to_s.strip)+ expect(page).to have_css('.mention-list-item', text: wp2.to_s.strip)endend@@ -132,9 +132,9 @@ RSpec.shared_examples 'a principal autocomplete field' dofield.activate!field.clear with_backspace: truefield.input_element.send_keys(" @lau")- expect(page).to have_selector('.mention-list-item', text: mentioned_user.name)- expect(page).to have_selector('.mention-list-item', text: mentioned_group.name)- expect(page).not_to have_selector('.mention-list-item', text: user.name)+ expect(page).to have_css('.mention-list-item', text: mentioned_user.name)+ expect(page).to have_css('.mention-list-item', text: mentioned_group.name)+ expect(page).to have_no_css('.mention-list-item', text: user.name)# Close the autocompleterfield.input_element.send_keys :escape@@ -143,9 +143,9 @@ RSpec.shared_examples 'a principal autocomplete field' dosleep 2field.ckeditor.type_slowly '@Laura'- expect(page).to have_selector('.mention-list-item', text: mentioned_user.name)- expect(page).not_to have_selector('.mention-list-item', text: mentioned_group.name)- expect(page).not_to have_selector('.mention-list-item', text: user.name)+ expect(page).to have_css('.mention-list-item', text: mentioned_user.name)+ expect(page).to have_no_css('.mention-list-item', text: mentioned_group.name)+ expect(page).to have_no_css('.mention-list-item', text: user.name)endend@@ -190,7 +190,7 @@ RSpec.shared_examples 'not a principal autocomplete field' dofield.clear with_backspace: truefield.input_element.send_keys(" @lau")sleep 2- expect(page).not_to have_selector('.mention-list-item')+ expect(page).to have_no_css('.mention-list-item')endenddiff --git a/spec/features/work_packages/details/inplace_editor/version_editor_spec.rb b/spec/features/work_packages/details/inplace_editor/version_editor_spec.rbindex d482fb0cb3f..120d461958f 100644--- a/spec/features/work_packages/details/inplace_editor/version_editor_spec.rb+++ b/spec/features/work_packages/details/inplace_editor/version_editor_spec.rb@@ -4,7 +4,7 @@ require 'features/work_packages/shared_contexts'require 'support/edit_fields/edit_field'require 'features/work_packages/work_packages_page'-RSpec.describe 'subject inplace editor', js: true, selenium: true do+RSpec.describe 'subject inplace editor', :js, :selenium dolet(:project) { create(:project_with_types, name: 'Root', public: true) }let(:subproject1) { create(:project_with_types, name: 'Child', parent: project) }let(:subproject2) { create(:project_with_types, name: 'Aunt', parent: project) }@@ -62,10 +62,10 @@ RSpec.describe 'subject inplace editor', js: true, selenium: true dofield = work_package_page.work_package_field(:version)field.activate!- expect(page).to have_selector('.ng-option-label', text: '-')- expect(page).to have_selector('.ng-option-label', text: version3.name)- expect(page).to have_selector('.ng-option-label', text: version2.name)- expect(page).to have_selector('.ng-option-label', text: version.name)+ expect(page).to have_css('.ng-option-label', text: '-')+ expect(page).to have_css('.ng-option-label', text: version3.name)+ expect(page).to have_css('.ng-option-label', text: version2.name)+ expect(page).to have_css('.ng-option-label', text: version.name)# Expect the order to be descending by version datelabels = page.all('.ng-option-label').map { |el| el.text.strip }@@ -103,7 +103,7 @@ RSpec.describe 'subject inplace editor', js: true, selenium: true dofield.activate!field.input_element.find('input').set 'Version that does not exist'- expect(page).not_to have_selector('.ng-option', text: 'Create: Version that does not exist')+ expect(page).to have_no_css('.ng-option', text: 'Create: Version that does not exist')endendenddiff --git a/spec/features/work_packages/details/markdown/activity_comments_spec.rb b/spec/features/work_packages/details/markdown/activity_comments_spec.rbindex d87fc7ea6a5..64a72b3c82a 100644--- a/spec/features/work_packages/details/markdown/activity_comments_spec.rb+++ b/spec/features/work_packages/details/markdown/activity_comments_spec.rb@@ -3,7 +3,7 @@ require 'spec_helper'require 'features/work_packages/shared_contexts'require 'features/work_packages/details/inplace_editor/shared_examples'-RSpec.describe 'activity comments', js: true do+RSpec.describe 'activity comments', :js dolet(:project) { create(:project, public: true) }let!(:work_package) docreate(:work_package,@@ -42,7 +42,7 @@ RSpec.describe 'activity comments', js: true docomment_field.click_and_type_slowly 'this is a comment'comment_field.submit_by_enter- expect(page).not_to have_selector('.user-comment .message', text: 'this is a comment')+ expect(page).to have_no_css('.user-comment .message', text: 'this is a comment')endit 'submits with click' do@@ -56,7 +56,7 @@ RSpec.describe 'activity comments', js: true docomment_field.click_and_type_slowly 'this is my first comment!1'comment_field.submit_by_click- expect(page).to have_selector('.user-comment > .message', count: 2)+ expect(page).to have_css('.user-comment > .message', count: 2)wp_page.expect_comment text: 'this is my first comment!1'expect(comment_field.editing?).to be false@@ -66,7 +66,7 @@ RSpec.describe 'activity comments', js: true docomment_field.click_and_type_slowly 'this is my second comment!1'comment_field.submit_by_click- expect(page).to have_selector('.user-comment > .message', count: 3)+ expect(page).to have_css('.user-comment > .message', count: 3)wp_page.expect_comment text: 'this is my second comment!1'expect(comment_field.editing?).to be false@@ -77,12 +77,12 @@ RSpec.describe 'activity comments', js: true docomment_field.submit_by_click# Only shows three most recent- expect(page).to have_selector('.user-comment > .message', count: 3)+ expect(page).to have_css('.user-comment > .message', count: 3)wp_page.expect_comment text: 'this is my third comment!1'wp_page.switch_to_tab tab: 'Activity'# Now showing all comments- expect(page).to have_selector('.user-comment > .message', count: 4, wait: 10)+ expect(page).to have_css('.user-comment > .message', count: 4, wait: 10)expect(comment_field.editing?).to be falsecomment_field.activate!@@ -91,11 +91,11 @@ RSpec.describe 'activity comments', js: true docomment_field.click_and_type_slowly 'this is my fifth comment!1'comment_field.submit_by_click- expect(page).to have_selector('.user-comment > .message', count: 4)+ expect(page).to have_css('.user-comment > .message', count: 4)wp_page.expect_comment text: 'this is my fifth comment!1'# Expect no activity details- expect(page).not_to have_selector('.work-package-details-activities-messages li')+ expect(page).to have_no_css('.work-package-details-activities-messages li')endend@@ -108,13 +108,13 @@ RSpec.describe 'activity comments', js: true docomment_field.cancel_by_escapeexpect(comment_field.editing?).to be true- expect(page).not_to have_selector('.user-comment .message', text: 'this is a comment')+ expect(page).to have_no_css('.user-comment .message', text: 'this is a comment')# Click should cancel the editingcomment_field.cancel_by_clickexpect(comment_field.editing?).to be false- expect(page).not_to have_selector('.user-comment .message', text: 'this is a comment')+ expect(page).to have_no_css('.user-comment .message', text: 'this is a comment')endend@@ -124,7 +124,7 @@ RSpec.describe 'activity comments', js: true doit 'can move to the work package by click (Regression #30928)' docomment_field.input_element.send_keys("##{wp2.id}")- expect(page).to have_selector('.mention-list-item', text: wp2.to_s.strip)+ expect(page).to have_css('.mention-list-item', text: wp2.to_s.strip)comment_field.submit_by_clickpage.find('#activity-2 a.issue', text: wp2.id).click@@ -181,8 +181,8 @@ RSpec.describe 'activity comments', js: true dodescribe 'quoting' doit 'can quote a previous comment' do- expect(page).to have_selector('.user-comment .message',- text: initial_comment)+ expect(page).to have_css('.user-comment .message',+ text: initial_comment)# Hover commentquoted = page.find('.user-comment > .message')@@ -194,7 +194,7 @@ RSpec.describe 'activity comments', js: true doexpect(comment_field.editing?).to be true# Add our comment- expect(comment_field.input_element).to have_selector('blockquote')+ expect(comment_field.input_element).to have_css('blockquote')quote = comment_field.input_element[:innerHTML]expect(quote).to eq '<p class="op-uc-p">Anonymous wrote:</p><blockquote class="op-uc-blockquote"><p class="op-uc-p">the first comment in this WP</p></blockquote>'@@ -227,7 +227,7 @@ RSpec.describe 'activity comments', js: true do# Insert a new reference using the autocompletercomment_field.input_element.send_keys "Single ##{work_package2.id}"expect(page)- .to have_selector('.mention-list-item', text: "#{work_package2.type.name} ##{work_package2.id}:")+ .to have_css('.mention-list-item', text: "#{work_package2.type.name} ##{work_package2.id}:")find('.mention-list-item', text: "#{work_package2.type.name} ##{work_package2.id}:").click@@ -246,8 +246,8 @@ RSpec.describe 'activity comments', js: true docomment_field.submit_by_clickwp_page.expect_comment text: "Single ##{work_package2.id}"- expect(page).to have_selector('.user-comment opce-macro-wp-quickinfo', count: 2)- expect(page).to have_selector('.user-comment .work-package--quickinfo.preview-trigger', count: 2)+ expect(page).to have_css('.user-comment opce-macro-wp-quickinfo', count: 2)+ expect(page).to have_css('.user-comment .work-package--quickinfo.preview-trigger', count: 2)endend@@ -293,7 +293,7 @@ RSpec.describe 'activity comments', js: true doendit 'does not show the field' do- expect(page).not_to have_selector(selector, visible: true)+ expect(page).to have_no_selector(selector, visible: true)endendenddiff --git a/spec/features/work_packages/details/markdown/description_editor_spec.rb b/spec/features/work_packages/details/markdown/description_editor_spec.rbindex 63d7740ffc9..b05ba27261a 100644--- a/spec/features/work_packages/details/markdown/description_editor_spec.rb+++ b/spec/features/work_packages/details/markdown/description_editor_spec.rb@@ -32,7 +32,7 @@ require 'features/work_packages/shared_contexts'require 'support/edit_fields/edit_field'require 'features/work_packages/work_packages_page'-RSpec.describe 'description inplace editor', js: true, selenium: true do+RSpec.describe 'description inplace editor', :js, :selenium dolet(:project) { create(:project_with_types, public: true) }let(:property_name) { :description }let(:property_title) { 'Description' }@@ -118,7 +118,7 @@ RSpec.describe 'description inplace editor', js: true, selenium: true dolet(:user) { create(:user, member_with_roles: { project => role }) }it 'does not show the field' do- expect(page).not_to have_selector('.inline-edit--display-field.description.-editable')+ expect(page).to have_no_css('.inline-edit--display-field.description.-editable')field.display_element.clickfield.expect_inactive!diff --git a/spec/features/work_packages/details/markdown/todolist_spec.rb b/spec/features/work_packages/details/markdown/todolist_spec.rbindex 68165b9d430..47831b8436c 100644--- a/spec/features/work_packages/details/markdown/todolist_spec.rb+++ b/spec/features/work_packages/details/markdown/todolist_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Todolists in CKEditor', js: true do+RSpec.describe 'Todolists in CKEditor', :js dolet(:user) { create(:admin) }before do@@ -83,26 +83,26 @@ RSpec.describe 'Todolists in CKEditor', js: true dowp_page.expect_and_dismiss_toaster message: 'Successful update.'within(field.display_element) do- expect(page).to have_selector('.op-uc-list--task-checkbox', count: 5)- expect(page).to have_selector('.op-uc-list--task-checkbox[checked]', count: 2)+ expect(page).to have_css('.op-uc-list--task-checkbox', count: 5)+ expect(page).to have_css('.op-uc-list--task-checkbox[checked]', count: 2)- expect(page).to have_selector('.op-uc-list--item', text: 'Todo item 1')- expect(page).to have_selector('.op-uc-list--item', text: 'Todo item 2')- expect(page).to have_selector('.op-uc-list--item', text: 'Todo item 3')+ expect(page).to have_css('.op-uc-list--item', text: 'Todo item 1')+ expect(page).to have_css('.op-uc-list--item', text: 'Todo item 2')+ expect(page).to have_css('.op-uc-list--item', text: 'Todo item 3')- expect(page).to have_selector('.op-uc-list .op-uc-list .op-uc-list--item', text: 'Nested item 1')- expect(page).to have_selector('.op-uc-list .op-uc-list .op-uc-list--item', text: 'Nested item 2')+ expect(page).to have_css('.op-uc-list .op-uc-list .op-uc-list--item', text: 'Nested item 1')+ expect(page).to have_css('.op-uc-list .op-uc-list .op-uc-list--item', text: 'Nested item 2')first_item = page.find('.op-uc-list--item', text: 'Todo item 1')- expect(first_item).to have_selector('.op-uc-list--task-checkbox[checked]')+ expect(first_item).to have_css('.op-uc-list--task-checkbox[checked]')first_nested_item = page.find('.op-uc-list .op-uc-list .op-uc-list--item', text: 'Nested item 1')- expect(first_nested_item).to have_selector('.op-uc-list--task-checkbox[checked]')+ expect(first_nested_item).to have_css('.op-uc-list--task-checkbox[checked]')end# Expect still the same when editing againfield.activate!ckeditor.in_editor do |_container, editable|- expect(editable).to have_selector('.op-uc-list li', count: 5)+ expect(editable).to have_css('.op-uc-list li', count: 5)first_item = editable.all('.op-uc-list li')[0].find('input[type=checkbox]', visible: :all)expect(first_item).to be_checked@@ -122,16 +122,16 @@ RSpec.describe 'Todolists in CKEditor', js: true dowp_page.expect_and_dismiss_toaster message: 'Successful update.'within(field.display_element) do- expect(page).to have_selector('.op-uc-list--task-checkbox', count: 5)- expect(page).to have_selector('.op-uc-list--task-checkbox[checked]', count: 3)+ expect(page).to have_css('.op-uc-list--task-checkbox', count: 5)+ expect(page).to have_css('.op-uc-list--task-checkbox[checked]', count: 3)first_item = page.find('.op-uc-list--item', text: 'Todo item 1')- expect(first_item).to have_selector('.op-uc-list--task-checkbox[checked]')+ expect(first_item).to have_css('.op-uc-list--task-checkbox[checked]')first_nested_item = page.find('.op-uc-list .op-uc-list .op-uc-list--item', text: 'Nested item 1')- expect(first_nested_item).to have_selector('.op-uc-list--task-checkbox[checked]')+ expect(first_nested_item).to have_css('.op-uc-list--task-checkbox[checked]')last_item = page.find('.op-uc-list .op-uc-list--item', text: 'Todo item 3')- expect(last_item).to have_selector('.op-uc-list--task-checkbox[checked]')+ expect(last_item).to have_css('.op-uc-list--task-checkbox[checked]')endendend@@ -181,10 +181,10 @@ RSpec.describe 'Todolists in CKEditor', js: true dowp_page.save!wp_page.expect_and_dismiss_toaster message: 'Successful creation.'- expect(page).to have_selector('.op-uc-list--task-checkbox', count: 3)- expect(page).to have_selector('.op-uc-list--task-checkbox[checked]', count: 1)+ expect(page).to have_css('.op-uc-list--task-checkbox', count: 3)+ expect(page).to have_css('.op-uc-list--task-checkbox[checked]', count: 1)- expect(page).to have_selector('.op-uc-list--item a[href="https://community.openproject.com/"]')+ expect(page).to have_css('.op-uc-list--item a[href="https://community.openproject.com/"]')nested_link = page.find('.op-uc-list--item .op-uc-list--item a[href="https://community.openproject.com/nested"]')expect(nested_link.text).to eq 'This is a link'@@ -216,20 +216,20 @@ RSpec.describe 'Todolists in CKEditor', js: true dowp_page.expect_and_dismiss_toaster message: 'Successful creation.'within(field.display_element) do- expect(page).to have_selector('.op-uc-list--task-checkbox', count: 2)- expect(page).to have_selector('.op-uc-list--task-checkbox[checked]', count: 1)+ expect(page).to have_css('.op-uc-list--task-checkbox', count: 2)+ expect(page).to have_css('.op-uc-list--task-checkbox[checked]', count: 1)- expect(page).to have_selector('.op-uc-list--item', text: 'Todo item 1')- expect(page).to have_selector('.op-uc-list--item', text: 'Todo item 2')+ expect(page).to have_css('.op-uc-list--item', text: 'Todo item 1')+ expect(page).to have_css('.op-uc-list--item', text: 'Todo item 2')first_item = page.find('.op-uc-list--item', text: 'Todo item 1')- expect(first_item).to have_selector('.op-uc-list--task-checkbox[checked]')+ expect(first_item).to have_css('.op-uc-list--task-checkbox[checked]')end# Expect still the same when editing againfield.activate!ckeditor.in_editor do |_container, editable|- expect(editable).to have_selector('.op-uc-list li', count: 2)+ expect(editable).to have_css('.op-uc-list li', count: 2)first_item = editable.all('.op-uc-list li')[0].find('input[type=checkbox]', visible: :all)expect(first_item).to be_checked@@ -245,14 +245,14 @@ RSpec.describe 'Todolists in CKEditor', js: true dowp_page.expect_and_dismiss_toaster message: 'Successful update.'within(field.display_element) do- expect(page).to have_selector('.op-uc-list--task-checkbox', count: 2)- expect(page).to have_selector('.op-uc-list--task-checkbox[checked]', count: 2)+ expect(page).to have_css('.op-uc-list--task-checkbox', count: 2)+ expect(page).to have_css('.op-uc-list--task-checkbox[checked]', count: 2)first_item = page.find('.op-uc-list--item', text: 'Todo item 1')- expect(first_item).to have_selector('.op-uc-list--task-checkbox[checked]')+ expect(first_item).to have_css('.op-uc-list--task-checkbox[checked]')last_item = page.find('.op-uc-list .op-uc-list--item', text: 'Todo item 2')- expect(last_item).to have_selector('.op-uc-list--task-checkbox[checked]')+ expect(last_item).to have_css('.op-uc-list--task-checkbox[checked]')endendenddiff --git a/spec/features/work_packages/details/milestones_spec.rb b/spec/features/work_packages/details/milestones_spec.rbindex e7e3506b043..4439aa6cd57 100644--- a/spec/features/work_packages/details/milestones_spec.rb+++ b/spec/features/work_packages/details/milestones_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Milestones full screen v iew', js: true do+RSpec.describe 'Milestones full screen v iew', :js dolet(:type) { create(:type, is_milestone: true) }let(:project) { create(:project, types: [type]) }let!(:work_package) do@@ -31,7 +31,7 @@ RSpec.describe 'Milestones full screen v iew', js: true doexpect(button).not_to be_disabledbutton.click- expect(page).to have_selector('.menu-item', text: type.name.upcase)+ expect(page).to have_css('.menu-item', text: type.name.upcase)endenddiff --git a/spec/features/work_packages/details/query_groups/relation_query_group_spec.rb b/spec/features/work_packages/details/query_groups/relation_query_group_spec.rbindex 63b8606ad7d..92d4ec3046e 100644--- a/spec/features/work_packages/details/query_groups/relation_query_group_spec.rb+++ b/spec/features/work_packages/details/query_groups/relation_query_group_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Work package with relation query group', js: true, selenium: true do+RSpec.describe 'Work package with relation query group', :js, :selenium doinclude_context 'ng-select-autocomplete helpers'let(:user) { create(:admin) }@@ -150,7 +150,7 @@ RSpec.describe 'Work package with relation query group', js: true, selenium: trufull_wp.visit!full_wp.ensure_page_loaded- expect(page).to have_selector('.attributes-group--header-text', text: query_text, wait: 20)+ expect(page).to have_css('.attributes-group--header-text', text: query_text, wait: 20)embedded_table.expect_work_package_listed related_work_packageembedded_table.click_inline_create@@ -176,8 +176,8 @@ RSpec.describe 'Work package with relation query group', js: true, selenium: trufull_wp.ensure_page_loaded# Will first try to load the query, and then hide it.- expect(page).not_to have_selector('.attributes-group--header-text', text: query_text, wait: 20)- expect(page).not_to have_selector('.work-packages-embedded-view--container .op-toast.-error')+ expect(page).to have_no_css('.attributes-group--header-text', text: query_text, wait: 20)+ expect(page).to have_no_css('.work-packages-embedded-view--container .op-toast.-error')endendenddiff --git a/spec/features/work_packages/details/relations/hierarchy_custom_fields_spec.rb b/spec/features/work_packages/details/relations/hierarchy_custom_fields_spec.rbindex 610771b07d2..cae9d3d05c8 100644--- a/spec/features/work_packages/details/relations/hierarchy_custom_fields_spec.rb+++ b/spec/features/work_packages/details/relations/hierarchy_custom_fields_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'creating a child directly after the wp itself was created', js: true do+RSpec.describe 'creating a child directly after the wp itself was created', :js dolet(:user) { create(:admin) }let(:project) { create(:project, types: [type]) }let(:wp_page) { Pages::FullWorkPackageCreate.new }diff --git a/spec/features/work_packages/details/relations/hierarchy_milestone_spec.rb b/spec/features/work_packages/details/relations/hierarchy_milestone_spec.rbindex ae67ed7a3bd..325771c868b 100644--- a/spec/features/work_packages/details/relations/hierarchy_milestone_spec.rb+++ b/spec/features/work_packages/details/relations/hierarchy_milestone_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'work package hierarchies for milestones', js: true, selenium: true do+RSpec.describe 'work package hierarchies for milestones', :js, :selenium dolet(:user) { create(:admin) }let(:type) { create(:type, is_milestone: true) }let(:project) { create(:project, types: [type]) }@@ -50,9 +50,9 @@ RSpec.describe 'work package hierarchies for milestones', js: true, selenium: trit 'does not provide links to add children or existing children (Regression #28745)' dowithin('.wp-relations--children') do- expect(page).not_to have_text('Add existing child')- expect(page).not_to have_text('Create new child')- expect(page).not_to have_selector('wp-inline-create--add-link')+ expect(page).to have_no_text('Add existing child')+ expect(page).to have_no_text('Create new child')+ expect(page).to have_no_css('wp-inline-create--add-link')endendenddiff --git a/spec/features/work_packages/details/relations/hierarchy_spec.rb b/spec/features/work_packages/details/relations/hierarchy_spec.rbindex c786a839022..b4f0ccf8040 100644--- a/spec/features/work_packages/details/relations/hierarchy_spec.rb+++ b/spec/features/work_packages/details/relations/hierarchy_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.shared_examples 'work package relations tab', js: true, selenium: true do+RSpec.shared_examples 'work package relations tab', :js, :selenium doinclude_context 'ng-select-autocomplete helpers'let(:user) { create(:admin) }@@ -206,17 +206,17 @@ RSpec.shared_examples 'work package relations tab', js: true, selenium: true doit 'shows no links to create relations' do# No create buttons should exist- expect(page).not_to have_selector('.wp-relations-create-button')+ expect(page).to have_no_css('.wp-relations-create-button')# Test for add relation- expect(page).not_to have_selector('#relation--add-relation')+ expect(page).to have_no_css('#relation--add-relation')# Test for add parent- expect(page).not_to have_selector('.wp-relation--parent-change')+ expect(page).to have_no_css('.wp-relation--parent-change')# Test for add children- expect(page).not_to have_selector('#hierarchy--add-existing-child')- expect(page).not_to have_selector('#hierarchy--add-new-child')+ expect(page).to have_no_css('#hierarchy--add-existing-child')+ expect(page).to have_no_css('#hierarchy--add-new-child')# But it should show the linked parentexpect(page).to have_test_selector('op-wp-breadcrumb-parent', text: parent.subject)diff --git a/spec/features/work_packages/details/relations/relations_spec.rb b/spec/features/work_packages/details/relations/relations_spec.rbindex 4f42bcfceea..74e8ec10817 100644--- a/spec/features/work_packages/details/relations/relations_spec.rb+++ b/spec/features/work_packages/details/relations/relations_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Work package relations tab', js: true, selenium: true do+RSpec.describe 'Work package relations tab', :js, :selenium doinclude_context 'ng-select-autocomplete helpers'let(:user) { create(:admin) }@@ -98,20 +98,20 @@ RSpec.describe 'Work package relations tab', js: true, selenium: true doexpect(page).to have_selector(toggle_btn_selector,text: 'Group by work package type', wait: 20)- expect(page).to have_selector('.relation-group--header', text: 'FOLLOWS')- expect(page).to have_selector('.relation-group--header', text: 'RELATED TO')+ expect(page).to have_css('.relation-group--header', text: 'FOLLOWS')+ expect(page).to have_css('.relation-group--header', text: 'RELATED TO')- expect(page).to have_selector('.relation-row--type', text: type1.name.upcase)- expect(page).to have_selector('.relation-row--type', text: type2.name.upcase)+ expect(page).to have_css('.relation-row--type', text: type1.name.upcase)+ expect(page).to have_css('.relation-row--type', text: type2.name.upcase)find(toggle_btn_selector).clickexpect(page).to have_selector(toggle_btn_selector, text: 'Group by relation type', wait: 10)- expect(page).to have_selector('.relation-group--header', text: type1.name.upcase)- expect(page).to have_selector('.relation-group--header', text: type2.name.upcase)+ expect(page).to have_css('.relation-group--header', text: type1.name.upcase)+ expect(page).to have_css('.relation-group--header', text: type2.name.upcase)- expect(page).to have_selector('.relation-row--type', text: 'Follows')- expect(page).to have_selector('.relation-row--type', text: 'Related To')+ expect(page).to have_css('.relation-row--type', text: 'Follows')+ expect(page).to have_css('.relation-row--type', text: 'Related To')endit 'allows to edit relation types when toggled' do@@ -119,15 +119,15 @@ RSpec.describe 'Work package relations tab', js: true, selenium: true doexpect(page).to have_selector(toggle_btn_selector, text: 'Group by relation type', wait: 20)# Expect current to be follows and other one related- expect(page).to have_selector('.relation-row--type', text: 'Follows')- expect(page).to have_selector('.relation-row--type', text: 'Related To')+ expect(page).to have_css('.relation-row--type', text: 'Follows')+ expect(page).to have_css('.relation-row--type', text: 'Related To')# edit to blocksrelations.edit_relation_type(to1, to_type: 'Blocks')# the other one should not be altered- expect(page).to have_selector('.relation-row--type', text: 'Blocks')- expect(page).to have_selector('.relation-row--type', text: 'Related To')+ expect(page).to have_css('.relation-row--type', text: 'Blocks')+ expect(page).to have_css('.relation-row--type', text: 'Related To')updated_relation = Relation.find(relation1.id)expect(updated_relation.relation_type).to eq('blocks')@@ -136,8 +136,8 @@ RSpec.describe 'Work package relations tab', js: true, selenium: true dorelations.edit_relation_type(to1, to_type: 'Blocked by')- expect(page).to have_selector('.relation-row--type', text: 'Blocked by')- expect(page).to have_selector('.relation-row--type', text: 'Related To')+ expect(page).to have_css('.relation-row--type', text: 'Blocked by')+ expect(page).to have_css('.relation-row--type', text: 'Related To')updated_relation = Relation.find(relation1.id)expect(updated_relation.relation_type).to eq('blocks')@@ -162,10 +162,10 @@ RSpec.describe 'Work package relations tab', js: true, selenium: true doit 'shows no links to create relations' do# No create buttons should exist- expect(page).not_to have_selector('.wp-relations-create-button')+ expect(page).to have_no_css('.wp-relations-create-button')# Test for add relation- expect(page).not_to have_selector('#relation--add-relation')+ expect(page).to have_no_css('#relation--add-relation')endend@@ -183,7 +183,7 @@ RSpec.describe 'Work package relations tab', js: true, selenium: true dotabs.expect_counter(relations_tab, 1)relations.remove_relation(relatable)- expect(page).not_to have_selector('.relation-group--header', text: 'FOLLOWS')+ expect(page).to have_no_css('.relation-group--header', text: 'FOLLOWS')# If there are no relations, the counter badge should not be displayedtabs.expect_no_counter(relations_tab)@@ -203,15 +203,15 @@ RSpec.describe 'Work package relations tab', js: true, selenium: true do# Expect to have rowrelations.hover_action(relatable, :delete)- expect(page).not_to have_selector('.relation-group--header', text: 'FOLLOWS')- expect(page).not_to have_selector('.wp-relations--subject-field', text: relatable.subject)+ expect(page).to have_no_css('.relation-group--header', text: 'FOLLOWS')+ expect(page).to have_no_css('.wp-relations--subject-field', text: relatable.subject)# Back to split viewpage.execute_script('window.history.back()')work_packages_page.expect_subject- expect(page).not_to have_selector('.relation-group--header', text: 'FOLLOWS')- expect(page).not_to have_selector('.wp-relations--subject-field', text: relatable.subject)+ expect(page).to have_no_css('.relation-group--header', text: 'FOLLOWS')+ expect(page).to have_no_css('.wp-relations--subject-field', text: relatable.subject)endit 'follows the relation links (Regression #26794)' do@@ -273,7 +273,7 @@ RSpec.describe 'Work package relations tab', js: true, selenium: true do# Toggle to closerelations.hover_action(relatable, :info)- expect(created_row).not_to have_selector('.wp-relation--description-read-value')+ expect(created_row).to have_no_css('.wp-relation--description-read-value')endendenddiff --git a/spec/features/work_packages/details/workdays_spec.rb b/spec/features/work_packages/details/workdays_spec.rbindex 1aecb463b28..c736a72345e 100644--- a/spec/features/work_packages/details/workdays_spec.rb+++ b/spec/features/work_packages/details/workdays_spec.rb@@ -33,8 +33,7 @@ require 'features/work_packages/shared_contexts'require 'support/edit_fields/edit_field'require 'features/work_packages/work_packages_page'-RSpec.describe 'Work packages datepicker workdays',- js: true, with_settings: { date_format: '%Y-%m-%d' } do+RSpec.describe 'Work packages datepicker workdays', :js, with_settings: { date_format: '%Y-%m-%d' } doshared_let(:project) { create(:project_with_types, public: true) }shared_let(:work_package) { create(:work_package, project:, start_date: Date.parse('2022-01-01')) }shared_let(:user) { create(:admin) }@@ -56,19 +55,19 @@ RSpec.describe 'Work packages datepicker workdays',shared_let(:working_days) { week_with_saturday_and_sunday_as_weekend }it 'shows them as disabled' do- expect(page).to have_selector('.dayContainer', count: 2)+ expect(page).to have_css('.dayContainer', count: 2)weekend_days = %w[1 2 8 9 15 16 22 23 29 30].map(&:to_i)weekend_days.each do |weekend_day|- expect(page).to have_selector('.dayContainer:first-of-type .flatpickr-day.flatpickr-non-working-day',- text: weekend_day,- exact_text: true)+ expect(page).to have_css('.dayContainer:first-of-type .flatpickr-day.flatpickr-non-working-day',+ text: weekend_day,+ exact_text: true)end((1..31).to_a - weekend_days).each do |workday|- expect(page).to have_selector('.dayContainer:first-of-type .flatpickr-day:not(.flatpickr-non-working-day)',- text: workday,- exact_text: true)+ expect(page).to have_css('.dayContainer:first-of-type .flatpickr-day:not(.flatpickr-non-working-day)',+ text: workday,+ exact_text: true)endendenddiff --git a/spec/features/work_packages/display_fields/date_field_display_spec.rb b/spec/features/work_packages/display_fields/date_field_display_spec.rbindex ce48015fc63..3cbcae25ee2 100644--- a/spec/features/work_packages/display_fields/date_field_display_spec.rb+++ b/spec/features/work_packages/display_fields/date_field_display_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Show the date of a Work Package', js: true do+RSpec.describe 'Show the date of a Work Package', :js dolet(:project) { create(:project) }let(:admin) { create(:admin) }let(:work_package) do@@ -60,14 +60,14 @@ RSpec.describe 'Show the date of a Work Package', js: true doit 'is highlighted only if the WP status is open (#33457)' do# Highlighted with an open status- expect(page).to have_selector('.inline-edit--display-field.combinedDate .__hl_date_overdue')+ expect(page).to have_css('.inline-edit--display-field.combinedDate .__hl_date_overdue')# Change status to closedstatus_field = WorkPackageStatusField.new(page)status_field.update(closed_status.name)# Not highlighted with a closed status- expect(page).not_to have_selector('.inline-edit--display-field.combinedDate .__hl_date_overdue')+ expect(page).to have_no_css('.inline-edit--display-field.combinedDate .__hl_date_overdue')endendenddiff --git a/spec/features/work_packages/display_fields/estimated_hours_display_spec.rb b/spec/features/work_packages/display_fields/estimated_hours_display_spec.rbindex ca1140463dc..14fb0f2a6e4 100644--- a/spec/features/work_packages/display_fields/estimated_hours_display_spec.rb+++ b/spec/features/work_packages/display_fields/estimated_hours_display_spec.rb@@ -77,7 +77,7 @@ RSpec.describe 'Estimated hours display' do]end- it 'work package index', js: true do+ it 'work package index', :js dowp_table.visit_query querywp_table.expect_work_package_listed child@@ -86,7 +86,7 @@ RSpec.describe 'Estimated hours display' do)end- it 'work package details', js: true do+ it 'work package details', :js dovisit work_package_path(parent.id)expect(page).to have_content("Work\n1 h(+3 h)")@@ -104,7 +104,7 @@ RSpec.describe 'Estimated hours display' do]end- it 'work package index', js: true do+ it 'work package index', :js dowp_table.visit_query querywp_table.expect_work_package_listed child@@ -113,7 +113,7 @@ RSpec.describe 'Estimated hours display' do)end- it 'work package details', js: true do+ it 'work package details', :js dovisit work_package_path(parent.id)expect(page).to have_content("Work\n1 h")@@ -131,7 +131,7 @@ RSpec.describe 'Estimated hours display' do]end- it 'work package index', js: true do+ it 'work package index', :js dowp_table.visit_query querywp_table.expect_work_package_listed child@@ -140,7 +140,7 @@ RSpec.describe 'Estimated hours display' do)end- it 'work package details', js: true do+ it 'work package details', :js dovisit work_package_path(parent.id)expect(page).to have_content("Work\n0 h(+3 h)")@@ -158,7 +158,7 @@ RSpec.describe 'Estimated hours display' do]end- it 'work package index', js: true do+ it 'work package index', :js dowp_table.visit_query querywp_table.expect_work_package_listed child@@ -167,7 +167,7 @@ RSpec.describe 'Estimated hours display' do)end- it 'work package details', js: true do+ it 'work package details', :js dovisit work_package_path(parent.id)expect(page).to have_content("Work\n0 h")diff --git a/spec/features/work_packages/display_fields/spent_time_display_spec.rb b/spec/features/work_packages/display_fields/spent_time_display_spec.rbindex a59b898faf6..06aa0c026b4 100644--- a/spec/features/work_packages/display_fields/spent_time_display_spec.rb+++ b/spec/features/work_packages/display_fields/spent_time_display_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Logging time within the work package view', js: true do+RSpec.describe 'Logging time within the work package view', :js doshared_let(:project) { create(:project) }shared_let(:admin) { create(:admin) }shared_let(:work_package) { create(:work_package, project:) }@@ -61,7 +61,7 @@ RSpec.describe 'Logging time within the work package view', js: true doif log_for_usertime_logging_modal.update_field 'user', log_for_user.nameelsif user_field_visible- expect(page).to have_selector('.ng-value-label', text: user.name)+ expect(page).to have_css('.ng-value-label', text: user.name)end# a click on save creates a time entry@@ -213,8 +213,8 @@ RSpec.describe 'Logging time within the work package view', js: true dolog_time_via_modal- expect(page).to have_selector('tr:nth-of-type(1) .wp-table--cell-td.spentTime', text: '1 h')- expect(page).to have_selector('tr:nth-of-type(2) .wp-table--cell-td.spentTime', text: '0 h')+ expect(page).to have_css('tr:nth-of-type(1) .wp-table--cell-td.spentTime', text: '1 h')+ expect(page).to have_css('tr:nth-of-type(2) .wp-table--cell-td.spentTime', text: '0 h')endendenddiff --git a/spec/features/work_packages/display_representations/switch_display_representations_spec.rb b/spec/features/work_packages/display_representations/switch_display_representations_spec.rbindex f62e9697aa2..cfcd249be7e 100644--- a/spec/features/work_packages/display_representations/switch_display_representations_spec.rb+++ b/spec/features/work_packages/display_representations/switch_display_representations_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Switching work package view',- js: true, with_ee: %i[conditional_highlighting] do+RSpec.describe 'Switching work package view', :js, with_ee: %i[conditional_highlighting] dolet(:user) { create(:admin) }let(:project) { create(:project) }let(:wp_table) { Pages::WorkPackagesTable.new(project) }@@ -75,30 +74,30 @@ RSpec.describe 'Switching work package view',# Enable highlightinghighlighting.switch_entire_row_highlight "Priority"within "wp-single-card[data-work-package-id='#{wp_1.id}']" do- expect(page).to have_selector(".op-wp-single-card--highlighting.__hl_background_priority_#{priority1.id}")+ expect(page).to have_css(".op-wp-single-card--highlighting.__hl_background_priority_#{priority1.id}")endwithin "wp-single-card[data-work-package-id='#{wp_2.id}']" do- expect(page).to have_selector(".op-wp-single-card--highlighting.__hl_background_priority_#{priority2.id}")+ expect(page).to have_css(".op-wp-single-card--highlighting.__hl_background_priority_#{priority2.id}")end# Switch back to list representation & Highlighting is keptdisplay_representation.switch_to_list_layoutwp_table.expect_work_package_listed wp_1, wp_2- expect(page).to have_selector("#{wp_table.row_selector(wp_1)}.__hl_background_priority_#{priority1.id}")- expect(page).to have_selector("#{wp_table.row_selector(wp_2)}.__hl_background_priority_#{priority2.id}")+ expect(page).to have_css("#{wp_table.row_selector(wp_1)}.__hl_background_priority_#{priority1.id}")+ expect(page).to have_css("#{wp_table.row_selector(wp_2)}.__hl_background_priority_#{priority2.id}")# Change attributehighlighting.switch_entire_row_highlight "Status"- expect(page).to have_selector("#{wp_table.row_selector(wp_1)}.__hl_background_status_#{status.id}")- expect(page).to have_selector("#{wp_table.row_selector(wp_2)}.__hl_background_status_#{status.id}")+ expect(page).to have_css("#{wp_table.row_selector(wp_1)}.__hl_background_status_#{status.id}")+ expect(page).to have_css("#{wp_table.row_selector(wp_2)}.__hl_background_status_#{status.id}")# Switch back to card representation & Highlighting is kept, toodisplay_representation.switch_to_card_layoutwithin "wp-single-card[data-work-package-id='#{wp_1.id}']" do- expect(page).to have_selector(".op-wp-single-card--highlighting.__hl_background_status_#{status.id}")+ expect(page).to have_css(".op-wp-single-card--highlighting.__hl_background_status_#{status.id}")endwithin "wp-single-card[data-work-package-id='#{wp_2.id}']" do- expect(page).to have_selector(".op-wp-single-card--highlighting.__hl_background_status_#{status.id}")+ expect(page).to have_css(".op-wp-single-card--highlighting.__hl_background_status_#{status.id}")endend@@ -118,12 +117,12 @@ RSpec.describe 'Switching work package view',# A single click leads to the full viewcards.select_work_package(wp_1)- expect(page).to have_selector('.work-packages--details--subject',- text: wp_1.subject)+ expect(page).to have_css('.work-packages--details--subject',+ text: wp_1.subject)page.find('.work-packages-back-button').click# The query is however unchanged- expect(page).not_to have_selector('.editable-toolbar-title--save')+ expect(page).to have_no_css('.editable-toolbar-title--save')url = URI.parse(page.current_url).queryexpect(url).not_to match(/query_props=.+/)diff --git a/spec/features/work_packages/edit_work_package_spec.rb b/spec/features/work_packages/edit_work_package_spec.rbindex bad5b01e7df..c8201d945a8 100644--- a/spec/features/work_packages/edit_work_package_spec.rb+++ b/spec/features/work_packages/edit_work_package_spec.rb@@ -1,8 +1,7 @@require 'spec_helper'require 'features/page_objects/notification'-RSpec.describe 'edit work package',- js: true do+RSpec.describe 'edit work package', :js dolet(:dev_role) docreate(:project_role,permissions: %i[view_work_packages@@ -168,10 +167,10 @@ RSpec.describe 'edit work package',wp_page.visit!# Another (empty) journal should exist now- expect(page).to have_selector('.op-user-activity--user-name',- text: work_package.journals.last.user.name,- wait: 10,- count: 2)+ expect(page).to have_css('.op-user-activity--user-name',+ text: work_package.journals.last.user.name,+ wait: 10,+ count: 2)wp_page.expect_attributes assignee: '-'diff --git a/spec/features/work_packages/export_spec.rb b/spec/features/work_packages/export_spec.rbindex d5c184a0359..4bf509cebc7 100644--- a/spec/features/work_packages/export_spec.rb+++ b/spec/features/work_packages/export_spec.rb@@ -98,7 +98,7 @@ RSpec.describe 'work package export' dofilters.openend- it 'shows all work packages with the default filters', js: true do+ it 'shows all work packages with the default filters', :js doexport!expect(subject).to have_text(wp1.description)@@ -110,7 +110,7 @@ RSpec.describe 'work package export' doexpect(subject.scan(/Type (A|B)/).flatten).to eq %w(A A B A)end- it 'shows all work packages grouped by', js: true do+ it 'shows all work packages grouped by', :js dogroup_by.enable_via_menu 'Type'wp_table.expect_work_package_listed(wp1)@@ -129,8 +129,7 @@ RSpec.describe 'work package export' doexpect(subject.scan(/Type (A|B)/).flatten).to eq %w(A A A B)end- it 'shows only the work package with the right progress if filtered this way',- js: true do+ it 'shows only the work package with the right progress if filtered this way', :js dofilters.add_filter_by '% Complete', 'is', ['25'], 'percentageDone'sleep 1@@ -142,11 +141,11 @@ RSpec.describe 'work package export' doexport!expect(subject).to have_text(wp1.description)- expect(subject).not_to have_text(wp2.description)- expect(subject).not_to have_text(wp3.description)+ expect(subject).to have_no_text(wp2.description)+ expect(subject).to have_no_text(wp3.description)end- it 'shows only work packages of the filtered type', js: true do+ it 'shows only work packages of the filtered type', :js dofilters.add_filter_by 'Type', 'is (OR)', wp3.type.nameexpect(page).to have_no_content(wp2.description) # safeguard@@ -155,12 +154,12 @@ RSpec.describe 'work package export' doexport!- expect(subject).not_to have_text(wp1.description)- expect(subject).not_to have_text(wp2.description)+ expect(subject).to have_no_text(wp1.description)+ expect(subject).to have_no_text(wp2.description)expect(subject).to have_text(wp3.description)end- it 'exports selected columns', js: true do+ it 'exports selected columns', :js docolumns.add '% Complete'export!@@ -170,7 +169,7 @@ RSpec.describe 'work package export' doendend- describe 'with a manually sorted query', js: true do+ describe 'with a manually sorted query', :js dolet(:query) docreate(:query,user: current_user,@@ -195,7 +194,7 @@ RSpec.describe 'work package export' doexport!- expect(page).to have_selector('.job-status--modal .icon-checkmark', wait: 10)+ expect(page).to have_css('.job-status--modal .icon-checkmark', wait: 10)expect(page).to have_content('The export has completed successfully.')expect(subject).to have_text(wp1.description)@@ -209,7 +208,7 @@ RSpec.describe 'work package export' doendend- context 'PDF export', js: true do+ context 'PDF export', :js dolet(:export_type) { I18n.t('export.format.pdf_overview_table') }let(:query) docreate(:query,@@ -242,7 +241,7 @@ RSpec.describe 'work package export' do# Atom exports are not downloaded. In fact, it is not even a download but rather# a feed one can follow.- context 'Atom export', js: true do+ context 'Atom export', :js dolet(:export_type) { 'Atom' }context 'with default filter' dodiff --git a/spec/features/work_packages/highlighting_spec.rb b/spec/features/work_packages/highlighting_spec.rbindex 8940fe833b4..52702c1a539 100644--- a/spec/features/work_packages/highlighting_spec.rb+++ b/spec/features/work_packages/highlighting_spec.rb@@ -1,7 +1,6 @@require 'spec_helper'-RSpec.describe 'Work Package highlighting fields',- js: true,+RSpec.describe 'Work Package highlighting fields', :js,with_ee: %i[conditional_highlighting] dolet(:user) { create(:admin) }@@ -84,8 +83,8 @@ RSpec.describe 'Work Package highlighting fields',"background-color")).to eq('rgba(0, 0, 0, 0)')## Overdue- expect(wp1_row).to have_selector('.__hl_date_overdue')- expect(wp2_row).to have_selector('.__hl_date_due_today')+ expect(wp1_row).to have_css('.__hl_date_overdue')+ expect(wp2_row).to have_css('.__hl_date_due_today')# Highlight only one attributehighlighting.switch_inline_attribute_highlight "Priority"@@ -104,7 +103,7 @@ RSpec.describe 'Work Package highlighting fields',"background-color")).to eq('rgba(0, 0, 0, 0)')## Status should not have a dot- expect(wp1_row).not_to have_selector('.status [class^="__hl_inline_"]')+ expect(wp1_row).to have_no_css('.status [class^="__hl_inline_"]')# Highlight multiple attributeshighlighting.switch_inline_attribute_highlight "Priority", "Status"@@ -120,8 +119,8 @@ RSpec.describe 'Work Package highlighting fields',# Highlight entire row by statushighlighting.switch_entire_row_highlight 'Status'- expect(page).to have_selector("#{wp_table.row_selector(wp_1)}.__hl_background_status_#{status1.id}")- expect(page).to have_selector("#{wp_table.row_selector(wp_2)}.__hl_background_status_#{status2.id}")+ expect(page).to have_css("#{wp_table.row_selector(wp_1)}.__hl_background_status_#{status1.id}")+ expect(page).to have_css("#{wp_table.row_selector(wp_2)}.__hl_background_status_#{status2.id}")# Unselect all rows to ensure we get the correct backgroundfind('body').send_keys [:control, 'd']@@ -138,14 +137,14 @@ RSpec.describe 'Work Package highlighting fields',expect(query.highlighting_mode).to eq(:status)## This disables any inline styles- expect(page).not_to have_selector('[class*="__hl_inline_status"]')- expect(page).not_to have_selector('[class*="__hl_inline_priority"]')- expect(page).not_to have_selector('[class*="__hl_date"]')+ expect(page).to have_no_css('[class*="__hl_inline_status"]')+ expect(page).to have_no_css('[class*="__hl_inline_priority"]')+ expect(page).to have_no_css('[class*="__hl_date"]')# Highlight entire row by priorityhighlighting.switch_entire_row_highlight 'Priority'- expect(page).to have_selector("#{wp_table.row_selector(wp_1)}.__hl_background_priority_#{priority1.id}")- expect(page).to have_selector("#{wp_table.row_selector(wp_2)}.__hl_background_priority_#{priority_no_color.id}")+ expect(page).to have_css("#{wp_table.row_selector(wp_1)}.__hl_background_priority_#{priority1.id}")+ expect(page).to have_css("#{wp_table.row_selector(wp_2)}.__hl_background_priority_#{priority_no_color.id}")# Remove selection from table rowfind('body').send_keys [:control, 'd']@@ -157,11 +156,11 @@ RSpec.describe 'Work Package highlighting fields',# Highlighting is kept even after a hard reload (Regression #30217)page.driver.refresh- expect(page).to have_selector("#{wp_table.row_selector(wp_1)}.__hl_background_priority_#{priority1.id}")- expect(page).to have_selector("#{wp_table.row_selector(wp_2)}.__hl_background_priority_#{priority_no_color.id}")- expect(page).not_to have_selector('[class*="__hl_inline_status"]')- expect(page).not_to have_selector('[class*="__hl_inline_priority"]')- expect(page).not_to have_selector('[class*="__hl_date"]')+ expect(page).to have_css("#{wp_table.row_selector(wp_1)}.__hl_background_priority_#{priority1.id}")+ expect(page).to have_css("#{wp_table.row_selector(wp_2)}.__hl_background_priority_#{priority_no_color.id}")+ expect(page).to have_no_css('[class*="__hl_inline_status"]')+ expect(page).to have_no_css('[class*="__hl_inline_priority"]')+ expect(page).to have_no_css('[class*="__hl_date"]')# Save querywp_table.save@@ -170,16 +169,16 @@ RSpec.describe 'Work Package highlighting fields',expect(query.highlighting_mode).to eq(:priority)## This disables any inline styles- expect(page).not_to have_selector('[class*="__hl_inline_status"]')- expect(page).not_to have_selector('[class*="__hl_inline_priority"]')- expect(page).not_to have_selector('[class*="__hl_date"]')+ expect(page).to have_no_css('[class*="__hl_inline_status"]')+ expect(page).to have_no_css('[class*="__hl_inline_priority"]')+ expect(page).to have_no_css('[class*="__hl_date"]')# No highlightinghighlighting.switch_highlighting_mode 'No highlighting'- expect(page).not_to have_selector('[class*="__hl_background"]')- expect(page).not_to have_selector('[class*="__hl_background_status"]')- expect(page).not_to have_selector('[class*="__hl_background_priority"]')- expect(page).not_to have_selector('[class*="__hl_date"]')+ expect(page).to have_no_css('[class*="__hl_background"]')+ expect(page).to have_no_css('[class*="__hl_background_status"]')+ expect(page).to have_no_css('[class*="__hl_background_priority"]')+ expect(page).to have_no_css('[class*="__hl_date"]')# Save querywp_table.save@@ -191,8 +190,8 @@ RSpec.describe 'Work Package highlighting fields',# Expect highlighted fields in single view even when table disabledwp_table.open_full_screen_by_doubleclick wp_1- expect(page).to have_selector("#{test_selector('op-wp-status-button')} .__hl_background_status_#{status1.id}")- expect(page).to have_selector(".__hl_inline_priority_#{priority1.id}")+ expect(page).to have_css("#{test_selector('op-wp-status-button')} .__hl_background_status_#{status1.id}")+ expect(page).to have_css(".__hl_inline_priority_#{priority1.id}")endit 'correctly parses custom selected inline attributes', :with_cuprite dodiff --git a/spec/features/work_packages/index_sums_spec.rb b/spec/features/work_packages/index_sums_spec.rbindex e8f36490f22..08815a90d1d 100644--- a/spec/features/work_packages/index_sums_spec.rb+++ b/spec/features/work_packages/index_sums_spec.rb@@ -129,66 +129,66 @@ RSpec.describe 'Work package index sums', :js dowp_table.expect_work_package_listed work_package_1, work_package_2# Expect the total sums row- expect(page).to have_selector('.wp-table--sums-row', count: 1)+ expect(page).to have_css('.wp-table--sums-row', count: 1)- expect(page).to have_selector('.wp-table--sum-container', text: 'Total sum')- expect(page).to have_selector('.wp-table--sum-container', text: '25')- expect(page).to have_selector('.wp-table--sum-container', text: '12')- expect(page).to have_selector('.wp-table--sum-container', text: '13.2')+ expect(page).to have_css('.wp-table--sum-container', text: 'Total sum')+ expect(page).to have_css('.wp-table--sum-container', text: '25')+ expect(page).to have_css('.wp-table--sum-container', text: '12')+ expect(page).to have_css('.wp-table--sum-container', text: '13.2')# Unit costs- expect(page).to have_selector('.wp-table--sum-container', text: '7.50')+ expect(page).to have_css('.wp-table--sum-container', text: '7.50')# Overall costs- expect(page).to have_selector('.wp-table--sum-container', text: '22.50')+ expect(page).to have_css('.wp-table--sum-container', text: '22.50')# Labor costs- expect(page).to have_selector('.wp-table--sum-container', text: '15.00')+ expect(page).to have_css('.wp-table--sum-container', text: '15.00')# Update the sumedit_field = wp_table.edit_field(work_package_1, :estimatedTime)edit_field.update '20'- expect(page).to have_selector('.wp-table--sum-container', text: 'Total sum')- expect(page).to have_selector('.wp-table--sum-container', text: '35')- expect(page).to have_selector('.wp-table--sum-container', text: '12')- expect(page).to have_selector('.wp-table--sum-container', text: '13.2')+ expect(page).to have_css('.wp-table--sum-container', text: 'Total sum')+ expect(page).to have_css('.wp-table--sum-container', text: '35')+ expect(page).to have_css('.wp-table--sum-container', text: '12')+ expect(page).to have_css('.wp-table--sum-container', text: '13.2')# Unit costs- expect(page).to have_selector('.wp-table--sum-container', text: '7.50')+ expect(page).to have_css('.wp-table--sum-container', text: '7.50')# Overall costs- expect(page).to have_selector('.wp-table--sum-container', text: '22.50')+ expect(page).to have_css('.wp-table--sum-container', text: '22.50')# Labor costs- expect(page).to have_selector('.wp-table--sum-container', text: '15.00')+ expect(page).to have_css('.wp-table--sum-container', text: '15.00')# Enable groupsgroup_by.enable_via_menu 'Status'# Expect to have three sums rows now- expect(page).to have_selector('.wp-table--sums-row', count: 3)+ expect(page).to have_css('.wp-table--sums-row', count: 3)# First status row- expect(page).to have_selector('.wp-table--sum-container', text: '20 h')- expect(page).to have_selector(".wp-table--sum-container.customField#{int_cf.id}", text: '5')- expect(page).to have_selector(".wp-table--sum-container.customField#{float_cf.id}", text: '5.5')+ expect(page).to have_css('.wp-table--sum-container', text: '20 h')+ expect(page).to have_css(".wp-table--sum-container.customField#{int_cf.id}", text: '5')+ expect(page).to have_css(".wp-table--sum-container.customField#{float_cf.id}", text: '5.5')# Unit costs- expect(page).to have_selector('.wp-table--sum-container.materialCosts', text: '7.50')+ expect(page).to have_css('.wp-table--sum-container.materialCosts', text: '7.50')# Overall costs- expect(page).to have_selector('.wp-table--sum-container.overallCosts', text: '22.50')+ expect(page).to have_css('.wp-table--sum-container.overallCosts', text: '22.50')# Labor costs- expect(page).to have_selector('.wp-table--sum-container.laborCosts', text: '15.00')+ expect(page).to have_css('.wp-table--sum-container.laborCosts', text: '15.00')# Second status row- expect(page).to have_selector('.wp-table--sum-container', text: '15 h')- expect(page).to have_selector(".wp-table--sum-container.customField#{int_cf.id}", text: '7')- expect(page).to have_selector(".wp-table--sum-container.customField#{float_cf.id}", text: '7.7')+ expect(page).to have_css('.wp-table--sum-container', text: '15 h')+ expect(page).to have_css(".wp-table--sum-container.customField#{int_cf.id}", text: '7')+ expect(page).to have_css(".wp-table--sum-container.customField#{float_cf.id}", text: '7.7')# Total sums row is unchanged- expect(page).to have_selector('tbody .wp-table--sum-container', text: '35')- expect(page).to have_selector("tbody .wp-table--sum-container.customField#{int_cf.id}", text: '12')- expect(page).to have_selector("tbody .wp-table--sum-container.customField#{float_cf.id}", text: '13.2')+ expect(page).to have_css('tbody .wp-table--sum-container', text: '35')+ expect(page).to have_css("tbody .wp-table--sum-container.customField#{int_cf.id}", text: '12')+ expect(page).to have_css("tbody .wp-table--sum-container.customField#{float_cf.id}", text: '13.2')# Unit costs- expect(page).to have_selector('tbody .wp-table--sum-container.materialCosts', text: '7.50')+ expect(page).to have_css('tbody .wp-table--sum-container.materialCosts', text: '7.50')# Overall costs- expect(page).to have_selector('tbody .wp-table--sum-container.overallCosts', text: '22.50')+ expect(page).to have_css('tbody .wp-table--sum-container.overallCosts', text: '22.50')# Labor costs- expect(page).to have_selector('tbody .wp-table--sum-container.laborCosts', text: '15.00')+ expect(page).to have_css('tbody .wp-table--sum-container.laborCosts', text: '15.00')# Collapsing groups will also hide the sums rowpage.find('.expander.icon-minus2', match: :first).click@@ -196,6 +196,6 @@ RSpec.describe 'Work package index sums', :js dopage.find('.expander.icon-minus2', match: :first).click# Expect to have only the final sums- expect(page).to have_selector('tbody .wp-table--sums-row', count: 1)+ expect(page).to have_css('tbody .wp-table--sums-row', count: 1)endenddiff --git a/spec/features/work_packages/navigation_spec.rb b/spec/features/work_packages/navigation_spec.rbindex c817a29447b..35c80815b68 100644--- a/spec/features/work_packages/navigation_spec.rb+++ b/spec/features/work_packages/navigation_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Work package navigation', js: true, selenium: true do+RSpec.describe 'Work package navigation', :js, :selenium dolet(:user) { create(:admin) }let(:project) { create(:project, name: 'Some project', enabled_module_names: [:work_package_tracking]) }let(:work_package) { build(:work_package, project:) }@@ -85,7 +85,7 @@ RSpec.describe 'Work package navigation', js: true, selenium: true dosplit_work_package.visit!split_work_package.expect_subject# Should be checked in table- expect(global_work_packages.table_container).to have_selector(".wp-row-#{work_package.id}.-checked")+ expect(global_work_packages.table_container).to have_css(".wp-row-#{work_package.id}.-checked")# deep link work package show@@ -161,10 +161,10 @@ RSpec.describe 'Work package navigation', js: true, selenium: true dovisit project_path(project)find('#main-menu-work-packages ~ .toggler').click- expect(page).to have_selector('.op-view-select--search-results')+ expect(page).to have_css('.op-view-select--search-results')find('.op-sidemenu--item-action', text: query.name).click- expect(page).not_to have_selector('.title-container', text: 'Overview')+ expect(page).to have_no_css('.title-container', text: 'Overview')expect(page).to have_field('editable-toolbar-title', with: query.name)end@@ -224,7 +224,7 @@ RSpec.describe 'Work package navigation', js: true, selenium: true doqueryend- it 'will filter out the work package' do+ it 'filters out the work package' dowp_table = Pages::WorkPackagesTable.new projectwp_table.visit!@@ -250,7 +250,7 @@ RSpec.describe 'Work package navigation', js: true, selenium: true docreate(:work_package, subject: 'WP attachment A', project:, attachments: [attachment])end- it 'will show it when navigating from table to single view' do+ it 'shows it when navigating from table to single view' dowp_table = Pages::WorkPackagesTable.new projectwp_table.visit!@@ -290,7 +290,7 @@ RSpec.describe 'Work package navigation', js: true, selenium: true docontext 'when visiting a query that will lead to a query validation error' dolet(:wp_table) { Pages::WorkPackagesTable.new(project) }- it 'will output a correct error message (Regression #39880)' do+ it 'outputs a correct error message (Regression #39880)' dourl_query ="query_id=%7B%22%7B%22&query_props=%7B%22c%22%3A%5B%22id%22%2C%22subject" \"%22%2C%22type%22%2C%22status%22%2C%22assignee%22%2C%22updatedAt%22%5D%2C" \@@ -302,7 +302,7 @@ RSpec.describe 'Work package navigation', js: true, selenium: true dovisit "/projects/#{project.identifier}/work_packages?#{url_query}"wp_table.expect_toast message: 'Your view is erroneous and could not be processed.', type: :error- expect(page).to have_selector 'li', text: 'Bad request: id is invalid'+ expect(page).to have_css 'li', text: 'Bad request: id is invalid'endendenddiff --git a/spec/features/work_packages/new/attributes_from_filter_spec.rb b/spec/features/work_packages/new/attributes_from_filter_spec.rbindex a67923e81bc..cb5de138a92 100644--- a/spec/features/work_packages/new/attributes_from_filter_spec.rb+++ b/spec/features/work_packages/new/attributes_from_filter_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Work package create uses attributes from filters', js: true, selenium: true do+RSpec.describe 'Work package create uses attributes from filters', :js, :selenium dolet(:user) { create(:admin) }let(:type_bug) { create(:type_bug) }let(:type_task) { create(:type_task) }diff --git a/spec/features/work_packages/new/new_work_package_spec.rb b/spec/features/work_packages/new/new_work_package_spec.rbindex 829cb5c42f0..7a223b59a08 100644--- a/spec/features/work_packages/new/new_work_package_spec.rb+++ b/spec/features/work_packages/new/new_work_package_spec.rb@@ -142,7 +142,7 @@ RSpec.describe 'new work package', :js, :with_cuprite dodescription_field.set_value descriptionsave_work_package!- expect(page).to have_selector('.op-work-package-tabs')+ expect(page).to have_css('.op-work-package-tabs')subject_field.expect_state_text(subject)description_field = wp_page.edit_field :description@@ -194,7 +194,7 @@ RSpec.describe 'new work package', :js, :with_cuprite docf1 = find(".#{custom_fields.first.attribute_name(:camel_case)} input")expect(cf1).not_to be_nil- expect(page).to have_selector(".#{custom_fields.last.attribute_name(:camel_case)} ng-select")+ expect(page).to have_css(".#{custom_fields.last.attribute_name(:camel_case)} ng-select")cf = wp_page.edit_field custom_fields.last.attribute_name(:camel_case)cf.field_type = 'create-autocompleter'@@ -240,7 +240,7 @@ RSpec.describe 'new work package', :js, :with_cuprite doendit 'reloads the table and selects the new work package' do- expect(page).not_to have_selector('.wp--row')+ expect(page).to have_no_css('.wp--row')create_work_package(type_task)expect(page).to have_selector(safeguard_selector, wait: 10)@@ -249,7 +249,7 @@ RSpec.describe 'new work package', :js, :with_cuprite dosave_work_package!wp_page.dismiss_toaster!- expect(page).to have_selector('.wp--row.-checked')+ expect(page).to have_css('.wp--row.-checked')# Editing the subject after creation# Fix for WP #23879@@ -325,7 +325,7 @@ RSpec.describe 'new work package', :js, :with_cuprite doclick_on 'Cancel'wp_page.click_create_wp_button type_bug- expect(page).not_to have_selector('.ng-value', text: project.name)+ expect(page).to have_no_css('.ng-value', text: project.name)project_field.openSelectFieldproject_field.set_value project.name@@ -380,13 +380,13 @@ RSpec.describe 'new work package', :js, :with_cuprite docreate(:project, name: 'Unrelated project', types: [type_task])end- it 'will not show that value in the project drop down' do+ it 'does not show that value in the project drop down' docreate_work_package_globally(type_bug, project.name)project_field.openSelectField- expect(page).to have_selector('.ng-dropdown-panel .ng-option', text: project.name)- expect(page).not_to have_selector('.ng-dropdown-panel .ng-option', text: project_without_bug.name)+ expect(page).to have_css('.ng-dropdown-panel .ng-option', text: project.name)+ expect(page).to have_no_css('.ng-dropdown-panel .ng-option', text: project_without_bug.name)endendenddiff --git a/spec/features/work_packages/new/work_package_default_description_spec.rb b/spec/features/work_packages/new/work_package_default_description_spec.rbindex 6880626dd2e..3d3305b4098 100644--- a/spec/features/work_packages/new/work_package_default_description_spec.rb+++ b/spec/features/work_packages/new/work_package_default_description_spec.rb@@ -3,7 +3,7 @@ require 'support/edit_fields/edit_field'require 'features/work_packages/work_packages_page'require 'features/page_objects/notification'-RSpec.describe 'new work package', js: true do+RSpec.describe 'new work package', :js dolet(:type_task) { create(:type_task, description: "# New Task template\n\nHello there") }let(:type_feature) { create(:type_feature, description: "", is_default: true) }let(:type_bug) { create(:type_bug, description: "# New Bug template\n\nGeneral Kenobi") }@@ -26,17 +26,17 @@ RSpec.describe 'new work package', js: true do# Changes in the description shall not be overridden.def change_type_and_expect_description(set_project: false)if !set_project- expect(page).to have_selector('.inline-edit--container.type', text: type_feature.name)+ expect(page).to have_css('.inline-edit--container.type', text: type_feature.name)end- expect(page).to have_selector('.inline-edit--container.description', text: '')+ expect(page).to have_css('.inline-edit--container.description', text: '')type_field.openSelectFieldtype_field.set_value type_task- expect(page).to have_selector('.inline-edit--container.description h1', text: 'New Task template')+ expect(page).to have_css('.inline-edit--container.description h1', text: 'New Task template')type_field.openSelectFieldtype_field.set_value type_bug- expect(page).to have_selector('.inline-edit--container.description h1', text: 'New Bug template')+ expect(page).to have_css('.inline-edit--container.description h1', text: 'New Bug template')description_field.set_value 'Something different than the default.'@@ -44,13 +44,13 @@ RSpec.describe 'new work package', js: true dotype_field.openSelectFieldtype_field.set_value type_task- expect(page).to have_selector('.inline-edit--container.description', text: 'Something different than the default.')+ expect(page).to have_css('.inline-edit--container.description', text: 'Something different than the default.')sleep 0.1type_field.openSelectFieldtype_field.set_value type_bug- expect(page).to have_selector('.inline-edit--container.description', text: 'Something different than the default.')+ expect(page).to have_css('.inline-edit--container.description', text: 'Something different than the default.')if set_projectproject_field.openSelectField@@ -61,7 +61,7 @@ RSpec.describe 'new work package', js: true doscroll_to_and_click find_by_id('work-packages--edit-actions-save')wp_page.expect_toast message: 'Successful creation.'- expect(page).to have_selector('.inline-edit--display-field.description', text: 'Something different than the default.')+ expect(page).to have_css('.inline-edit--display-field.description', text: 'Something different than the default.')endbefore dodiff --git a/spec/features/work_packages/pagination_spec.rb b/spec/features/work_packages/pagination_spec.rbindex 0bff272fac1..d326276c470 100644--- a/spec/features/work_packages/pagination_spec.rb+++ b/spec/features/work_packages/pagination_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Work package pagination', js: true do+RSpec.describe 'Work package pagination', :js doshared_let(:admin) { create(:admin) }let(:project) do@@ -51,8 +51,8 @@ RSpec.describe 'Work package pagination', js: true doexpect(page).to have_content('All open')within('.work-packages-partitioned-query-space--container') do- expect(page).to have_content(work_package_1.subject)- expect(page).not_to have_content(work_package_2.subject)+ expect(page).to have_content(work_package_1.subject)+ expect(page).to have_no_content(work_package_2.subject)endwithin('.op-pagination--pages') do@@ -60,8 +60,8 @@ RSpec.describe 'Work package pagination', js: true doendwithin('.work-packages-partitioned-query-space--container') do- expect(page).to have_content(work_package_2.subject)- expect(page).not_to have_content(work_package_1.subject)+ expect(page).to have_content(work_package_2.subject)+ expect(page).to have_no_content(work_package_1.subject)endwithin('.op-pagination--options') dodiff --git a/spec/features/work_packages/project_include/project_include_shared_examples.rb b/spec/features/work_packages/project_include/project_include_shared_examples.rbindex 87bebe923b9..436c8d69175 100644--- a/spec/features/work_packages/project_include/project_include_shared_examples.rb+++ b/spec/features/work_packages/project_include/project_include_shared_examples.rb@@ -457,6 +457,6 @@ RSpec.shared_examples 'has a project include dropdown', :js, type: :feature dodropdown.toggle!dropdown.expect_opendropdown.search 'Nonexistent'- expect(page).not_to have_selector("[data-test-selector='op-project-include--loading']")+ expect(page).to have_no_css("[data-test-selector='op-project-include--loading']")endenddiff --git a/spec/features/work_packages/reports_spec.rb b/spec/features/work_packages/reports_spec.rbindex a3ade4542f8..86c82b9f3ac 100644--- a/spec/features/work_packages/reports_spec.rb+++ b/spec/features/work_packages/reports_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'work package reports', js: true do+RSpec.describe 'work package reports', :js dolet(:project) { create(:project_with_types, types: [type_a]) }let(:user) { create(:user, member_with_permissions: { project => %i(view_work_packages) }) }@@ -64,22 +64,22 @@ RSpec.describe 'work package reports', js: true do.to have_content 'ACCOUNTABLE'expect(page)- .to have_selector 'thead th:nth-of-type(2)', text: type_a.statuses.first.name.upcase+ .to have_css 'thead th:nth-of-type(2)', text: type_a.statuses.first.name.upcaseexpect(page)- .to have_selector 'thead th:nth-of-type(3)', text: type_a.statuses.last.name.upcase+ .to have_css 'thead th:nth-of-type(3)', text: type_a.statuses.last.name.upcaseexpect(page)- .to have_selector 'tbody tr:nth-of-type(1) td:nth-of-type(1)', text: type_a.name+ .to have_css 'tbody tr:nth-of-type(1) td:nth-of-type(1)', text: type_a.nameexpect(page)- .to have_selector 'tbody tr:nth-of-type(1) td:nth-of-type(2)', text: 1+ .to have_css 'tbody tr:nth-of-type(1) td:nth-of-type(2)', text: 1expect(page)- .to have_selector 'tbody tr:nth-of-type(1) td:nth-of-type(3)', text: 1+ .to have_css 'tbody tr:nth-of-type(1) td:nth-of-type(3)', text: 1expect(page)- .to have_selector 'tbody tr:nth-of-type(1) td:nth-of-type(4)', text: 1+ .to have_css 'tbody tr:nth-of-type(1) td:nth-of-type(4)', text: 1expect(page)- .to have_selector 'tbody tr:nth-of-type(1) td:nth-of-type(5)', text: 1+ .to have_css 'tbody tr:nth-of-type(1) td:nth-of-type(5)', text: 1expect(page)- .to have_selector 'tbody tr:nth-of-type(1) td:nth-of-type(6)', text: 2+ .to have_css 'tbody tr:nth-of-type(1) td:nth-of-type(6)', text: 2# Clicking on the further analyze link will lead to a page focusing on typeclick_link 'Further analyze: Type'@@ -94,22 +94,22 @@ RSpec.describe 'work package reports', js: true do.to have_no_content 'ACCOUNTABLE'expect(page)- .to have_selector 'thead th:nth-of-type(2)', text: type_a.statuses.first.name.upcase+ .to have_css 'thead th:nth-of-type(2)', text: type_a.statuses.first.name.upcaseexpect(page)- .to have_selector 'thead th:nth-of-type(3)', text: type_a.statuses.last.name.upcase+ .to have_css 'thead th:nth-of-type(3)', text: type_a.statuses.last.name.upcaseexpect(page)- .to have_selector 'tbody tr:nth-of-type(1) td:nth-of-type(1)', text: type_a.name+ .to have_css 'tbody tr:nth-of-type(1) td:nth-of-type(1)', text: type_a.nameexpect(page)- .to have_selector 'tbody tr:nth-of-type(1) td:nth-of-type(2)', text: 1+ .to have_css 'tbody tr:nth-of-type(1) td:nth-of-type(2)', text: 1expect(page)- .to have_selector 'tbody tr:nth-of-type(1) td:nth-of-type(3)', text: 1+ .to have_css 'tbody tr:nth-of-type(1) td:nth-of-type(3)', text: 1expect(page)- .to have_selector 'tbody tr:nth-of-type(1) td:nth-of-type(4)', text: 1+ .to have_css 'tbody tr:nth-of-type(1) td:nth-of-type(4)', text: 1expect(page)- .to have_selector 'tbody tr:nth-of-type(1) td:nth-of-type(5)', text: 1+ .to have_css 'tbody tr:nth-of-type(1) td:nth-of-type(5)', text: 1expect(page)- .to have_selector 'tbody tr:nth-of-type(1) td:nth-of-type(6)', text: 2+ .to have_css 'tbody tr:nth-of-type(1) td:nth-of-type(6)', text: 2# Clicking on a number in the table will lead to the wp list filtered by the typewithin 'tbody tr:first-of-type td:nth-of-type(2)' dodiff --git a/spec/features/work_packages/scheduling/scheduling_mode_spec.rb b/spec/features/work_packages/scheduling/scheduling_mode_spec.rbindex 8611628d010..e1712597c00 100644--- a/spec/features/work_packages/scheduling/scheduling_mode_spec.rb+++ b/spec/features/work_packages/scheduling/scheduling_mode_spec.rb@@ -33,8 +33,7 @@ require 'features/work_packages/shared_contexts'require 'support/edit_fields/edit_field'require 'features/work_packages/work_packages_page'-RSpec.describe 'scheduling mode',- js: true do+RSpec.describe 'scheduling mode', :js dolet(:project) { create(:project_with_types, public: true) }# Constructing a work package graph that looks like this:#diff --git a/spec/features/work_packages/select/select_card_view_spec.rb b/spec/features/work_packages/select/select_card_view_spec.rbindex edf8a8c6370..54251fceba4 100644--- a/spec/features/work_packages/select/select_card_view_spec.rb+++ b/spec/features/work_packages/select/select_card_view_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Selecting cards in the card view (regression #31962)', js: true do+RSpec.describe 'Selecting cards in the card view (regression #31962)', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }let(:wp_table) { Pages::WorkPackagesTable.new(project) }diff --git a/spec/features/work_packages/select/select_query_spec.rb b/spec/features/work_packages/select/select_query_spec.rbindex c63b1363683..aacfe9d3894 100644--- a/spec/features/work_packages/select/select_query_spec.rb+++ b/spec/features/work_packages/select/select_query_spec.rb@@ -67,7 +67,7 @@ RSpec.describe 'Query selection' dofilters.openend- it 'shows the default (status) filter', js: true do+ it 'shows the default (status) filter', :js dofilters.expect_filter_count 1filters.expect_filter_by 'Status', 'open', nilend@@ -80,12 +80,12 @@ RSpec.describe 'Query selection' dowork_packages_page.select_query queryend- it 'shows the saved filters', js: true do+ it 'shows the saved filters', :js dofilters.openfilters.expect_filter_by 'Assignee', 'is (OR)', ['me']filters.expect_filter_by 'Percent Complete', '>=', ['10'], 'percentageDone'- expect(page).to have_selector("#{test_selector('wp-filter-button')} .badge", text: '2')+ expect(page).to have_css("#{test_selector('wp-filter-button')} .badge", text: '2')endend@@ -103,7 +103,7 @@ RSpec.describe 'Query selection' dowork_packages_page.select_query queryend- it 'updates the page upon query switching', js: true do+ it 'updates the page upon query switching', :js dowp_page.expect_title query.name, editable: falsefind('.op-sidemenu--item-action', text: query2.name).clickdiff --git a/spec/features/work_packages/select/select_work_package_row_spec.rb b/spec/features/work_packages/select/select_work_package_row_spec.rbindex 02b3c2ae8db..1be14e37900 100644--- a/spec/features/work_packages/select/select_work_package_row_spec.rb+++ b/spec/features/work_packages/select/select_work_package_row_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Select work package row', js: true, selenium: true do+RSpec.describe 'Select work package row', :js, :selenium dolet(:user) { create(:admin) }let(:project) { create(:project) }let(:work_package_1) { create(:work_package, project:) }@@ -105,13 +105,13 @@ RSpec.describe 'Select work package row', js: true, selenium: true dodef check_allfind('body').send_keys [:control, 'a']expect_row_checked(1, 2, 3)- expect(page).not_to have_selector '#work-package-context-menu'+ expect(page).to have_no_css '#work-package-context-menu'enddef uncheck_allfind('body').send_keys [:control, 'd']expect_row_unchecked(1, 2, 3)- expect(page).not_to have_selector '#work-package-context-menu'+ expect(page).to have_no_css '#work-package-context-menu'endit 'handles selection flows' do@@ -204,8 +204,8 @@ RSpec.describe 'Select work package row', js: true, selenium: true doendit do- expect(page).to have_selector('.work-packages--details--subject',- text: work_package_1.subject)+ expect(page).to have_css('.work-packages--details--subject',+ text: work_package_1.subject)endend@@ -221,7 +221,7 @@ RSpec.describe 'Select work package row', js: true, selenium: true dosplit_wp.expect_attributes Subject: work_package_2.subjectfind_by_id('work-packages-details-view-button').click- expect(page).not_to have_selector('.work-packages--details')+ expect(page).to have_no_css('.work-packages--details')endendenddiff --git a/spec/features/work_packages/select/select_wp_card_spec.rb b/spec/features/work_packages/select/select_wp_card_spec.rbindex 9ab9fcb4b80..a145ae6034b 100644--- a/spec/features/work_packages/select/select_wp_card_spec.rb+++ b/spec/features/work_packages/select/select_wp_card_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Select work package card', js: true, selenium: true do+RSpec.describe 'Select work package card', :js, :selenium dolet(:user) { create(:admin) }let(:project) { create(:project) }let(:work_package_1) { create(:work_package, project:) }@@ -54,8 +54,8 @@ RSpec.describe 'Select work package card', js: true, selenium: true dodescribe 'opening' doit 'the full screen view via double click' dowp_card_view.open_full_screen_by_doubleclick(work_package_1)- expect(page).to have_selector('.work-packages--details--subject',- text: work_package_1.subject)+ expect(page).to have_css('.work-packages--details--subject',+ text: work_package_1.subject)endit 'the split screen of the selected WP' do@@ -65,7 +65,7 @@ RSpec.describe 'Select work package card', js: true, selenium: true dosplit_wp.expect_attributes Subject: work_package_2.subjectfind_by_id('work-packages-details-view-button').click- expect(page).not_to have_selector('.work-packages--details')+ expect(page).to have_no_css('.work-packages--details')endendenddiff --git a/spec/features/work_packages/share/access_spec.rb b/spec/features/work_packages/share/access_spec.rbindex b7f54d3c5b1..cf378a69aea 100644--- a/spec/features/work_packages/share/access_spec.rb+++ b/spec/features/work_packages/share/access_spec.rb@@ -69,7 +69,7 @@ RSpec.describe 'Shared Work Package Access',results = assignee_field.autocomplete('Mean Turkey', select: false)wait_for_network_idleexpect(results)- .not_to have_css('.ng-option', text: 'Mean Turkey', wait: 0)+ .to have_no_css('.ng-option', text: 'Mean Turkey', wait: 0)assignee_field.cancel_by_escapeend@@ -109,7 +109,7 @@ RSpec.describe 'Shared Work Package Access',work_package_page.within_active_tab do# Commenting is disabledexpect(page)- .not_to have_css(add_comment_button_selector)+ .to have_no_css(add_comment_button_selector)end# And so is viewing and uploading attachmentsdiff --git a/spec/features/work_packages/share/share_spec.rb b/spec/features/work_packages/share/share_spec.rbindex 5cf8c1aa5a5..638b7afa236 100644--- a/spec/features/work_packages/share/share_spec.rb+++ b/spec/features/work_packages/share/share_spec.rb@@ -337,7 +337,7 @@ RSpec.describe 'Work package sharing',# false positives on the button not being rendered because# its request is still pending.wait_for_network_idle(timeout: 10)- expect(page).not_to have_button("Share")+ expect(page).to have_no_button("Share")endendenddiff --git a/spec/features/work_packages/shared_contexts.rb b/spec/features/work_packages/shared_contexts.rbindex 434e03f22ea..d9e8a4bb2db 100644--- a/spec/features/work_packages/shared_contexts.rb+++ b/spec/features/work_packages/shared_contexts.rb@@ -37,7 +37,7 @@ RSpec.shared_context 'ensure wp details pane update done' do# safeguard to ensure all backend queries# have been answered before starting a new spec- expect(page).to have_selector('.op-user-activity--user-name',- text: update_user.name)+ expect(page).to have_css('.op-user-activity--user-name',+ text: update_user.name)endenddiff --git a/spec/features/work_packages/sorting/manual_sorting_spec.rb b/spec/features/work_packages/sorting/manual_sorting_spec.rbindex d86a0c9651e..4ca1c9f48e1 100644--- a/spec/features/work_packages/sorting/manual_sorting_spec.rb+++ b/spec/features/work_packages/sorting/manual_sorting_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'features/work_packages/work_packages_page'-RSpec.describe 'Manual sorting of WP table', js: true do+RSpec.describe 'Manual sorting of WP table', :js dolet(:user) { create(:admin) }let(:wp_table) { Pages::WorkPackagesTable.new(project) }@@ -209,25 +209,25 @@ RSpec.describe 'Manual sorting of WP table', js: true doendit 'updates the work packages appropriately' do- expect(page).to have_selector('.group--value', text: 'Task (2)')- expect(page).to have_selector('.group--value', text: 'Bug (2)')+ expect(page).to have_css('.group--value', text: 'Task (2)')+ expect(page).to have_css('.group--value', text: 'Bug (2)')wp_table.drag_and_drop_work_package from: 0, to: 3- expect(page).to have_selector('.group--value', text: 'Task (1)')- expect(page).to have_selector('.group--value', text: 'Bug (3)')+ expect(page).to have_css('.group--value', text: 'Task (1)')+ expect(page).to have_css('.group--value', text: 'Bug (3)')endit 'dragging item with parent does not result in an error (Regression #30832)' do- expect(page).to have_selector('.group--value', text: 'Task (2)')- expect(page).to have_selector('.group--value', text: 'Bug (2)')+ expect(page).to have_css('.group--value', text: 'Task (2)')+ expect(page).to have_css('.group--value', text: 'Bug (2)')wp_table.drag_and_drop_work_package from: 1, to: 3- expect(page).to have_selector('.group--value', text: 'Task (1)')- expect(page).to have_selector('.group--value', text: 'Bug (3)')+ expect(page).to have_css('.group--value', text: 'Task (1)')+ expect(page).to have_css('.group--value', text: 'Bug (3)')- expect(page).not_to have_selector '.op-toast.error'+ expect(page).to have_no_css '.op-toast.error'endendenddiff --git a/spec/features/work_packages/sorting/table_sorting_spec.rb b/spec/features/work_packages/sorting/table_sorting_spec.rbindex 1a7c1acefad..231ae213096 100644--- a/spec/features/work_packages/sorting/table_sorting_spec.rb+++ b/spec/features/work_packages/sorting/table_sorting_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'features/work_packages/work_packages_page'-RSpec.describe 'Select work package row', js: true do+RSpec.describe 'Select work package row', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }let(:work_packages_page) { WorkPackagesPage.new(project) }diff --git a/spec/features/work_packages/switching_to_project_from_work_package_spec.rb b/spec/features/work_packages/switching_to_project_from_work_package_spec.rbindex 47edc6474ab..55d4f8be577 100644--- a/spec/features/work_packages/switching_to_project_from_work_package_spec.rb+++ b/spec/features/work_packages/switching_to_project_from_work_package_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Switching to project from work package', js: true do+RSpec.describe 'Switching to project from work package', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }@@ -22,7 +22,7 @@ RSpec.describe 'Switching to project from work package', js: true dowp_table.open_full_screen_by_link work_package# Follow link to project- expect(page).to have_selector('.attributes-group.-project-context')+ expect(page).to have_css('.attributes-group.-project-context')link = find('.attributes-group.-project-context .project-context--switch-link')expect(link[:href]).to include(project_path(project.id))diff --git a/spec/features/work_packages/table/baseline/baseline_invisible_project_spec.rb b/spec/features/work_packages/table/baseline/baseline_invisible_project_spec.rbindex e3d384d270e..7dc636fa7c2 100644--- a/spec/features/work_packages/table/baseline/baseline_invisible_project_spec.rb+++ b/spec/features/work_packages/table/baseline/baseline_invisible_project_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'baseline with a work package moved to an invisible project',- js: true,+RSpec.describe 'baseline with a work package moved to an invisible project', :js,with_settings: { date_format: '%Y-%m-%d' } doshared_let(:type_bug) { create(:type_bug) }shared_let(:visible_project) { create(:project, types: [type_bug]) }@@ -39,7 +38,8 @@ RSpec.describe 'baseline with a work package moved to an invisible project',create(:user,firstname: 'Itsa',lastname: 'Me',- member_with_permissions: { visible_project => %i[view_work_packages edit_work_packages work_package_assigned assign_versions] })+ member_with_permissions: { visible_project => %i[view_work_packages edit_work_packages work_package_assigned+ assign_versions] })endshared_let(:wp_bug) dodiff --git a/spec/features/work_packages/table/baseline/baseline_rendering_spec.rb b/spec/features/work_packages/table/baseline/baseline_rendering_spec.rbindex f3acc48a4be..dc14ac49dbb 100644--- a/spec/features/work_packages/table/baseline/baseline_rendering_spec.rb+++ b/spec/features/work_packages/table/baseline/baseline_rendering_spec.rb@@ -69,7 +69,8 @@ RSpec.describe 'baseline rendering',create(:admin,firstname: 'Itsa',lastname: 'Me',- member_with_permissions: { project => %i[view_work_packages edit_work_packages work_package_assigned assign_versions] })+ member_with_permissions: { project => %i[view_work_packages edit_work_packages work_package_assigned+ assign_versions] })endshared_let(:assignee) do@@ -372,16 +373,16 @@ RSpec.describe 'baseline rendering',# show icons on work package single carddisplay_representation.switch_to_card_layoutwithin "wp-single-card[data-work-package-id='#{wp_bug_was_task.id}']" do- expect(page).to have_selector(".op-table-baseline--icon-removed")+ expect(page).to have_css(".op-table-baseline--icon-removed")endwithin "wp-single-card[data-work-package-id='#{wp_task_was_bug.id}']" do- expect(page).to have_selector(".op-table-baseline--icon-added")+ expect(page).to have_css(".op-table-baseline--icon-added")endwithin "wp-single-card[data-work-package-id='#{wp_task_changed.id}']" do- expect(page).to have_selector(".op-table-baseline--icon-changed")+ expect(page).to have_css(".op-table-baseline--icon-changed")endwithin "wp-single-card[data-work-package-id='#{wp_task.id}']" do- expect(page).not_to have_selector(".op-wp-single-card--content-baseline")+ expect(page).to have_no_css(".op-wp-single-card--content-baseline")endend@@ -437,10 +438,10 @@ RSpec.describe 'baseline rendering',baseline_modal.expect_closedbaseline_modal.toggle_drop_modalbaseline_modal.expect_open- expect(page).to have_selector(".op-baseline--enterprise-title")+ expect(page).to have_css(".op-baseline--enterprise-title")# only yesterday is selectablepage.select('a specific date', from: 'op-baseline-filter')- expect(page).not_to have_select('op-baseline-filter', selected: 'a specific date')+ expect(page).to have_no_select('op-baseline-filter', selected: 'a specific date')page.select('yesterday', from: 'op-baseline-filter')expect(page).to have_select('op-baseline-filter', selected: 'yesterday')diff --git a/spec/features/work_packages/table/configuration_modal/column_spec.rb b/spec/features/work_packages/table/configuration_modal/column_spec.rbindex 0060a9b0397..50538dcab35 100644--- a/spec/features/work_packages/table/configuration_modal/column_spec.rb+++ b/spec/features/work_packages/table/configuration_modal/column_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Work Package table configuration modal columns spec', js: true do+RSpec.describe 'Work Package table configuration modal columns spec', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }@@ -22,8 +22,8 @@ RSpec.describe 'Work Package table configuration modal columns spec', js: true dlogin_as(user)wp_table.visit_query querywp_table.expect_work_package_listed work_package- expect(page).to have_selector('.wp-table--table-header', text: 'ID')- expect(page).to have_selector('.wp-table--table-header', text: 'SUBJECT')+ expect(page).to have_css('.wp-table--table-header', text: 'ID')+ expect(page).to have_css('.wp-table--table-header', text: 'SUBJECT')endshared_examples 'add and remove columns' do@@ -37,9 +37,9 @@ RSpec.describe 'Work Package table configuration modal columns spec', js: true dcolumns.expect_column_available 'Subject'columns.expect_column_not_available 'Project'- expect(page).to have_selector('.wp-table--table-header', text: 'ID')- expect(page).to have_selector('.wp-table--table-header', text: 'PROJECT')- expect(page).not_to have_selector('.wp-table--table-header', text: 'SUBJECT')+ expect(page).to have_css('.wp-table--table-header', text: 'ID')+ expect(page).to have_css('.wp-table--table-header', text: 'PROJECT')+ expect(page).to have_no_css('.wp-table--table-header', text: 'SUBJECT')endend@@ -76,9 +76,9 @@ RSpec.describe 'Work Package table configuration modal columns spec', js: true dsleep 1columns.apply- expect(page).to have_selector('.wp-table--table-header', text: 'ID')- expect(page).to have_selector('.wp-table--table-header', text: 'PROJECT')- expect(page).to have_selector('.wp-table--table-header', text: 'SUBJECT')+ expect(page).to have_css('.wp-table--table-header', text: 'ID')+ expect(page).to have_css('.wp-table--table-header', text: 'PROJECT')+ expect(page).to have_css('.wp-table--table-header', text: 'SUBJECT')names = all('.wp-table--table-header').map(&:text)# Depending on what browser is used, subject column may be first or seconddiff --git a/spec/features/work_packages/table/configuration_modal/filter_spec.rb b/spec/features/work_packages/table/configuration_modal/filter_spec.rbindex e8b8fbf355c..27694868bd2 100644--- a/spec/features/work_packages/table/configuration_modal/filter_spec.rb+++ b/spec/features/work_packages/table/configuration_modal/filter_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Work Package table configuration modal filters spec', js: true do+RSpec.describe 'Work Package table configuration modal filters spec', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }diff --git a/spec/features/work_packages/table/configuration_modal/table_configuration_modal_spec.rb b/spec/features/work_packages/table/configuration_modal/table_configuration_modal_spec.rbindex 2591435afd7..2cf00353f1a 100644--- a/spec/features/work_packages/table/configuration_modal/table_configuration_modal_spec.rb+++ b/spec/features/work_packages/table/configuration_modal/table_configuration_modal_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Work Package table configuration modal', js: true do+RSpec.describe 'Work Package table configuration modal', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }@@ -32,6 +32,6 @@ RSpec.describe 'Work Package table configuration modal', js: true dofind('#column-context-menu .menu-item', text: 'Insert columns').click# Expect active tab is columns- expect(page).to have_selector('.op-tab-row--link_selected', text: 'COLUMNS')+ expect(page).to have_css('.op-tab-row--link_selected', text: 'COLUMNS')endenddiff --git a/spec/features/work_packages/table/context_menu/context_menu_shared_examples.rb b/spec/features/work_packages/table/context_menu/context_menu_shared_examples.rbindex dd307679dc5..a6c7f29a4d1 100644--- a/spec/features/work_packages/table/context_menu/context_menu_shared_examples.rb+++ b/spec/features/work_packages/table/context_menu/context_menu_shared_examples.rb@@ -16,8 +16,8 @@ RSpec.shared_examples_for 'provides a single WP context menu' do# Open full viewopen_context_menu.callmenu.choose('Open fullscreen view')- expect(page).to have_selector('.work-packages--show-view .inline-edit--container.subject',- text: work_package.subject)+ expect(page).to have_css('.work-packages--show-view .inline-edit--container.subject',+ text: work_package.subject)# Open log timeopen_context_menu.call@@ -29,16 +29,16 @@ RSpec.shared_examples_for 'provides a single WP context menu' do# Open Moveopen_context_menu.callmenu.choose('Change project')- expect(page).to have_selector('h2', text: I18n.t(:button_move))- expect(page).to have_selector('a.work_package', text: "##{work_package.id}")+ expect(page).to have_css('h2', text: I18n.t(:button_move))+ expect(page).to have_css('a.work_package', text: "##{work_package.id}")# Open Copyopen_context_menu.callmenu.choose('Copy')# Split view open in copy stateexpect(page)- .to have_selector('.wp-new-top-row',- text: "#{work_package.status.name.capitalize}\n#{work_package.type.name.upcase}")+ .to have_css('.wp-new-top-row',+ text: "#{work_package.status.name.capitalize}\n#{work_package.type.name.upcase}")expect(page).to have_field('wp-new-inline-edit--field-subject', with: work_package.subject)# Open Delete@@ -50,11 +50,11 @@ RSpec.shared_examples_for 'provides a single WP context menu' do# Open create new childopen_context_menu.callmenu.choose('Create new child')- expect(page).to have_selector('.inline-edit--container.subject input')+ expect(page).to have_css('.inline-edit--container.subject input')expect(current_url).to match(/.*\/create_new\?.*(&)*parent_id=#{work_package.id}/)find_by_id('work-packages--edit-actions-cancel').click- expect(page).not_to have_selector('.inline-edit--container.subject input')+ expect(page).to have_no_css('.inline-edit--container.subject input')# Timeline actions only shown when openwp_timeline.expect_timeline!(open: false)@@ -65,8 +65,8 @@ RSpec.shared_examples_for 'provides a single WP context menu' do# Copy to other projectopen_context_menu.callmenu.choose('Copy to other project')- expect(page).to have_selector('h2', text: I18n.t(:button_copy))- expect(page).to have_selector('a.work_package', text: "##{work_package.id}")+ expect(page).to have_css('h2', text: I18n.t(:button_copy))+ expect(page).to have_css('a.work_package', text: "##{work_package.id}")enddescribe 'creating work packages' do@@ -76,7 +76,7 @@ RSpec.shared_examples_for 'provides a single WP context menu' doit 'can create a new child from the context menu (Regression #33329)' doopen_context_menu.callmenu.choose('Create new child')- expect(page).to have_selector('.inline-edit--container.subject input')+ expect(page).to have_css('.inline-edit--container.subject input')expect(current_url).to match(/.*\/create_new\?.*(&)*parent_id=#{work_package.id}/)split_view = Pages::SplitWorkPackageCreate.new project: work_package.project@@ -87,7 +87,7 @@ RSpec.shared_examples_for 'provides a single WP context menu' dosubject.submit_by_entersplit_view.expect_and_dismiss_toaster message: 'Successful creation.'- expect(page).to have_selector('[data-test-selector="op-wp-breadcrumb"]', text: "Parent:\n#{work_package.subject}")+ expect(page).to have_css('[data-test-selector="op-wp-breadcrumb"]', text: "Parent:\n#{work_package.subject}")wp = WorkPackage.lastexpect(wp.parent).to eq work_packageenddiff --git a/spec/features/work_packages/table/context_menu/context_menu_spec.rb b/spec/features/work_packages/table/context_menu/context_menu_spec.rbindex 5cf1fdb0d4f..472213a20b7 100644--- a/spec/features/work_packages/table/context_menu/context_menu_spec.rb+++ b/spec/features/work_packages/table/context_menu/context_menu_spec.rb@@ -1,7 +1,7 @@require 'spec_helper'require_relative 'context_menu_shared_examples'-RSpec.describe 'Work package table context menu', js: true, with_cuprite: true do+RSpec.describe 'Work package table context menu', :js, :with_cuprite doshared_let(:user) { create(:admin) }shared_let(:work_package) { create(:work_package) }diff --git a/spec/features/work_packages/table/delete_work_packages_spec.rb b/spec/features/work_packages/table/delete_work_packages_spec.rbindex 6f3a0c19c56..4eef1626ce6 100644--- a/spec/features/work_packages/table/delete_work_packages_spec.rb+++ b/spec/features/work_packages/table/delete_work_packages_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Delete work package', js: true do+RSpec.describe 'Delete work package', :js dolet(:user) { create(:admin) }let(:context_menu) { Components::WorkPackages::ContextMenu.new }let(:destroy_modal) { Components::WorkPackages::DestroyModal.new }diff --git a/spec/features/work_packages/table/duration_field_spec.rb b/spec/features/work_packages/table/duration_field_spec.rbindex b90673348f1..81dbb374c80 100644--- a/spec/features/work_packages/table/duration_field_spec.rb+++ b/spec/features/work_packages/table/duration_field_spec.rb@@ -1,7 +1,6 @@require 'spec_helper'-RSpec.describe 'Duration field in the work package table',- js: true do+RSpec.describe 'Duration field in the work package table', :js doshared_let(:current_user) { create(:admin) }shared_let(:work_package) donext_monday = Time.zone.today.beginning_of_week.next_occurring(:monday)diff --git a/spec/features/work_packages/table/edit_work_packages_spec.rb b/spec/features/work_packages/table/edit_work_packages_spec.rbindex cb0ff7113c2..1b6dea4eaf5 100644--- a/spec/features/work_packages/table/edit_work_packages_spec.rb+++ b/spec/features/work_packages/table/edit_work_packages_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Inline editing work packages', js: true do+RSpec.describe 'Inline editing work packages', :js dolet(:manager_role) docreate(:project_role,permissions: %i[view_work_packages@@ -175,9 +175,9 @@ RSpec.describe 'Inline editing work packages', js: true domessage: "#{cf_list_name} can't be blank.\n#{cf_text_name} can't be blank.")- expect(page).to have_selector('th a', text: cf_list_name.upcase)- expect(page).to have_selector('th a', text: cf_text_name.upcase)- expect(wp_table.row(work_package)).to have_selector('.wp-table--cell-container.-error', count: 2)+ expect(page).to have_css('th a', text: cf_list_name.upcase)+ expect(page).to have_css('th a', text: cf_text_name.upcase)+ expect(wp_table.row(work_package)).to have_css('.wp-table--cell-container.-error', count: 2)cf_text = wp_table.edit_field(work_package, custom_fields.last.attribute_name(:camel_case))cf_text.update('my custom text', expect_failure: true)diff --git a/spec/features/work_packages/table/empty_filters_spec.rb b/spec/features/work_packages/table/empty_filters_spec.rbindex f145955b6ec..8053a276618 100644--- a/spec/features/work_packages/table/empty_filters_spec.rb+++ b/spec/features/work_packages/table/empty_filters_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Empty query filters', js: true do+RSpec.describe 'Empty query filters', :js dolet(:user) { create(:admin) }let(:work_package) { create(:work_package) }let(:wp_table) { Pages::WorkPackagesTable.new }diff --git a/spec/features/work_packages/table/group_by/group_by_boolean_spec.rb b/spec/features/work_packages/table/group_by/group_by_boolean_spec.rbindex 79a3bae09a9..bea6f49e021 100644--- a/spec/features/work_packages/table/group_by/group_by_boolean_spec.rb+++ b/spec/features/work_packages/table/group_by/group_by_boolean_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Work Package group by boolean field', js: true do+RSpec.describe 'Work Package group by boolean field', :js dolet(:user) { create(:admin) }let(:project) { create(:project, types: [type], work_package_custom_fields: [bool_cf]) }diff --git a/spec/features/work_packages/table/group_by/group_headers_spec.rb b/spec/features/work_packages/table/group_by/group_headers_spec.rbindex bbd5d9d0da9..37e32290854 100644--- a/spec/features/work_packages/table/group_by/group_headers_spec.rb+++ b/spec/features/work_packages/table/group_by/group_headers_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Work Package table group headers', js: true do+RSpec.describe 'Work Package table group headers', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }diff --git a/spec/features/work_packages/table/hierarchy/hierarchy_parent_below_spec.rb b/spec/features/work_packages/table/hierarchy/hierarchy_parent_below_spec.rbindex b2bd7949571..cfacef7ab2f 100644--- a/spec/features/work_packages/table/hierarchy/hierarchy_parent_below_spec.rb+++ b/spec/features/work_packages/table/hierarchy/hierarchy_parent_below_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Work Package table hierarchy parent below', js: true do+RSpec.describe 'Work Package table hierarchy parent below', :js dolet(:user) { create(:admin) }let(:type_bug) { create(:type_bug) }let(:type_task) { create(:type_task) }@@ -128,10 +128,10 @@ RSpec.describe 'Work Package table hierarchy parent below', js: true dowp_table.expect_work_package_listed(child, child2, parent, grandparent)# Expect pagination to be correct- expect(page).to have_selector('.op-pagination--item_current', text: '3')+ expect(page).to have_css('.op-pagination--item_current', text: '3')# Expect count to be correct (one additional parent shown)- expect(page).to have_selector('.wp--row', count: 4)+ expect(page).to have_css('.wp--row', count: 4)# Double order result from regressionwp_table.expect_work_package_order(grandparent.id, parent.id, child.id, child2.id)@@ -155,14 +155,14 @@ RSpec.describe 'Work Package table hierarchy parent below', js: true dowp_table.visit!wp_table.expect_work_package_listed(child, parent)- expect(page).to have_selector('.wp-table--hierarchy-indicator-icon')+ expect(page).to have_css('.wp-table--hierarchy-indicator-icon')split_page = wp_table.open_split_view(parent)split_page.visit_tab!("relations")relations.remove_child(child)loading_indicator_saveguard- expect(page).not_to have_selector('.wp-table--hierarchy-indicator-icon')+ expect(page).to have_no_css('.wp-table--hierarchy-indicator-icon')endendenddiff --git a/spec/features/work_packages/table/hierarchy/hierarchy_sorting_spec.rb b/spec/features/work_packages/table/hierarchy/hierarchy_sorting_spec.rbindex ebeb987cb09..705b0fb5a6b 100644--- a/spec/features/work_packages/table/hierarchy/hierarchy_sorting_spec.rb+++ b/spec/features/work_packages/table/hierarchy/hierarchy_sorting_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Work Package table hierarchy and sorting', js: true do+RSpec.describe 'Work Package table hierarchy and sorting', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }diff --git a/spec/features/work_packages/table/hierarchy/hierarchy_spec.rb b/spec/features/work_packages/table/hierarchy/hierarchy_spec.rbindex dfc66d50a34..d1e3a8d0b35 100644--- a/spec/features/work_packages/table/hierarchy/hierarchy_spec.rb+++ b/spec/features/work_packages/table/hierarchy/hierarchy_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Work Package table hierarchy', js: true do+RSpec.describe 'Work Package table hierarchy', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }@@ -136,7 +136,7 @@ RSpec.describe 'Work Package table hierarchy', js: true dohierarchy.enable_hierarchy# Should not be marked as additional row (grey)- expect(page).not_to have_selector('.wp-table--hierarchy-aditional-row')+ expect(page).to have_no_css('.wp-table--hierarchy-aditional-row')hierarchy.expect_hierarchy_at(wp_root, wp_inter)hierarchy.expect_leaf_at(wp_leaf)diff --git a/spec/features/work_packages/table/hierarchy/hierarchy_vs_grouping_spec.rb b/spec/features/work_packages/table/hierarchy/hierarchy_vs_grouping_spec.rbindex d615f8eb5b4..9e2f4f2a0e3 100644--- a/spec/features/work_packages/table/hierarchy/hierarchy_vs_grouping_spec.rb+++ b/spec/features/work_packages/table/hierarchy/hierarchy_vs_grouping_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Work Package table hierarchy vs grouping', js: true do+RSpec.describe 'Work Package table hierarchy vs grouping', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }diff --git a/spec/features/work_packages/table/hierarchy/parent_column_spec.rb b/spec/features/work_packages/table/hierarchy/parent_column_spec.rbindex ddab51aae8d..e4bf762a997 100644--- a/spec/features/work_packages/table/hierarchy/parent_column_spec.rb+++ b/spec/features/work_packages/table/hierarchy/parent_column_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Work Package table parent column', js: true do+RSpec.describe 'Work Package table parent column', :js dolet(:user) { create(:admin) }let!(:parent) { create(:work_package, project:) }let!(:child) { create(:work_package, project:, parent:) }@@ -28,11 +28,11 @@ RSpec.describe 'Work Package table parent column', js: true do# Hierarchy mode is enabled by defaultpage.within(".wp-row-#{parent.id}") do- expect(page).to have_selector('td.parent', text: '-')+ expect(page).to have_css('td.parent', text: '-')endpage.within(".wp-row-#{child.id}") do- expect(page).to have_selector('td.parent', text: "##{parent.id}")+ expect(page).to have_css('td.parent', text: "##{parent.id}")endenddiff --git a/spec/features/work_packages/table/inline_create/create_work_packages_spec.rb b/spec/features/work_packages/table/inline_create/create_work_packages_spec.rbindex 87b7adff828..29f12962e53 100644--- a/spec/features/work_packages/table/inline_create/create_work_packages_spec.rb+++ b/spec/features/work_packages/table/inline_create/create_work_packages_spec.rb@@ -34,8 +34,8 @@ RSpec.describe 'inline create work package', :js dowp_table.expect_work_package_listed(existing_wp)wp_table.click_inline_create- expect(page).to have_selector('.wp--row', count: 2)- expect(page).to have_selector('.wp-inline-create-row')+ expect(page).to have_css('.wp--row', count: 2)+ expect(page).to have_css('.wp-inline-create-row')expect(page).to have_focus_on('#wp-new-inline-edit--field-subject')# Expect subject to be activated@@ -52,7 +52,7 @@ RSpec.describe 'inline create work package', :js do)# Expect new create row to exist- expect(page).to have_selector('.wp--row', count: 2)+ expect(page).to have_css('.wp--row', count: 2)expect(page).to have_button(exact_text: 'Create new work package')wp_table.click_inline_create@@ -65,8 +65,8 @@ RSpec.describe 'inline create work package', :js do# Callback for adjustmentscallback.call- expect(page).to have_selector('.wp--row .subject', text: 'Some subject')- expect(page).to have_selector('.wp--row .subject', text: 'Another subject')+ expect(page).to have_css('.wp--row .subject', text: 'Some subject')+ expect(page).to have_css('.wp--row .subject', text: 'Another subject')# safeguardswp_table.dismiss_toaster!@@ -75,7 +75,7 @@ RSpec.describe 'inline create work package', :js do)# Expect no inline create open- expect(page).not_to have_selector('.wp-inline-create-row')+ expect(page).to have_no_css('.wp-inline-create-row')endend@@ -84,7 +84,7 @@ RSpec.describe 'inline create work package', :js doit 'renders the work package, but no create row' dowp_table.expect_work_package_listed(existing_wp)- expect(page).not_to have_button(exact_text: 'Create new work package')+ expect(page).to have_no_button(exact_text: 'Create new work package')endend@@ -190,8 +190,8 @@ RSpec.describe 'inline create work package', :js doit 'renders the work packages, but no create' dowp_table.expect_work_package_listed(existing_wp)- expect(page).not_to have_button(exact_text: 'Create new work package')- expect(page).to have_selector('.add-work-package[disabled]')+ expect(page).to have_no_button(exact_text: 'Create new work package')+ expect(page).to have_css('.add-work-package[disabled]')endendenddiff --git a/spec/features/work_packages/table/inline_create/inline_create_refresh_spec.rb b/spec/features/work_packages/table/inline_create/inline_create_refresh_spec.rbindex 064e2481536..84cbcd89286 100644--- a/spec/features/work_packages/table/inline_create/inline_create_refresh_spec.rb+++ b/spec/features/work_packages/table/inline_create/inline_create_refresh_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Refreshing in inline-create row', flaky: true, js: true do+RSpec.describe 'Refreshing in inline-create row', :flaky, :js dolet(:user) { create(:admin) }let(:project) { create(:project) }@@ -23,16 +23,16 @@ RSpec.describe 'Refreshing in inline-create row', flaky: true, js: true doendit 'correctly updates the set of active columns' do- expect(page).to have_selector('.wp--row', count: 0)+ expect(page).to have_css('.wp--row', count: 0)wp_table.click_inline_create- expect(page).to have_selector('.wp--row', count: 1)+ expect(page).to have_css('.wp--row', count: 1)- expect(page).to have_selector('.wp-inline-create-row')- expect(page).to have_selector('.wp-inline-create-row .wp-table--cell-td.subject')- expect(page).to have_selector('.wp-inline-create-row .wp-table--cell-td.category')+ expect(page).to have_css('.wp-inline-create-row')+ expect(page).to have_css('.wp-inline-create-row .wp-table--cell-td.subject')+ expect(page).to have_css('.wp-inline-create-row .wp-table--cell-td.category')columns.add '% Complete'- expect(page).to have_selector('.wp-inline-create-row .wp-table--cell-td.wp-table--cell-td.percentageDone')+ expect(page).to have_css('.wp-inline-create-row .wp-table--cell-td.wp-table--cell-td.percentageDone')endenddiff --git a/spec/features/work_packages/table/inline_create/parallel_creation_spec.rb b/spec/features/work_packages/table/inline_create/parallel_creation_spec.rbindex 3d3c30d9bb5..0e9b7335572 100644--- a/spec/features/work_packages/table/inline_create/parallel_creation_spec.rb+++ b/spec/features/work_packages/table/inline_create/parallel_creation_spec.rb@@ -49,15 +49,15 @@ RSpec.describe 'Parallel work package creation spec', :js donew_work_package_in_both 'Some subject', 'My description!'# Save in inline create- expect(page).to have_selector('.wp-inline-create-row')- expect(page).to have_selector('.wp--row', count: 1)+ expect(page).to have_css('.wp-inline-create-row')+ expect(page).to have_css('.wp--row', count: 1)subject_field = wp_table.edit_field(nil, :subject)subject_field.save!# There should be one row, and no open inline create row- expect(page).to have_selector('.wp--row', count: 1)- expect(page).not_to have_selector('.wp-inline-create-row')+ expect(page).to have_css('.wp--row', count: 1)+ expect(page).to have_no_css('.wp-inline-create-row')wp_table.expect_toast(message: 'Successful creation. Click here to open this work package in fullscreen view.'@@ -81,7 +81,7 @@ RSpec.describe 'Parallel work package creation spec', :js donew_work_package_in_both 'New subject', 'New description'# Inline create still open- expect(page).to have_selector('.wp-inline-create-row')+ expect(page).to have_css('.wp-inline-create-row')# Save in split screennew_split = Pages::SplitWorkPackageCreate.new(project:)@@ -94,8 +94,8 @@ RSpec.describe 'Parallel work package creation spec', :js domessage: 'Successful creation.')wp_table.dismiss_toaster!- expect(page).to have_selector('.wp--row', count: 2)- expect(page).not_to have_selector('.wp-inline-create-row')+ expect(page).to have_css('.wp--row', count: 2)+ expect(page).to have_no_css('.wp-inline-create-row')# Get the last work packagewp2 = WorkPackage.lastdiff --git a/spec/features/work_packages/table/milestones_spec.rb b/spec/features/work_packages/table/milestones_spec.rbindex f9ea1a684e5..702a42791ba 100644--- a/spec/features/work_packages/table/milestones_spec.rb+++ b/spec/features/work_packages/table/milestones_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Inline editing milestones', js: true do+RSpec.describe 'Inline editing milestones', :js dolet(:user) { create(:admin) }let(:type) { create(:type, is_milestone: true) }diff --git a/spec/features/work_packages/table/queries/bool_cf_filter_spec.rb b/spec/features/work_packages/table/queries/bool_cf_filter_spec.rbindex 4ca541a4e64..7daced59841 100644--- a/spec/features/work_packages/table/queries/bool_cf_filter_spec.rb+++ b/spec/features/work_packages/table/queries/bool_cf_filter_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Work package filtering by bool custom field', js: true do+RSpec.describe 'Work package filtering by bool custom field', :js dolet(:project) { create(:project) }let(:type) { project.types.first }let(:wp_table) { Pages::WorkPackagesTable.new(project) }diff --git a/spec/features/work_packages/table/queries/default_queries_spec.rb b/spec/features/work_packages/table/queries/default_queries_spec.rbindex aa249d42ad1..f2e3053bf8e 100644--- a/spec/features/work_packages/table/queries/default_queries_spec.rb+++ b/spec/features/work_packages/table/queries/default_queries_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Default work package queries', js: true do+RSpec.describe 'Default work package queries', :js docreate_shared_association_defaults_for_work_package_factoryshared_let(:user) { create(:admin) }diff --git a/spec/features/work_packages/table/queries/filter_pagination_spec.rb b/spec/features/work_packages/table/queries/filter_pagination_spec.rbindex b78708436ef..124acc8f64a 100644--- a/spec/features/work_packages/table/queries/filter_pagination_spec.rb+++ b/spec/features/work_packages/table/queries/filter_pagination_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'features/work_packages/work_packages_page'-RSpec.describe 'Filter updates pagination', js: true do+RSpec.describe 'Filter updates pagination', :js dolet(:user) docreate(:user,member_with_permissions: { project => %i[view_work_packages] })@@ -53,12 +53,12 @@ RSpec.describe 'Filter updates pagination', js: true dowp_table.visit!end- it 'will reset page to 1 if changing filter' do+ it 'resets page to 1 if changing filter' dowp_table.expect_work_package_listed work_package_1wp_table.ensure_work_package_not_listed! work_package_2# Expect pagination to be correct- expect(page).to have_selector('.op-pagination--item_current', text: '1')+ expect(page).to have_css('.op-pagination--item_current', text: '1')# Go to second pagewithin('.op-pagination--pages') do@@ -69,7 +69,7 @@ RSpec.describe 'Filter updates pagination', js: true dowp_table.ensure_work_package_not_listed! work_package_1# Expect pagination to be correct- expect(page).to have_selector('.op-pagination--item_current', text: '2')+ expect(page).to have_css('.op-pagination--item_current', text: '2')# Change filter to assigned tofilters.expect_filter_count 1@@ -81,6 +81,6 @@ RSpec.describe 'Filter updates pagination', js: true dowp_table.ensure_work_package_not_listed! work_package_2# Expect pagination to be back to 1- expect(page).to have_selector('.op-pagination--range', text: '1 - 1/1')+ expect(page).to have_css('.op-pagination--range', text: '1 - 1/1')endenddiff --git a/spec/features/work_packages/table/queries/filter_spec.rb b/spec/features/work_packages/table/queries/filter_spec.rbindex f8d12026fb3..ba8367868ac 100644--- a/spec/features/work_packages/table/queries/filter_spec.rb+++ b/spec/features/work_packages/table/queries/filter_spec.rb@@ -146,8 +146,8 @@ RSpec.describe 'filter work packages', :js dofilters.open_autocompleter :status- expect(page).to have_selector('.ng-option', text: closed_status.name)- expect(page).not_to have_selector('.ng-option', text: status.name)+ expect(page).to have_css('.ng-option', text: closed_status.name)+ expect(page).to have_no_css('.ng-option', text: status.name)endend@@ -262,7 +262,7 @@ RSpec.describe 'filter work packages', :js do# Do not display already selected values in the autocompleter (Regression #46249)filters.open_autocompleter list_cf.attribute_name(:camel_case)- expect(page).not_to have_selector('.ng-option', text: list_cf.custom_options.last.value)+ expect(page).to have_no_css('.ng-option', text: list_cf.custom_options.last.value)wp_table.save_as('Some query name')@@ -487,7 +487,7 @@ RSpec.describe 'filter work packages', :js doendit "does not offer attachment filters" do- expect(page).not_to have_select 'add_filter_select', with_options: ['Attachment content', 'Attachment file name']+ expect(page).to have_no_select 'add_filter_select', with_options: ['Attachment content', 'Attachment file name']endenddiff --git a/spec/features/work_packages/table/queries/id_filter_spec.rb b/spec/features/work_packages/table/queries/id_filter_spec.rbindex 2a9c9cad9f1..ad5681f0c91 100644--- a/spec/features/work_packages/table/queries/id_filter_spec.rb+++ b/spec/features/work_packages/table/queries/id_filter_spec.rb@@ -84,8 +84,8 @@ RSpec.describe 'Work package filtering by id', :js doit 'can still inline create a new work package (regression #41667)' dowp_table.click_inline_create- expect(page).to have_selector('.wp--row', count: 2)+ expect(page).to have_css('.wp--row', count: 2)- expect(page).to have_selector('.wp-inline-create-row')+ expect(page).to have_css('.wp-inline-create-row')endenddiff --git a/spec/features/work_packages/table/queries/me_filter_spec.rb b/spec/features/work_packages/table/queries/me_filter_spec.rbindex 11b01fe50ed..4bf19481754 100644--- a/spec/features/work_packages/table/queries/me_filter_spec.rb+++ b/spec/features/work_packages/table/queries/me_filter_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'filter me value', js: true do+RSpec.describe 'filter me value', :js dolet(:status) { create(:default_status) }let!(:priority) { create(:default_priority) }let(:project) dodiff --git a/spec/features/work_packages/table/queries/query_menu_refresh_spec.rb b/spec/features/work_packages/table/queries/query_menu_refresh_spec.rbindex 2369dbae78c..628cb1680b7 100644--- a/spec/features/work_packages/table/queries/query_menu_refresh_spec.rb+++ b/spec/features/work_packages/table/queries/query_menu_refresh_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Refreshing query menu item', js: true do+RSpec.describe 'Refreshing query menu item', :js dolet(:user) { create(:admin) }let(:project) { create(:project) }let(:wp_table) { Pages::WorkPackagesTable.new(project) }diff --git a/spec/features/work_packages/table/queries/query_menu_spec.rb b/spec/features/work_packages/table/queries/query_menu_spec.rbindex 60a0630ff5b..32c64a99b02 100644--- a/spec/features/work_packages/table/queries/query_menu_spec.rb+++ b/spec/features/work_packages/table/queries/query_menu_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Query menu item', js: true do+RSpec.describe 'Query menu item', :js dolet(:project) { create(:project) }let(:wp_table) { Pages::WorkPackagesTable.new(project) }let(:filters) { Components::WorkPackages::Filters.new }@@ -62,8 +62,8 @@ RSpec.describe 'Query menu item', js: true doit 'shows the query menu with queries stored for the global page' dowp_table.visit!- expect(page).to have_selector('.op-view-select--search-results')- expect(page).to have_selector('.op-sidemenu--item-action', wait: 20, minimum: 1)+ expect(page).to have_css('.op-view-select--search-results')+ expect(page).to have_css('.op-sidemenu--item-action', wait: 20, minimum: 1)within '.op-sidebar' doexpect(page)@@ -71,9 +71,9 @@ RSpec.describe 'Query menu item', js: true doexpect(page).to have_content(global_public_view.query.name, wait: 10)expect(page)- .not_to have_content(global_other_view.query.name)+ .to have_no_content(global_other_view.query.name)expect(page)- .not_to have_content(project_view.query.name)+ .to have_no_content(project_view.query.name)endendend@@ -100,7 +100,7 @@ RSpec.describe 'Query menu item', js: true dofind('.button', text: 'Save').click- expect(page).to have_selector('.op-sidemenu--item-action', text: 'Some query name', wait: 20)+ expect(page).to have_css('.op-sidemenu--item-action', text: 'Some query name', wait: 20)last_query = Query.lastexpect(last_query.public).to be_truthy@@ -117,7 +117,7 @@ RSpec.describe 'Query menu item', js: true doquery_title.rename 'My special query!123'query_title.expect_title 'My special query!123'- expect(page).to have_selector('.op-sidemenu--item-action', text: 'My special query!123', wait: 20, count: 1)+ expect(page).to have_css('.op-sidemenu--item-action', text: 'My special query!123', wait: 20, count: 1)endit 'allows filtering, saving, retrieving and altering the saved filter (Regression #25372)' dodiff --git a/spec/features/work_packages/table/queries/shared_with_user_filter_spec.rb b/spec/features/work_packages/table/queries/shared_with_user_filter_spec.rbindex 2199102cb24..19a24079fa7 100644--- a/spec/features/work_packages/table/queries/shared_with_user_filter_spec.rb+++ b/spec/features/work_packages/table/queries/shared_with_user_filter_spec.rb@@ -50,7 +50,7 @@ RSpec.describe 'Work package filtering',endshared_let(:project_role_with_insufficient_permissions) docreate(:project_role, permissions: %i[view_work_packages- save_queries])+ save_queries])endshared_let(:work_package_role) docreate(:work_package_role, permissions: %i[view_work_packages])diff --git a/spec/features/work_packages/table/queries/subject_filter_spec.rb b/spec/features/work_packages/table/queries/subject_filter_spec.rbindex a0b993df90c..d752c73be0a 100644--- a/spec/features/work_packages/table/queries/subject_filter_spec.rb+++ b/spec/features/work_packages/table/queries/subject_filter_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Work package filtering by subject', js: true do+RSpec.describe 'Work package filtering by subject', :js dolet(:project) { create(:project, public: true) }let(:admin) { create(:admin) }let(:wp_table) { Pages::WorkPackagesTable.new(project) }diff --git a/spec/features/work_packages/table/queries/summary_spec.rb b/spec/features/work_packages/table/queries/summary_spec.rbindex 687ff0a971b..861f64f13a4 100644--- a/spec/features/work_packages/table/queries/summary_spec.rb+++ b/spec/features/work_packages/table/queries/summary_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'features/work_packages/work_packages_page'-RSpec.describe 'Work package query summary item', js: true do+RSpec.describe 'Work package query summary item', :js dolet(:project) { create(:project, identifier: 'test_project', public: false) }let(:role) { create(:project_role, permissions: [:view_work_packages]) }let(:work_package) { create(:work_package, project:) }@@ -45,7 +45,7 @@ RSpec.describe 'Work package query summary item', js: true doit 'allows users to visit the summary page' dofind('.op-sidemenu--item-action', text: 'Summary', wait: 10).click- expect(page).to have_selector('h2', text: 'Summary')- expect(page).to have_selector('td', text: work_package.type.name)+ expect(page).to have_css('h2', text: 'Summary')+ expect(page).to have_css('td', text: work_package.type.name)endenddiff --git a/spec/features/work_packages/table/relations_spec.rb b/spec/features/work_packages/table/relations_spec.rbindex 2c424e4ad8e..567b72dd8de 100644--- a/spec/features/work_packages/table/relations_spec.rb+++ b/spec/features/work_packages/table/relations_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Work Package table relations', js: true, with_ee: %i[work_package_query_relation_columns] do+RSpec.describe 'Work Package table relations', :js, with_ee: %i[work_package_query_relation_columns] dolet(:user) { create(:admin) }let(:type) { create(:type) }@@ -57,28 +57,28 @@ RSpec.describe 'Work Package table relations', js: true, with_ee: %i[work_packagwp_from_to = wp_table.row(wp_to)# Expect count for wp_from in both columns to be one- expect(wp_from_row).to have_selector(".#{type_column_id} .wp-table--relation-count", text: '2')- expect(wp_from_row).to have_selector(".#{type_column_follows} .wp-table--relation-count", text: '2')+ expect(wp_from_row).to have_css(".#{type_column_id} .wp-table--relation-count", text: '2')+ expect(wp_from_row).to have_css(".#{type_column_follows} .wp-table--relation-count", text: '2')# Expect count for wp_to in both columns to be not rendered- expect(wp_from_to).not_to have_selector(".#{type_column_id} .wp-table--relation-count")- expect(wp_from_to).not_to have_selector(".#{type_column_follows} .wp-table--relation-count")+ expect(wp_from_to).to have_no_css(".#{type_column_id} .wp-table--relation-count")+ expect(wp_from_to).to have_no_css(".#{type_column_follows} .wp-table--relation-count")# Expand first columnwp_from_row.find(".#{type_column_id} .wp-table--relation-indicator").click- expect(page).to have_selector(".__relations-expanded-from-#{wp_from.id}", count: 2)+ expect(page).to have_css(".__relations-expanded-from-#{wp_from.id}", count: 2)related_row = page.first(".__relations-expanded-from-#{wp_from.id}")- expect(related_row).to have_selector('td.wp-table--relation-cell-td', text: "Precedes")+ expect(related_row).to have_css('td.wp-table--relation-cell-td', text: "Precedes")# Collapsewp_from_row.find(".#{type_column_id} .wp-table--relation-indicator").click- expect(page).not_to have_selector(".__relations-expanded-from-#{wp_from.id}")+ expect(page).to have_no_css(".__relations-expanded-from-#{wp_from.id}")# Expand second columnwp_from_row.find(".#{type_column_follows} .wp-table--relation-indicator").click- expect(page).to have_selector(".__relations-expanded-from-#{wp_from.id}", count: 2)+ expect(page).to have_css(".__relations-expanded-from-#{wp_from.id}", count: 2)related_row = page.first(".__relations-expanded-from-#{wp_from.id}")- expect(related_row).to have_selector('.wp-table--relation-cell-td', text: wp_to.type)+ expect(related_row).to have_css('.wp-table--relation-cell-td', text: wp_to.type)# Open Timeline# Should be initially closed@@ -93,7 +93,7 @@ RSpec.describe 'Work Package table relations', js: true, with_ee: %i[work_packag# Collapsewp_from_row.find(".#{type_column_follows} .wp-table--relation-indicator").click- expect(page).not_to have_selector(".__relations-expanded-from-#{wp_from.id}")+ expect(page).to have_no_css(".__relations-expanded-from-#{wp_from.id}")wp_timeline.expect_row_count(3)enddiff --git a/spec/features/work_packages/table/scheduling/manual_scheduling_spec.rb b/spec/features/work_packages/table/scheduling/manual_scheduling_spec.rbindex aaf7109e2e4..0e190e3806f 100644--- a/spec/features/work_packages/table/scheduling/manual_scheduling_spec.rb+++ b/spec/features/work_packages/table/scheduling/manual_scheduling_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Manual scheduling', js: true do+RSpec.describe 'Manual scheduling', :js dolet(:project) { create(:project, types: [type]) }let(:type) { create(:type) }@@ -55,20 +55,20 @@ RSpec.describe 'Manual scheduling', js: true do# Expect not editablestart_date.within_modal do- expect(page).to have_selector('input[name="startDate"][disabled]')- expect(page).to have_selector('input[name="endDate"][disabled]')- expect(page).to have_selector("#{test_selector('op-datepicker-modal--action')}:not([disabled])", text: 'Cancel')- expect(page).to have_selector("#{test_selector('op-datepicker-modal--action')}:not([disabled])", text: 'Save')+ expect(page).to have_css('input[name="startDate"][disabled]')+ expect(page).to have_css('input[name="endDate"][disabled]')+ expect(page).to have_css("#{test_selector('op-datepicker-modal--action')}:not([disabled])", text: 'Cancel')+ expect(page).to have_css("#{test_selector('op-datepicker-modal--action')}:not([disabled])", text: 'Save')endstart_date.toggle_scheduling_mode# Expect editablestart_date.within_modal do- expect(page).to have_selector('input[name="startDate"]:not([disabled])')- expect(page).to have_selector('input[name="endDate"]:not([disabled])')- expect(page).to have_selector("#{test_selector('op-datepicker-modal--action')}:not([disabled])", text: 'Cancel')- expect(page).to have_selector("#{test_selector('op-datepicker-modal--action')}:not([disabled])", text: 'Save')+ expect(page).to have_css('input[name="startDate"]:not([disabled])')+ expect(page).to have_css('input[name="endDate"]:not([disabled])')+ expect(page).to have_css("#{test_selector('op-datepicker-modal--action')}:not([disabled])", text: 'Cancel')+ expect(page).to have_css("#{test_selector('op-datepicker-modal--action')}:not([disabled])", text: 'Save')endstart_date.cancel_by_click@@ -89,10 +89,10 @@ RSpec.describe 'Manual scheduling', js: true do# Expect not editablestart_date.within_modal do- expect(page).to have_selector('input[name=startDate][disabled]')- expect(page).to have_selector('input[name=endDate][disabled]')- expect(page).to have_selector("#{test_selector('op-datepicker-modal--action')}:not([disabled])", text: 'Cancel')- expect(page).to have_selector("#{test_selector('op-datepicker-modal--action')}:not([disabled])", text: 'Save')+ expect(page).to have_css('input[name=startDate][disabled]')+ expect(page).to have_css('input[name=endDate][disabled]')+ expect(page).to have_css("#{test_selector('op-datepicker-modal--action')}:not([disabled])", text: 'Cancel')+ expect(page).to have_css("#{test_selector('op-datepicker-modal--action')}:not([disabled])", text: 'Save')endstart_date.toggle_scheduling_modediff --git a/spec/features/work_packages/table/switch_types_spec.rb b/spec/features/work_packages/table/switch_types_spec.rbindex 291f9620107..25741bd9ca3 100644--- a/spec/features/work_packages/table/switch_types_spec.rb+++ b/spec/features/work_packages/table/switch_types_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Switching types in work package table', js: true do+RSpec.describe 'Switching types in work package table', :js dolet(:user) { create(:admin) }describe 'switching to required CF' do@@ -131,7 +131,7 @@ RSpec.describe 'Switching types in work package table', js: true domessage: 'Successful update. Click here to open this work package in fullscreen view.')- expect(page).not_to have_selector "#{req_text_field.selector} #{req_text_field.display_selector}"+ expect(page).to have_no_css "#{req_text_field.selector} #{req_text_field.display_selector}"expect { req_text_field.display_element }.to raise_error(Capybara::ElementNotFound)enddiff --git a/spec/features/work_packages/table/work_packages_table_project_include_spec.rb b/spec/features/work_packages/table/work_packages_table_project_include_spec.rbindex 25a7a613283..9a7f7972564 100644--- a/spec/features/work_packages/table/work_packages_table_project_include_spec.rb+++ b/spec/features/work_packages/table/work_packages_table_project_include_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require_relative '../project_include/project_include_shared_examples'-RSpec.describe 'Work package project include', js: true do+RSpec.describe 'Work package project include', :js doshared_let(:enabled_modules) { %w[work_package_tracking] }shared_let(:status) { create(:default_status) }shared_let(:priority) { create(:default_priority) }diff --git a/spec/features/work_packages/tabs/activity_notifications_spec.rb b/spec/features/work_packages/tabs/activity_notifications_spec.rbindex 5108ff3084e..6b215238443 100644--- a/spec/features/work_packages/tabs/activity_notifications_spec.rb+++ b/spec/features/work_packages/tabs/activity_notifications_spec.rb@@ -3,7 +3,7 @@ require 'spec_helper'require 'features/work_packages/work_packages_page'require 'support/edit_fields/edit_field'-RSpec.describe 'Activity tab notifications', js: true, selenium: true do+RSpec.describe 'Activity tab notifications', :js, :selenium doshared_let(:project) { create(:project_with_types, public: true) }shared_let(:work_package) docreate(:work_package,@@ -31,7 +31,7 @@ RSpec.describe 'Activity tab notifications', js: true, selenium: true doit 'shows a notification icon next to activities that have an unread notification' doexpect(page).to have_test_selector('user-activity-bubble', count: 1)- expect(page).to have_selector("[data-qa-activity-number='4'] #{test_selector('user-activity-bubble')}")+ expect(page).to have_css("[data-qa-activity-number='4'] #{test_selector('user-activity-bubble')}")endit 'shows a button to mark the notifications as read' dodiff --git a/spec/features/work_packages/tabs/activity_revisions_spec.rb b/spec/features/work_packages/tabs/activity_revisions_spec.rbindex 8c0a0bd2c96..065fce23759 100644--- a/spec/features/work_packages/tabs/activity_revisions_spec.rb+++ b/spec/features/work_packages/tabs/activity_revisions_spec.rb@@ -3,7 +3,7 @@ require 'spec_helper'require 'features/work_packages/work_packages_page'require 'support/edit_fields/edit_field'-RSpec.describe 'Activity tab', js: true, with_cuprite: true do+RSpec.describe 'Activity tab', :js, :with_cuprite dolet(:project) { create(:project_with_types, public: true) }let(:creation_time) { 5.days.ago }@@ -86,17 +86,17 @@ RSpec.describe 'Activity tab', js: true, with_cuprite: true doactivity = page.find("#activity-#{idx + 1}")if activity.is_a?(Journal) && activity.id != subject_change_journal.id- expect(activity).to have_selector('.user', text: activity.user.name)- expect(activity).to have_selector('.user-comment > .message', text: activity.notes, visible: :all)+ expect(activity).to have_css('.user', text: activity.user.name)+ expect(activity).to have_css('.user-comment > .message', text: activity.notes, visible: :all)elsif activity.is_a?(Changeset)- expect(activity).to have_selector('.user', text: User.find(activity.user_id).name)- expect(activity).to have_selector('.user-comment > .message', text: activity.notes, visible: :all)+ expect(activity).to have_css('.user', text: User.find(activity.user_id).name)+ expect(activity).to have_css('.user-comment > .message', text: activity.notes, visible: :all)elsif activity == subject_change_journal- expect(activity).to have_selector('.work-package-details-activities-messages .message',- count: 2)- expect(activity).to have_selector('.message',- text: "Subject changed from #{initial_subject} " \- "to #{activity.data.subject}")+ expect(activity).to have_css('.work-package-details-activities-messages .message',+ count: 2)+ expect(activity).to have_css('.message',+ text: "Subject changed from #{initial_subject} " \+ "to #{activity.data.subject}")endendend@@ -111,8 +111,8 @@ RSpec.describe 'Activity tab', js: true, with_cuprite: true docontext 'with permission' dolet(:role) docreate(:project_role, permissions: %i[view_work_packages- view_changesets- add_work_package_notes])+ view_changesets+ add_work_package_notes])endlet(:user) docreate(:user,@@ -135,20 +135,20 @@ RSpec.describe 'Activity tab', js: true, with_cuprite: true doendit 'can toggle between activities and comments-only' do- expect(page).to have_selector('.work-package-details-activities-activity-contents', count: 4)- expect(page).to have_selector('.user-comment > .message', text: comment_journal.notes)+ expect(page).to have_css('.work-package-details-activities-activity-contents', count: 4)+ expect(page).to have_css('.user-comment > .message', text: comment_journal.notes)# Show only commentsfind('.activity-comments--toggler').click# It should remove the middle- expect(page).to have_selector('.work-package-details-activities-activity-contents', count: 2)- expect(page).to have_selector('.user-comment > .message', text: initial_comment)- expect(page).to have_selector('.user-comment > .message', text: comment_journal.notes)+ expect(page).to have_css('.work-package-details-activities-activity-contents', count: 2)+ expect(page).to have_css('.user-comment > .message', text: initial_comment)+ expect(page).to have_css('.user-comment > .message', text: comment_journal.notes)# Show all againfind('.activity-comments--toggler').click- expect(page).to have_selector('.work-package-details-activities-activity-contents', count: 4)+ expect(page).to have_css('.work-package-details-activities-activity-contents', count: 4)endit 'can quote a previous comment' do@@ -162,19 +162,19 @@ RSpec.describe 'Activity tab', js: true, with_cuprite: true do# Add our commenteditor = find('.ck-content')- expect(editor).to have_selector('blockquote', text: initial_comment)+ expect(editor).to have_css('blockquote', text: initial_comment)editor.base.send_keys "\nthis is some remark under a quote"field.submit_by_click- expect(page).to have_selector('.user-comment > .message', count: 3)- expect(page).to have_selector('.user-comment > .message blockquote')+ expect(page).to have_css('.user-comment > .message', count: 3)+ expect(page).to have_css('.user-comment > .message blockquote')endit 'can reference a changeset (Regression #30415)' dowork_package_page.visit_tab! 'activity'work_package_page.ensure_page_loaded- expect(page).to have_selector('.user-comment > .message', text: initial_comment)+ expect(page).to have_css('.user-comment > .message', text: initial_comment)comment_field = TextEditorField.new work_package_page,'comment',@@ -207,7 +207,7 @@ RSpec.describe 'Activity tab', js: true, with_cuprite: true doendit 'shows the activities, but does not allow commenting' do- expect(page).not_to have_selector('.work-packages--activity--add-comment', visible: :visible)+ expect(page).to have_no_css('.work-packages--activity--add-comment', visible: :visible)endendenddiff --git a/spec/features/work_packages/tabs/activity_tab_spec.rb b/spec/features/work_packages/tabs/activity_tab_spec.rbindex 272fc987c18..a56ad88a847 100644--- a/spec/features/work_packages/tabs/activity_tab_spec.rb+++ b/spec/features/work_packages/tabs/activity_tab_spec.rb@@ -31,9 +31,7 @@ require 'spec_helper'require 'features/work_packages/work_packages_page'require 'support/edit_fields/edit_field'-RSpec.describe 'Activity tab',- js: true,- with_cuprite: true do+RSpec.describe 'Activity tab', :js, :with_cuprite dolet(:project) docreate(:project_with_types,types: [type_with_cf],@@ -112,16 +110,16 @@ RSpec.describe 'Activity tab',activity = page.find("#activity-#{idx + 1}")if journal.id != subject_change_journal.id- expect(activity).to have_selector('.op-user-activity--user-line', text: journal.user.name)- expect(activity).to have_selector('.user-comment > .message', text: journal.notes, visible: :all)+ expect(activity).to have_css('.op-user-activity--user-line', text: journal.user.name)+ expect(activity).to have_css('.user-comment > .message', text: journal.notes, visible: :all)endif activity == subject_change_journal- expect(activity).to have_selector('.work-package-details-activities-messages .message',- count: 2)- expect(activity).to have_selector('.message',- text: "Subject changed from #{initial_subject} " \- "to #{journal.data.subject}")+ expect(activity).to have_css('.work-package-details-activities-messages .message',+ count: 2)+ expect(activity).to have_css('.message',+ text: "Subject changed from #{initial_subject} " \+ "to #{journal.data.subject}")endendend@@ -131,8 +129,8 @@ RSpec.describe 'Activity tab',before dowork_package_page.visit_tab! 'activity'work_package_page.ensure_page_loaded- expect(page).to have_selector('.user-comment > .message',- text: initial_comment)+ expect(page).to have_css('.user-comment > .message',+ text: initial_comment)endcontext 'with permission' do@@ -160,27 +158,27 @@ RSpec.describe 'Activity tab',visit "/work_packages/#{work_package.id}/activity#activity-#{comment_journal.id}"work_package_page.ensure_page_loaded- expect(page).to have_selector('.user-comment > .message',- text: initial_comment)+ expect(page).to have_css('.user-comment > .message',+ text: initial_comment)expect(page.current_url).to match /\/work_packages\/#{work_package.id}\/activity#activity-#{comment_journal.id}/endit 'can toggle between activities and comments-only' do- expect(page).to have_selector('.work-package-details-activities-activity-contents', count: 3)- expect(page).to have_selector('.user-comment > .message', text: comment_journal.notes)+ expect(page).to have_css('.work-package-details-activities-activity-contents', count: 3)+ expect(page).to have_css('.user-comment > .message', text: comment_journal.notes)# Show only commentsfind('.activity-comments--toggler').click# It should remove the middle- expect(page).to have_selector('.work-package-details-activities-activity-contents', count: 2)- expect(page).to have_selector('.user-comment > .message', text: initial_comment)- expect(page).to have_selector('.user-comment > .message', text: comment_journal.notes)+ expect(page).to have_css('.work-package-details-activities-activity-contents', count: 2)+ expect(page).to have_css('.user-comment > .message', text: initial_comment)+ expect(page).to have_css('.user-comment > .message', text: comment_journal.notes)# Show all againfind('.activity-comments--toggler').click- expect(page).to have_selector('.work-package-details-activities-activity-contents', count: 3)+ expect(page).to have_css('.work-package-details-activities-activity-contents', count: 3)endit 'can quote a previous comment' do@@ -198,8 +196,8 @@ RSpec.describe 'Activity tab',field.input_element.base.send_keys "\nthis is some remark under a quote"field.submit_by_click- expect(page).to have_selector('.user-comment > .message', count: 3)- expect(page).to have_selector('.user-comment > .message blockquote')+ expect(page).to have_css('.user-comment > .message', count: 3)+ expect(page).to have_css('.user-comment > .message blockquote')endit 'can render checkboxes as part of the activity' do@@ -222,7 +220,7 @@ RSpec.describe 'Activity tab',endit 'shows the activities, but does not allow commenting' do- expect(page).not_to have_selector('.work-packages--activity--add-comment', visible: :visible)+ expect(page).to have_no_css('.work-packages--activity--add-comment', visible: :visible)endendenddiff --git a/spec/features/work_packages/tabs/keep_tab_spec.rb b/spec/features/work_packages/tabs/keep_tab_spec.rbindex 34bc2f1f088..d30cd8d60df 100644--- a/spec/features/work_packages/tabs/keep_tab_spec.rb+++ b/spec/features/work_packages/tabs/keep_tab_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Keep current details tab', js: true, selenium: true do+RSpec.describe 'Keep current details tab', :js, :selenium dolet(:user) { create(:admin) }let(:project) { create(:project) }let!(:wp1) { create(:work_package, project:) }diff --git a/spec/features/work_packages/tabs/watcher_tab_spec.rb b/spec/features/work_packages/tabs/watcher_tab_spec.rbindex 0d83ddee749..cfb1aa0e689 100644--- a/spec/features/work_packages/tabs/watcher_tab_spec.rb+++ b/spec/features/work_packages/tabs/watcher_tab_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Watcher tab', js: true, selenium: true do+RSpec.describe 'Watcher tab', :js, :selenium doinclude Components::Autocompleter::NgSelectAutocompleteHelperslet(:project) { create(:project) }@@ -20,14 +20,14 @@ RSpec.describe 'Watcher tab', js: true, selenium: true dodef expect_button_is_watchingtitle = I18n.t('js.label_unwatch_work_package')- expect(page).to have_selector("#unwatch-button[title='#{title}']", wait: 10)- expect(page).to have_selector('#unwatch-button .button--icon.icon-watched', wait: 10)+ expect(page).to have_css("#unwatch-button[title='#{title}']", wait: 10)+ expect(page).to have_css('#unwatch-button .button--icon.icon-watched', wait: 10)enddef expect_button_is_not_watchingtitle = I18n.t('js.label_watch_work_package')- expect(page).to have_selector("#watch-button[title='#{title}']")- expect(page).to have_selector('#watch-button .button--icon.icon-unwatched')+ expect(page).to have_css("#watch-button[title='#{title}']")+ expect(page).to have_css('#watch-button .button--icon.icon-unwatched')endshared_examples 'watch and unwatch with button' do@@ -53,7 +53,7 @@ RSpec.describe 'Watcher tab', js: true, selenium: true dologin_as(user)wp_page.visit_tab! :watchersexpect_angular_frontend_initialized- expect(page).to have_selector('.op-tab-row--link_selected', text: 'WATCHERS')+ expect(page).to have_css('.op-tab-row--link_selected', text: 'WATCHERS')endit 'modifying the watcher list modifies the watch button' do@@ -97,8 +97,8 @@ RSpec.describe 'Watcher tab', js: true, selenium: true doquery: 'foo',results_selector: 'body'- expect(target_dropdown).to have_selector(".ng-option", text: html_user.firstname)- expect(target_dropdown).not_to have_selector(".ng-option em")+ expect(target_dropdown).to have_css(".ng-option", text: html_user.firstname)+ expect(target_dropdown).to have_no_css(".ng-option em")endend@@ -157,8 +157,8 @@ RSpec.describe 'Watcher tab', js: true, selenium: true doquery: '',results_selector: 'body'- expect(target_dropdown).to have_selector(".ng-option", text: user.name)- expect(target_dropdown).not_to have_selector(".ng-option", text: placeholder.name)+ expect(target_dropdown).to have_css(".ng-option", text: user.name)+ expect(target_dropdown).to have_no_css(".ng-option", text: placeholder.name)endendenddiff --git a/spec/features/work_packages/timeline/timeline_dates_spec.rb b/spec/features/work_packages/timeline/timeline_dates_spec.rbindex ffe1d464021..af4edd746d9 100644--- a/spec/features/work_packages/timeline/timeline_dates_spec.rb+++ b/spec/features/work_packages/timeline/timeline_dates_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Work package timeline date formatting',- js: true, selenium: true, with_settings: { date_format: '%Y-%m-%d' } do+RSpec.describe 'Work package timeline date formatting', :js, :selenium, with_settings: { date_format: '%Y-%m-%d' } doshared_let(:type) { create(:type_bug, color: create(:color_green)) }shared_let(:project) { create(:project, types: [type]) }shared_let(:start_date) { Date.parse('2020-12-31') }@@ -151,8 +150,8 @@ RSpec.describe 'Work package timeline date formatting',let(:current_user) { create(:admin) }it 'shows english ISO dates' do- expect(page).to have_selector('.wp-timeline--header-element', text: '01')- expect(page).to have_selector('.wp-timeline--header-element', text: '02')+ expect(page).to have_css('.wp-timeline--header-element', text: '01')+ expect(page).to have_css('.wp-timeline--header-element', text: '02')# The last weekday determines whether there are 52 or 53 weeks# Only if the last day in the year is exactly the day before the day configured to be@@ -165,7 +164,7 @@ RSpec.describe 'Work package timeline date formatting',endexpect(page).to have_css('.wp-timeline--header-element', text: number_of_weeks)- expect(page).not_to have_css('.wp-timeline--header-element', text: number_of_weeks + 1)+ expect(page).to have_no_css('.wp-timeline--header-element', text: number_of_weeks + 1)# expect moment to return week 01 for start date and due dateexpect_date_week work_package.start_date.iso8601, '01'diff --git a/spec/features/work_packages/timeline/timeline_hierarchy_spec.rb b/spec/features/work_packages/timeline/timeline_hierarchy_spec.rbindex 1c89a72de9b..80ced03b791 100644--- a/spec/features/work_packages/timeline/timeline_hierarchy_spec.rb+++ b/spec/features/work_packages/timeline/timeline_hierarchy_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Work package timeline hierarchies', js: true, selenium: true do+RSpec.describe 'Work package timeline hierarchies', :js, :selenium dolet(:user) { create(:admin) }let!(:wp_root) docreate(:work_package,@@ -82,7 +82,7 @@ RSpec.describe 'Work package timeline hierarchies', js: true, selenium: true dowp_timeline.expect_hidden_row(wp_leaf)# Should now have exactly two rows (one in each split view)- expect(page).to have_selector('.wp--row', count: 2)+ expect(page).to have_css('.wp--row', count: 2)endcontext 'with a relation being rendered to a hidden row' dodiff --git a/spec/features/work_packages/timeline/timeline_labels_spec.rb b/spec/features/work_packages/timeline/timeline_labels_spec.rbindex be3f14ddc1e..037a8d6e075 100644--- a/spec/features/work_packages/timeline/timeline_labels_spec.rb+++ b/spec/features/work_packages/timeline/timeline_labels_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Work package timeline labels',- js: true, selenium: true, with_settings: { date_format: '%Y-%m-%d' } do+RSpec.describe 'Work package timeline labels', :js, :selenium, with_settings: { date_format: '%Y-%m-%d' } dolet(:user) { create(:admin) }let(:today) { Time.zone.today }let(:tomorrow) { Time.zone.tomorrow }diff --git a/spec/features/work_packages/timeline/timeline_navigation_spec.rb b/spec/features/work_packages/timeline/timeline_navigation_spec.rbindex fc750adbfbf..3929fb18a3b 100644--- a/spec/features/work_packages/timeline/timeline_navigation_spec.rb+++ b/spec/features/work_packages/timeline/timeline_navigation_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Work package timeline navigation', js: true, selenium: true do+RSpec.describe 'Work package timeline navigation', :js, :selenium dolet(:user) { create(:admin) }let(:project) { create(:project) }let(:query_menu) { Components::WorkPackages::QueryMenu.new }@@ -282,7 +282,7 @@ RSpec.describe 'Work package timeline navigation', js: true, selenium: true dogroup_by.enable_via_menu 'Category'# Expect table to be grouped as WP created above- expect(page).to have_selector('.group--value .count', count: 3)+ expect(page).to have_css('.group--value .count', count: 3)# Expect timeline to have relation between first and second groupwp_timeline.expect_timeline_relation(wp_cat1, wp_cat2)@@ -325,7 +325,7 @@ RSpec.describe 'Work package timeline navigation', js: true, selenium: true do# The button to fold/expand all groups is only present when groupingexpect(page)- .not_to have_button('wp-fold-toggle-button')+ .to have_no_button('wp-fold-toggle-button')group_by.enable_via_menu 'Project'@@ -335,30 +335,30 @@ RSpec.describe 'Work package timeline navigation', js: true, selenium: true do.click# Folding will lead to having milestones presented within the group row- expect(page).to have_selector('.-group-row .timeline-element.milestone')+ expect(page).to have_css('.-group-row .timeline-element.milestone')# Check hover labels (milestone)milestone = find('.timeline-element.milestone')milestone.hover- expect(milestone).to have_selector(".labelHoverLeft.not-empty")- expect(milestone).to have_selector(".labelHoverRight.not-empty", text: milestone_work_package.subject)- expect(milestone).to have_selector(".labelLeft", visible: :hidden)- expect(milestone).to have_selector(".labelRight", visible: :hidden)- expect(milestone).to have_selector(".labelFarRight", visible: :hidden)+ expect(milestone).to have_css(".labelHoverLeft.not-empty")+ expect(milestone).to have_css(".labelHoverRight.not-empty", text: milestone_work_package.subject)+ expect(milestone).to have_css(".labelLeft", visible: :hidden)+ expect(milestone).to have_css(".labelRight", visible: :hidden)+ expect(milestone).to have_css(".labelFarRight", visible: :hidden)# Unfold Group rowsfind('.wp-table--group-header', text: 'My Project No.').find('.expander').click- expect(page).not_to have_selector('.-group-row .timeline-element')+ expect(page).to have_no_css('.-group-row .timeline-element')click_button('wp-fold-toggle-button')click_button(I18n.t('js.button_collapse_all'))# Will again fold all rows so the milestone elements should again be present- expect(page).to have_selector('.-group-row .timeline-element.milestone')+ expect(page).to have_css('.-group-row .timeline-element.milestone')endendenddiff --git a/spec/features/work_packages/work_package_workflow_form_spec.rb b/spec/features/work_packages/work_package_workflow_form_spec.rbindex 2d348c90be0..7fa55e6d174 100644--- a/spec/features/work_packages/work_package_workflow_form_spec.rb+++ b/spec/features/work_packages/work_package_workflow_form_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'require 'features/page_objects/notification'-RSpec.describe 'Work package transitive status workflows', js: true do+RSpec.describe 'Work package transitive status workflows', :js dolet(:dev_role) docreate(:project_role,permissions: %i[view_work_packagesdiff --git a/spec/features/work_packages/work_packages_page.rb b/spec/features/work_packages/work_packages_page.rbindex 8690cdc9e28..ad379239792 100644--- a/spec/features/work_packages/work_packages_page.rb+++ b/spec/features/work_packages/work_packages_page.rb@@ -107,7 +107,7 @@ class WorkPackagesPagedef ensure_index_page_loadedif Capybara.current_driver == Capybara.javascript_driver- expect(page).to have_selector('.work-packages--filters-optional-container.-loaded', visible: :all, wait: 20)+ expect(page).to have_css('.work-packages--filters-optional-container.-loaded', visible: :all, wait: 20)endendenddiff --git a/spec/features/work_packages/zen_mode_spec.rb b/spec/features/work_packages/zen_mode_spec.rbindex abc0a7fe115..99a02e65e5d 100644--- a/spec/features/work_packages/zen_mode_spec.rb+++ b/spec/features/work_packages/zen_mode_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe 'Zen mode', js: true do+RSpec.describe 'Zen mode', :js dolet(:dev_role) docreate(:project_role,permissions: %i[view_work_packagesdiff --git a/spec/features/workflows/missing_for_sharing_wp_spec.rb b/spec/features/workflows/missing_for_sharing_wp_spec.rbindex 50805a69ed7..0af19fb1e91 100644--- a/spec/features/workflows/missing_for_sharing_wp_spec.rb+++ b/spec/features/workflows/missing_for_sharing_wp_spec.rb@@ -82,6 +82,6 @@ RSpec.describe 'Configuring the workflow for work package sharing',assignee: false).count).to eq(1)expect(page)- .not_to have_css('.warning-bar--item')+ .to have_no_css('.warning-bar--item')endenddiff --git a/spec/features/wysiwyg/bold_behavior_spec.rb b/spec/features/wysiwyg/bold_behavior_spec.rbindex 81605aa2e57..21ce519e9de 100644--- a/spec/features/wysiwyg/bold_behavior_spec.rb+++ b/spec/features/wysiwyg/bold_behavior_spec.rb@@ -28,9 +28,7 @@require 'spec_helper'-RSpec.describe 'Wysiwyg bold behavior',- js: true,- with_cuprite: true do+RSpec.describe 'Wysiwyg bold behavior', :js, :with_cuprite docurrent_user { create(:admin) }let(:project) { create(:project, enabled_module_names: %w[wiki]) }@@ -60,13 +58,13 @@ RSpec.describe 'Wysiwyg bold behavior',# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')within('#content') do- expect(page).to have_selector('p') { |node|+ expect(page).to have_css('p') { |node|node.text.include?('some text') && node.text.include?('with bold')}- expect(page).to have_selector('strong', text: 'with bold')+ expect(page).to have_css('strong', text: 'with bold')endendenddiff --git a/spec/features/wysiwyg/custom_css_classes_spec.rb b/spec/features/wysiwyg/custom_css_classes_spec.rbindex 49f77cfedd6..3b94f2db08c 100644--- a/spec/features/wysiwyg/custom_css_classes_spec.rb+++ b/spec/features/wysiwyg/custom_css_classes_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Wysiwyg paragraphs in lists behavior (Regression #28765)',- js: true do+RSpec.describe 'Wysiwyg paragraphs in lists behavior (Regression #28765)', :js dolet(:user) { create(:admin) }let(:project) { create(:project, enabled_module_names: %w[wiki]) }let(:editor) { Components::WysiwygEditor.new }@@ -159,17 +158,17 @@ RSpec.describe 'Wysiwyg paragraphs in lists behavior (Regression #28765)',editor.align_table_by_label(editor, table, 'Align table to the left')# Table figure should now has the proper alignment class- expect(editable).to have_selector('figure.op-uc-figure_align-start')+ expect(editable).to have_css('figure.op-uc-figure_align-start')editor.align_table_by_label(editor, table, 'Align table to the right')# Table figure should now has the proper alignment class- expect(editable).to have_selector('figure.op-uc-figure_align-end')+ expect(editable).to have_css('figure.op-uc-figure_align-end')editor.align_table_by_label(editor, table, 'Center table')# Table figure should now has the proper alignment class- expect(editable).to have_selector('figure.op-uc-figure_align-center')+ expect(editable).to have_css('figure.op-uc-figure_align-center')endendenddiff --git a/spec/features/wysiwyg/html_encoding_spec.rb b/spec/features/wysiwyg/html_encoding_spec.rbindex 7f6a6df1f2f..26c1786d9ec 100644--- a/spec/features/wysiwyg/html_encoding_spec.rb+++ b/spec/features/wysiwyg/html_encoding_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Wysiwyg escaping HTML entities (Regression #28906)',- js: true do+RSpec.describe 'Wysiwyg escaping HTML entities (Regression #28906)', :js dolet(:user) { create(:admin) }let(:project) { create(:project, enabled_module_names: %w[wiki]) }let(:editor) { Components::WysiwygEditor.new }@@ -45,19 +44,19 @@ RSpec.describe 'Wysiwyg escaping HTML entities (Regression #28906)',:enter,'\<u>foo\</u>'- expect(editable).not_to have_selector('node')- expect(editable).not_to have_selector('u')+ expect(editable).to have_no_css('node')+ expect(editable).to have_no_css('u')end# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')within('#content') do- expect(page).to have_selector('p', text: '<node foo="bar" />')- expect(page).not_to have_selector('u')- expect(page).not_to have_selector('node')+ expect(page).to have_css('p', text: '<node foo="bar" />')+ expect(page).to have_no_css('u')+ expect(page).to have_no_css('node')endtext = WikiPage.last.textdiff --git a/spec/features/wysiwyg/linking_spec.rb b/spec/features/wysiwyg/linking_spec.rbindex de88c8ebef8..4d8265091e8 100644--- a/spec/features/wysiwyg/linking_spec.rb+++ b/spec/features/wysiwyg/linking_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Wysiwyg linking',- js: true do+RSpec.describe 'Wysiwyg linking', :js dolet(:user) { create(:admin) }let(:project) { create(:project, enabled_module_names: %w[wiki work_package_tracking]) }let(:editor) { Components::WysiwygEditor.new }@@ -50,7 +49,7 @@ RSpec.describe 'Wysiwyg linking',# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')wiki_page = project.wiki.pages.first.reload@@ -58,7 +57,7 @@ RSpec.describe 'Wysiwyg linking',"[http://example.org/link with spaces](http://example.org/link%20with%20spaces)")- expect(page).to have_selector('a[href="http://example.org/link%20with%20spaces"]')+ expect(page).to have_css('a[href="http://example.org/link%20with%20spaces"]')endendenddiff --git a/spec/features/wysiwyg/macros/attribute_macros_spec.rb b/spec/features/wysiwyg/macros/attribute_macros_spec.rbindex 081896efe5c..0a054b9f4e5 100644--- a/spec/features/wysiwyg/macros/attribute_macros_spec.rb+++ b/spec/features/wysiwyg/macros/attribute_macros_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Wysiwyg attribute macros', js: true do+RSpec.describe 'Wysiwyg attribute macros', :js doshared_let(:admin) { create(:admin) }let(:user) { admin }let!(:project) { create(:project, identifier: 'some-project', enabled_module_names: %w[wiki work_package_tracking]) }@@ -81,24 +81,24 @@ RSpec.describe 'Wysiwyg attribute macros', js: true doclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')# Expect output widgetwithin('#content') do- expect(page).to have_selector('td', text: 'Subject')- expect(page).to have_selector('td', text: 'Foo Bar')- expect(page).to have_selector('td', text: 'Identifier')- expect(page).to have_selector('td', text: 'some-project')+ expect(page).to have_css('td', text: 'Subject')+ expect(page).to have_css('td', text: 'Foo Bar')+ expect(page).to have_css('td', text: 'Identifier')+ expect(page).to have_css('td', text: 'some-project')- expect(page).to have_selector('td', text: 'invalid subject Cannot expand macro: Requested resource could not be found')- expect(page).to have_selector('td', text: 'invalid project Cannot expand macro: Requested resource could not be found')+ expect(page).to have_css('td', text: 'invalid subject Cannot expand macro: Requested resource could not be found')+ expect(page).to have_css('td', text: 'invalid project Cannot expand macro: Requested resource could not be found')end# Edit page againclick_on 'Edit'editor.in_editor do |container,|- expect(container).to have_selector('tbody td', count: 6)+ expect(container).to have_css('tbody td', count: 6)endend@@ -134,10 +134,10 @@ RSpec.describe 'Wysiwyg attribute macros', js: true doclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')within('#content') do- expect(page).to have_selector('.custom-option', count: 6)+ expect(page).to have_css('.custom-option', count: 6)endendenddiff --git a/spec/features/wysiwyg/macros/child_pages_spec.rb b/spec/features/wysiwyg/macros/child_pages_spec.rbindex 5930b90a0fa..e3b0fcc56fd 100644--- a/spec/features/wysiwyg/macros/child_pages_spec.rb+++ b/spec/features/wysiwyg/macros/child_pages_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Wysiwyg child pages spec',- js: true do+RSpec.describe 'Wysiwyg child pages spec', :js dolet(:project) docreate(:project,enabled_module_names: %w[wiki])@@ -67,9 +66,6 @@ RSpec.describe 'Wysiwyg child pages spec',child_page.parent = parent_pagechild_page.save!project.wiki.save!- end-- before dologin_as(user)end@@ -81,7 +77,7 @@ RSpec.describe 'Wysiwyg child pages spec',it 'can add and edit an child pages widget' doeditor.in_editor do |_container, editable|- expect(editable).to have_selector('h1', text: 'My page')+ expect(editable).to have_css('h1', text: 'My page')editor.insert_macro 'Links to child pages'@@ -90,19 +86,19 @@ RSpec.describe 'Wysiwyg child pages spec',# Placeholder states `this page` and no `Include parent`expect(placeholder).to have_text('this page')- expect(placeholder).not_to have_text('Include parent')+ expect(placeholder).to have_no_text('Include parent')# Edit widget and cancel againplaceholder.clickpage.find('.ck-balloon-panel .ck-button', visible: :all, text: 'Edit').click- expect(page).to have_selector('.spot-modal')+ expect(page).to have_css('.spot-modal')expect(page).to have_field('selected-page', with: '')find('.spot-modal--cancel-button').click# Edit widget and saveplaceholder.clickpage.find('.ck-balloon-panel .ck-button', visible: :all, text: 'Edit').click- expect(page).to have_selector('.spot-modal')+ expect(page).to have_css('.spot-modal')fill_in 'selected-page', with: 'parent-page'# Save widget@@ -110,19 +106,19 @@ RSpec.describe 'Wysiwyg child pages spec',# Placeholder states `parent-page` and no `Include parent`expect(placeholder).to have_text('parent-page')- expect(placeholder).not_to have_text('Include parent')+ expect(placeholder).to have_no_text('Include parent')end# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')within('#content') do- expect(page).to have_selector('.pages-hierarchy')- expect(page).to have_selector('.pages-hierarchy', text: 'Child page')- expect(page).not_to have_selector('.pages-hierarchy', text: 'Parent page')- expect(page).to have_selector('h1', text: 'My page')+ expect(page).to have_css('.pages-hierarchy')+ expect(page).to have_css('.pages-hierarchy', text: 'Child page')+ expect(page).to have_no_css('.pages-hierarchy', text: 'Parent page')+ expect(page).to have_css('h1', text: 'My page')SeleniumHubWaiter.waitfind('.toolbar .icon-edit').click@@ -135,7 +131,7 @@ RSpec.describe 'Wysiwyg child pages spec',# Edit widget and saveplaceholder.clickpage.find('.ck-balloon-panel .ck-button', visible: :all, text: 'Edit').click- expect(page).to have_selector('.spot-modal')+ expect(page).to have_css('.spot-modal')page.check 'include-parent'# Save widget@@ -149,13 +145,13 @@ RSpec.describe 'Wysiwyg child pages spec',# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')within('#content') do- expect(page).to have_selector('.pages-hierarchy')- expect(page).to have_selector('.pages-hierarchy', text: 'Child page')- expect(page).to have_selector('.pages-hierarchy', text: 'Parent page')- expect(page).to have_selector('h1', text: 'My page')+ expect(page).to have_css('.pages-hierarchy')+ expect(page).to have_css('.pages-hierarchy', text: 'Child page')+ expect(page).to have_css('.pages-hierarchy', text: 'Parent page')+ expect(page).to have_css('h1', text: 'My page')SeleniumHubWaiter.waitfind('.toolbar .icon-edit').clickdiff --git a/spec/features/wysiwyg/macros/code_block_macro_spec.rb b/spec/features/wysiwyg/macros/code_block_macro_spec.rbindex bf4bc0bda39..3decdad4dbd 100644--- a/spec/features/wysiwyg/macros/code_block_macro_spec.rb+++ b/spec/features/wysiwyg/macros/code_block_macro_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Wysiwyg code block macro',- js: true do+RSpec.describe 'Wysiwyg code block macro', :js doshared_let(:admin) { create(:admin) }let(:user) { admin }let(:project) { create(:project, enabled_module_names: %w[wiki]) }@@ -66,20 +65,20 @@ RSpec.describe 'Wysiwyg code block macro',editor.set_markdown expected# Expect first macro saved to editor- expect(container).to have_selector('.op-uc-code-block', text: snippet)- expect(container).to have_selector('.op-uc-code-block--language', text: 'ruby')+ expect(container).to have_css('.op-uc-code-block', text: snippet)+ expect(container).to have_css('.op-uc-code-block--language', text: 'ruby')editor.set_markdown "#{expected}\n#{expected}"- expect(container).to have_selector('.op-uc-code-block', text: snippet, count: 2)- expect(container).to have_selector('.op-uc-code-block--language', text: 'ruby', count: 2)+ expect(container).to have_css('.op-uc-code-block', text: snippet, count: 2)+ expect(container).to have_css('.op-uc-code-block--language', text: 'ruby', count: 2)endclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')# Expect output widgetwithin('#content') do- expect(page).to have_selector('pre.highlight-ruby', count: 2)+ expect(page).to have_css('pre.highlight-ruby', count: 2)endSeleniumHubWaiter.wait@@ -88,8 +87,8 @@ RSpec.describe 'Wysiwyg code block macro',# SeleniumHubWaiter.waiteditor.in_editor do |container,|- expect(container).to have_selector('.op-uc-code-block', text: snippet, count: 2)- expect(container).to have_selector('.op-uc-code-block--language', text: 'ruby', count: 2)+ expect(container).to have_css('.op-uc-code-block', text: snippet, count: 2)+ expect(container).to have_css('.op-uc-code-block--language', text: 'ruby', count: 2)endend@@ -97,17 +96,17 @@ RSpec.describe 'Wysiwyg code block macro',editor.in_editor do |container,|editor.click_toolbar_button 'Insert code snippet'- expect(page).to have_selector('.spot-modal')+ expect(page).to have_css('.spot-modal')# CM wraps an accessor to the editor instance on the outer containercm = page.find('.CodeMirror')page.execute_script('arguments[0].CodeMirror.setValue(arguments[1]);', cm.native, 'asdf')find('.spot-modal--submit-button').click- expect(container).to have_selector('.op-uc-code-block', text: 'asdf')+ expect(container).to have_css('.op-uc-code-block', text: 'asdf')click_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')wp = WikiPage.lastexpect(wp.text.gsub("\r\n", "\n")).to eq("```text\nasdf\n```")@@ -116,11 +115,11 @@ RSpec.describe 'Wysiwyg code block macro',click_on 'Edit'editor.in_editor do |container,|- expect(container).to have_selector('.op-uc-code-block', text: 'asdf')+ expect(container).to have_css('.op-uc-code-block', text: 'asdf')endclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')wp.reload# Regression added two newlines before fence here@@ -132,7 +131,7 @@ RSpec.describe 'Wysiwyg code block macro',editor.in_editor do |container,|editor.click_toolbar_button 'Insert code snippet'- expect(page).to have_selector('.spot-modal')+ expect(page).to have_css('.spot-modal')# CM wraps an accessor to the editor instance on the outer containercm = page.find('.CodeMirror')@@ -141,20 +140,20 @@ RSpec.describe 'Wysiwyg code block macro',fill_in 'selected-language', with: 'ruby'# Expect some highlighting classes- expect(page).to have_selector('.cm-keyword', text: 'def')- expect(page).to have_selector('.cm-def', text: 'foobar')+ expect(page).to have_css('.cm-keyword', text: 'def')+ expect(page).to have_css('.cm-def', text: 'foobar')find('.spot-modal--submit-button').click# Expect macro saved to editor- expect(container).to have_selector('.op-uc-code-block', text: snippet)- expect(container).to have_selector('.op-uc-code-block--language', text: 'ruby')+ expect(container).to have_css('.op-uc-code-block', text: snippet)+ expect(container).to have_css('.op-uc-code-block--language', text: 'ruby')end# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')wiki_page = project.wiki.find_page('wiki')text = wiki_page.text.gsub(/\r\n?/, "\n")@@ -162,7 +161,7 @@ RSpec.describe 'Wysiwyg code block macro',# Expect output widgetwithin('#content') do- expect(page).to have_selector('pre.highlight-ruby')+ expect(page).to have_css('pre.highlight-ruby')end# Edit page again, expect widget@@ -170,16 +169,16 @@ RSpec.describe 'Wysiwyg code block macro',click_on 'Edit'editor.in_editor do |container,|- expect(container).to have_selector('.op-uc-code-block', text: snippet)- expect(container).to have_selector('.op-uc-code-block--language', text: 'ruby')+ expect(container).to have_css('.op-uc-code-block', text: snippet)+ expect(container).to have_css('.op-uc-code-block--language', text: 'ruby')widget = container.find('.op-uc-code-block')page.driver.browser.action.double_click(widget.native).perform- expect(page).to have_selector('.spot-modal')+ expect(page).to have_css('.spot-modal')- expect(page).to have_selector('.op-uc-code-block--language', text: 'ruby')- expect(page).to have_selector('.cm-keyword', text: 'def')- expect(page).to have_selector('.cm-def', text: 'foobar')+ expect(page).to have_css('.op-uc-code-block--language', text: 'ruby')+ expect(page).to have_css('.cm-keyword', text: 'def')+ expect(page).to have_css('.cm-def', text: 'foobar')endendenddiff --git a/spec/features/wysiwyg/macros/embedded_tables_spec.rb b/spec/features/wysiwyg/macros/embedded_tables_spec.rbindex f3fd8c0db4c..f02d503dad4 100644--- a/spec/features/wysiwyg/macros/embedded_tables_spec.rb+++ b/spec/features/wysiwyg/macros/embedded_tables_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Wysiwyg embedded work package tables',- js: true do+RSpec.describe 'Wysiwyg embedded work package tables', :js doshared_let(:admin) { create(:admin) }shared_let(:type_task) { create(:type_task) }shared_let(:type_bug) { create(:type_bug) }@@ -106,7 +105,7 @@ RSpec.describe 'Wysiwyg embedded work package tables',# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')embedded_table = Pages::EmbeddedWorkPackagesTable.new find('.wiki-content')embedded_table.expect_work_package_listed wp_task@@ -142,7 +141,7 @@ RSpec.describe 'Wysiwyg embedded work package tables',# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')# Embedded querieswikipage = project.wiki.pages.last@@ -167,7 +166,7 @@ RSpec.describe 'Wysiwyg embedded work package tables',# Subproject filter is gonefilters.expect_filter_count 2- expect(page).not_to have_text 'Subproject'+ expect(page).to have_no_text 'Subproject'endendenddiff --git a/spec/features/wysiwyg/macros/quicklink_macros_spec.rb b/spec/features/wysiwyg/macros/quicklink_macros_spec.rbindex 257b5d4e590..58919f33de3 100644--- a/spec/features/wysiwyg/macros/quicklink_macros_spec.rb+++ b/spec/features/wysiwyg/macros/quicklink_macros_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-RSpec.describe 'Wysiwyg work package quicklink macros', js: true do+RSpec.describe 'Wysiwyg work package quicklink macros', :js doshared_let(:user) { create(:admin) }shared_let(:project) { create(:project_with_types) }let(:work_package) do@@ -53,14 +53,14 @@ RSpec.describe 'Wysiwyg work package quicklink macros', js: true do# Expect output widgetwithin('#content') doexpect(page).to have_link("##{work_package.id}")- expect(page).not_to have_selector('.work-package--quickinfo.preview-trigger')+ expect(page).to have_no_css('.work-package--quickinfo.preview-trigger')end# Edit page againclick_on 'Edit'editor.in_editor do |container,|- expect(container).to have_selector('p', text: "##{work_package.id}")+ expect(container).to have_css('p', text: "##{work_package.id}")endend@@ -71,17 +71,17 @@ RSpec.describe 'Wysiwyg work package quicklink macros', js: true do# Expect output widgetwithin('#content') doexpected_macro_text = "#{work_package.type.name.upcase} ##{work_package.id}: My subject"- expect(page).to have_selector('opce-macro-wp-quickinfo', text: expected_macro_text)- expect(page).to have_selector('span', text: work_package.type.name.upcase)- expect(page).to have_selector('.work-package--quickinfo.preview-trigger', text: "##{work_package.id}")- expect(page).to have_selector('span', text: 'My subject')+ expect(page).to have_css('opce-macro-wp-quickinfo', text: expected_macro_text)+ expect(page).to have_css('span', text: work_package.type.name.upcase)+ expect(page).to have_css('.work-package--quickinfo.preview-trigger', text: "##{work_package.id}")+ expect(page).to have_css('span', text: 'My subject')end# Edit page againclick_on 'Edit'editor.in_editor do |container,|- expect(container).to have_selector('p', text: "###{work_package.id}")+ expect(container).to have_css('p', text: "###{work_package.id}")endend@@ -93,21 +93,21 @@ RSpec.describe 'Wysiwyg work package quicklink macros', js: true dowithin('#content') doexpected_macro_text = "#{work_package.status.name}#{work_package.type.name.upcase} " \"##{work_package.id}: My subject (01/01/2020 - 02/01/2020)"- expect(page).to have_selector('opce-macro-wp-quickinfo', text: expected_macro_text)- expect(page).to have_selector('span', text: work_package.status.name)- expect(page).to have_selector('span', text: work_package.type.name.upcase)- expect(page).to have_selector('.work-package--quickinfo.preview-trigger', text: "##{work_package.id}")- expect(page).to have_selector('span', text: 'My subject')+ expect(page).to have_css('opce-macro-wp-quickinfo', text: expected_macro_text)+ expect(page).to have_css('span', text: work_package.status.name)+ expect(page).to have_css('span', text: work_package.type.name.upcase)+ expect(page).to have_css('.work-package--quickinfo.preview-trigger', text: "##{work_package.id}")+ expect(page).to have_css('span', text: 'My subject')# Dates are being rendered in two nested spans- expect(page).to have_selector('span', text: '01/01/2020', count: 2)- expect(page).to have_selector('span', text: '02/01/2020', count: 2)+ expect(page).to have_css('span', text: '01/01/2020', count: 2)+ expect(page).to have_css('span', text: '02/01/2020', count: 2)end# Edit page againclick_on 'Edit'editor.in_editor do |container,|- expect(container).to have_selector('p', text: "####{work_package.id}")+ expect(container).to have_css('p', text: "####{work_package.id}")endend@@ -162,12 +162,12 @@ RSpec.describe 'Wysiwyg work package quicklink macros', js: true doclick_on 'Save'within('#content') do- expect(page).to have_selector('opce-macro-wp-quickinfo', text: /No dates$/)- expect(page).to have_selector('opce-macro-wp-quickinfo', text: 'Start date only (01/01/2020 - no finish date)')- expect(page).to have_selector('opce-macro-wp-quickinfo', text: 'End date only (no start date - 12/31/2020)')- expect(page).to have_selector('opce-macro-wp-quickinfo', text: 'Both dates (01/01/2020 - 12/31/2020)')- expect(page).to have_selector('opce-macro-wp-quickinfo', text: 'Milestone with date (01/01/2020)')- expect(page).to have_selector('opce-macro-wp-quickinfo', text: /Milestone without date$/)+ expect(page).to have_css('opce-macro-wp-quickinfo', text: /No dates$/)+ expect(page).to have_css('opce-macro-wp-quickinfo', text: 'Start date only (01/01/2020 - no finish date)')+ expect(page).to have_css('opce-macro-wp-quickinfo', text: 'End date only (no start date - 12/31/2020)')+ expect(page).to have_css('opce-macro-wp-quickinfo', text: 'Both dates (01/01/2020 - 12/31/2020)')+ expect(page).to have_css('opce-macro-wp-quickinfo', text: 'Milestone with date (01/01/2020)')+ expect(page).to have_css('opce-macro-wp-quickinfo', text: /Milestone without date$/)endendenddiff --git a/spec/features/wysiwyg/macros/work_package_button_spec.rb b/spec/features/wysiwyg/macros/work_package_button_spec.rbindex 883eee52244..d8d601041d7 100644--- a/spec/features/wysiwyg/macros/work_package_button_spec.rb+++ b/spec/features/wysiwyg/macros/work_package_button_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Wysiwyg work package button spec',- js: true do+RSpec.describe 'Wysiwyg work package button spec', :js doshared_let(:admin) { create(:admin) }let(:user) { admin }@@ -58,12 +57,12 @@ RSpec.describe 'Wysiwyg work package button spec',editor.in_editor do |_container, editable|editor.insert_macro 'Insert create work package button'- expect(page).to have_selector('.spot-modal')+ expect(page).to have_css('.spot-modal')select 'MyTaskName', from: 'selected-type'# Cancel editingfind('.spot-modal--cancel-button').click- expect(editable).not_to have_selector('.macro.-create_work_package_link')+ expect(editable).to have_no_css('.macro.-create_work_package_link')editor.insert_macro 'Insert create work package button'select 'MyTaskName', from: 'selected-type'@@ -86,10 +85,10 @@ RSpec.describe 'Wysiwyg work package button spec',# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')within('#content') do- expect(page).to have_selector("a[href=\"/projects/my-project/work_packages/new?type=#{type.id}\"]")+ expect(page).to have_css("a[href=\"/projects/my-project/work_packages/new?type=#{type.id}\"]")endendenddiff --git a/spec/features/wysiwyg/mentions_spec.rb b/spec/features/wysiwyg/mentions_spec.rbindex 478dadfcba4..4836f3617c0 100644--- a/spec/features/wysiwyg/mentions_spec.rb+++ b/spec/features/wysiwyg/mentions_spec.rb@@ -164,7 +164,7 @@ RSpec.describe 'Wysiwyg work package mentions',comment_field.input_element.send_keys("@Richard Hendricks")page.driver.wait_for_reloadexpect(page)- .not_to have_css(".mention-list-item", text: work_package_viewer.name)+ .to have_no_css(".mention-list-item", text: work_package_viewer.name)comment_field.cancel_by_click# Mentioning a group worksdiff --git a/spec/features/wysiwyg/paragraphs_in_lists_spec.rb b/spec/features/wysiwyg/paragraphs_in_lists_spec.rbindex c85a039312c..d808753f6aa 100644--- a/spec/features/wysiwyg/paragraphs_in_lists_spec.rb+++ b/spec/features/wysiwyg/paragraphs_in_lists_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Wysiwyg paragraphs in lists behavior (Regression #28765)',- js: true do+RSpec.describe 'Wysiwyg paragraphs in lists behavior (Regression #28765)', :js dolet(:user) { create(:admin) }let(:project) { create(:project, enabled_module_names: %w[wiki]) }let(:editor) { Components::WysiwygEditor.new }@@ -60,8 +59,8 @@ RSpec.describe 'Wysiwyg paragraphs in lists behavior (Regression #28765)',it 'shows the list correctly' doeditor.in_editor do |_container, editable|- expect(editable).to have_selector('ol li', count: 3)- expect(editable).not_to have_selector('ol li p')+ expect(editable).to have_css('ol li', count: 3)+ expect(editable).to have_no_css('ol li p')endendenddiff --git a/spec/features/wysiwyg/tables_spec.rb b/spec/features/wysiwyg/tables_spec.rbindex 3dadfd52bd5..1dd848d0af6 100644--- a/spec/features/wysiwyg/tables_spec.rb+++ b/spec/features/wysiwyg/tables_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Wysiwyg tables',- js: true do+RSpec.describe 'Wysiwyg tables', :js doshared_let(:admin) { create(:admin) }let(:user) { admin }@@ -68,13 +67,13 @@ RSpec.describe 'Wysiwyg tables',# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')within('#content') do- expect(page).to have_selector('table td', text: 'h1')- expect(page).to have_selector('table td', text: 'h&2')- expect(page).to have_selector('table td', text: 'c1')- expect(page).to have_selector('table td', text: 'c&2')+ expect(page).to have_css('table td', text: 'h1')+ expect(page).to have_css('table td', text: 'h&2')+ expect(page).to have_css('table td', text: 'c1')+ expect(page).to have_css('table td', text: 'c&2')endend@@ -107,23 +106,23 @@ RSpec.describe 'Wysiwyg tables',header_button.find('.ck-button__toggle').click# Table should now have header- expect(editable).to have_selector('th', count: 2)- expect(editable).to have_selector('td', count: 2)- expect(editable).to have_selector('th', text: 'h1')- expect(editable).to have_selector('th', text: 'h2')- expect(editable).to have_selector('td', text: 'a')+ expect(editable).to have_css('th', count: 2)+ expect(editable).to have_css('td', count: 2)+ expect(editable).to have_css('th', text: 'h1')+ expect(editable).to have_css('th', text: 'h2')+ expect(editable).to have_css('td', text: 'a')end# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')within('#content') do- expect(page).to have_selector('table th', text: 'h1')- expect(page).to have_selector('table th', text: 'h2')- expect(page).to have_selector('table td', count: 2)- expect(page).to have_selector('td', text: 'a')+ expect(page).to have_css('table th', text: 'h1')+ expect(page).to have_css('table th', text: 'h2')+ expect(page).to have_css('table td', count: 2)+ expect(page).to have_css('td', text: 'a')endSeleniumHubWaiter.wait@@ -132,11 +131,11 @@ RSpec.describe 'Wysiwyg tables',editor.in_editor do |_container, editable|# Table should still have header- expect(editable).to have_selector('th', count: 2)- expect(editable).to have_selector('td', count: 2)- expect(editable).to have_selector('th', text: 'h1')- expect(editable).to have_selector('th', text: 'h2')- expect(editable).to have_selector('td', text: 'a')+ expect(editable).to have_css('th', count: 2)+ expect(editable).to have_css('td', count: 2)+ expect(editable).to have_css('th', text: 'h1')+ expect(editable).to have_css('th', text: 'h2')+ expect(editable).to have_css('td', text: 'a')endend@@ -165,7 +164,7 @@ RSpec.describe 'Wysiwyg tables',editor.click_hover_toolbar_button 'Cell properties'# Enable header row- expect(page).to have_selector('.ck-input-color input', count: 2)+ expect(page).to have_css('.ck-input-color input', count: 2)# Pick the latter one, it's the background colorpage.all('.ck-input-color input').last.set '#123456'# Set vertical center / horizontal top@@ -174,20 +173,20 @@ RSpec.describe 'Wysiwyg tables',find('.ck-button-save').click# Table should now have header- expect(editable).to have_selector('td[style*="background-color:#123456"]')- expect(editable).to have_selector('td[style*="text-align:center"]')- expect(editable).to have_selector('td[style*="vertical-align:top"]')+ expect(editable).to have_css('td[style*="background-color:#123456"]')+ expect(editable).to have_css('td[style*="text-align:center"]')+ expect(editable).to have_css('td[style*="vertical-align:top"]')end# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')within('#content') do- expect(page).to have_selector('td[style*="background-color:#123456"]')- expect(page).to have_selector('td[style*="text-align:center"]')- expect(page).to have_selector('td[style*="vertical-align:top"]')+ expect(page).to have_css('td[style*="background-color:#123456"]')+ expect(page).to have_css('td[style*="text-align:center"]')+ expect(page).to have_css('td[style*="vertical-align:top"]')endSeleniumHubWaiter.wait@@ -195,7 +194,7 @@ RSpec.describe 'Wysiwyg tables',click_on 'Edit'editor.in_editor do |_container, editable|- expect(editable).to have_selector('td[style*="background-color:#123456"]')+ expect(editable).to have_css('td[style*="background-color:#123456"]')# Change table stylestds = editable.all('.op-uc-table .op-uc-table--cell')@@ -221,29 +220,29 @@ RSpec.describe 'Wysiwyg tables',find('.ck-button-save').click# table height and width is set on figure- expect(editable).to have_selector('figure[style*="width:500px"]')- expect(editable).to have_selector('figure[style*="height:500px"]')+ expect(editable).to have_css('figure[style*="width:500px"]')+ expect(editable).to have_css('figure[style*="height:500px"]')# rest is set on table- expect(editable).to have_selector('table[style*="background-color:red"]')- expect(editable).to have_selector('table[style*="border-style:dotted"]')- expect(editable).to have_selector('table[style*="border-width:10px"]')+ expect(editable).to have_css('table[style*="background-color:red"]')+ expect(editable).to have_css('table[style*="border-style:dotted"]')+ expect(editable).to have_css('table[style*="border-width:10px"]')end# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')within('#content') do# table height and width is set on figure- expect(page).to have_selector('figure[style*="width:500px"]')- expect(page).to have_selector('figure[style*="height:500px"]')+ expect(page).to have_css('figure[style*="width:500px"]')+ expect(page).to have_css('figure[style*="height:500px"]')# rest is set on table- expect(page).to have_selector('table[style*="background-color:red"]')- expect(page).to have_selector('table[style*="border-style:dotted"]')- expect(page).to have_selector('table[style*="border-width:10px"]')+ expect(page).to have_css('table[style*="background-color:red"]')+ expect(page).to have_css('table[style*="border-style:dotted"]')+ expect(page).to have_css('table[style*="border-width:10px"]')end# Edit again@@ -251,16 +250,16 @@ RSpec.describe 'Wysiwyg tables',# Expect all previous changes to be thereeditor.in_editor do |_container, editable|- expect(editable).to have_selector('td[style*="background-color:#123456"]')+ expect(editable).to have_css('td[style*="background-color:#123456"]')# table height and width is set on figure- expect(editable).to have_selector('figure[style*="width:500px"]')- expect(editable).to have_selector('figure[style*="height:500px"]')+ expect(editable).to have_css('figure[style*="width:500px"]')+ expect(editable).to have_css('figure[style*="height:500px"]')# rest is set on table- expect(editable).to have_selector('table[style*="background-color:red"]')- expect(editable).to have_selector('table[style*="border-style:dotted"]')- expect(editable).to have_selector('table[style*="border-width:10px"]')+ expect(editable).to have_css('table[style*="background-color:red"]')+ expect(editable).to have_css('table[style*="border-style:dotted"]')+ expect(editable).to have_css('table[style*="border-width:10px"]')endend@@ -292,16 +291,16 @@ RSpec.describe 'Wysiwyg tables',find('.ck-table-form__dimensions-row__width input').set '250px'find('.ck-button-save').click- expect(editable).to have_selector('td[style*="width:250px"]')+ expect(editable).to have_css('td[style*="width:250px"]')end# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')within('#content') do- expect(page).to have_selector('td[style*="width:250px"]')+ expect(page).to have_css('td[style*="width:250px"]')endSeleniumHubWaiter.wait@@ -309,7 +308,7 @@ RSpec.describe 'Wysiwyg tables',click_on 'Edit'editor.in_editor do |_container, editable|- expect(editable).to have_selector('td[style*="width:250px"]')+ expect(editable).to have_css('td[style*="width:250px"]')endendend@@ -354,14 +353,14 @@ RSpec.describe 'Wysiwyg tables',it 'can show the table with header' dowithin('#content') do- expect(page).to have_selector('h2', text: 'This is markdown')-- expect(page).to have_selector('table thead th', text: 'A')- expect(page).to have_selector('table thead th', text: 'B')- expect(page).to have_selector('table td', text: 'c1')- expect(page).to have_selector('table td', text: 'c2')- expect(page).to have_selector('table td', text: 'c3')- expect(page).to have_selector('table td', text: 'c4')+ expect(page).to have_css('h2', text: 'This is markdown')++ expect(page).to have_css('table thead th', text: 'A')+ expect(page).to have_css('table thead th', text: 'B')+ expect(page).to have_css('table td', text: 'c1')+ expect(page).to have_css('table td', text: 'c2')+ expect(page).to have_css('table td', text: 'c3')+ expect(page).to have_css('table td', text: 'c4')end# Edit the table@@ -369,14 +368,14 @@ RSpec.describe 'Wysiwyg tables',# Expect wysiwyg to render tableeditor.in_editor do |_, editable|- expect(editable).to have_selector('h2', text: 'This is markdown')-- expect(editable).to have_selector('table thead th', text: 'A')- expect(editable).to have_selector('table thead th', text: 'B')- expect(editable).to have_selector('table td', text: 'c1')- expect(editable).to have_selector('table td', text: 'c2')- expect(editable).to have_selector('table td', text: 'c3')- expect(editable).to have_selector('table td', text: 'c4')+ expect(editable).to have_css('h2', text: 'This is markdown')++ expect(editable).to have_css('table thead th', text: 'A')+ expect(editable).to have_css('table thead th', text: 'B')+ expect(editable).to have_css('table td', text: 'c1')+ expect(editable).to have_css('table td', text: 'c2')+ expect(editable).to have_css('table td', text: 'c3')+ expect(editable).to have_css('table td', text: 'c4')endendenddiff --git a/spec/features/wysiwyg/ui_localization_spec.rb b/spec/features/wysiwyg/ui_localization_spec.rbindex 81ea32ff47d..1c0756ad0e7 100644--- a/spec/features/wysiwyg/ui_localization_spec.rb+++ b/spec/features/wysiwyg/ui_localization_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'WYSIWYG UI localization',- js: true do+RSpec.describe 'WYSIWYG UI localization', :js dolet(:user) { create(:admin, language:) }let(:project) { create(:project, enabled_module_names: %w[wiki]) }let(:editor) { Components::WysiwygEditor.new }@@ -57,7 +56,7 @@ RSpec.describe 'WYSIWYG UI localization',let(:language) { :de }it 'renders the UI in German' do- expect(page).to have_selector('.ck-button__label', text: 'Absatz')+ expect(page).to have_css('.ck-button__label', text: 'Absatz')endend@@ -65,7 +64,7 @@ RSpec.describe 'WYSIWYG UI localization',let(:language) { :en }it 'renders the UI in English' do- expect(page).to have_selector('.ck-button__label', text: 'Paragraph')+ expect(page).to have_css('.ck-button__label', text: 'Paragraph')endendenddiff --git a/spec/features/wysiwyg/work_package_linking_spec.rb b/spec/features/wysiwyg/work_package_linking_spec.rbindex dbe7c7b06d6..97bbc66084d 100644--- a/spec/features/wysiwyg/work_package_linking_spec.rb+++ b/spec/features/wysiwyg/work_package_linking_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe 'Wysiwyg work package linking',- js: true do+RSpec.describe 'Wysiwyg work package linking', :js dolet(:user) { create(:admin) }let(:project) { create(:project, enabled_module_names: %w[wiki work_package_tracking]) }let(:work_package) { create(:work_package, subject: 'Foobar', project:) }@@ -49,15 +48,15 @@ RSpec.describe 'Wysiwyg work package linking',editor.click_and_type_slowly "##{work_package.id}"editor.click_autocomplete work_package.subject- expect(editor.editor_element).to have_selector('a.mention', text: "##{work_package.id}")+ expect(editor.editor_element).to have_css('a.mention', text: "##{work_package.id}")# Save wiki pageclick_on 'Save'- expect(page).to have_selector('.op-toast.-success')+ expect(page).to have_css('.op-toast.-success')within('#content') do- expect(page).to have_selector('a.issue', count: 1)+ expect(page).to have_css('a.issue', count: 1)endendenddiff --git a/spec/helpers/no_results_helper_spec.rb b/spec/helpers/no_results_helper_spec.rbindex 1da830ea739..e26b8f23040 100644--- a/spec/helpers/no_results_helper_spec.rb+++ b/spec/helpers/no_results_helper_spec.rb@@ -37,7 +37,7 @@ RSpec.describe NoResultsHelper dodescribe '#no_results_box' doit "contains the just the title" doexpect(helper.no_results_box).to have_content 'Nothing here!'- expect(helper.no_results_box).not_to have_link 'Add some foo'+ expect(helper.no_results_box).to have_no_link 'Add some foo'endit "contains the title and content link" dodiff --git a/spec/helpers/pagination_helper_spec.rb b/spec/helpers/pagination_helper_spec.rbindex 11c25d8f530..718e06fc454 100644--- a/spec/helpers/pagination_helper_spec.rb+++ b/spec/helpers/pagination_helper_spec.rb@@ -66,39 +66,39 @@ RSpec.describe PaginationHelper doendit "is inside a 'pagination' div" do- expect(pagination).to have_selector('div.op-pagination')+ expect(pagination).to have_css('div.op-pagination')endit 'has a next_page reference' do- expect(pagination).to have_selector('.op-pagination--item_next')+ expect(pagination).to have_css('.op-pagination--item_next')endit 'does not have a previous_page reference' do- expect(pagination).not_to have_selector('.op-pagination--item_prev')+ expect(pagination).to have_no_css('.op-pagination--item_prev')endit 'has links to every page except the current one' do(1..(total_entries / per_page)).each do |i|next if i == current_page- expect(pagination).to have_selector("a[href='#{work_packages_path(page: i)}']",- text: Regexp.new("^#{i}$"))+ expect(pagination).to have_css("a[href='#{work_packages_path(page: i)}']",+ text: Regexp.new("^#{i}$"))endendit 'does not have a link to the current page' do- expect(pagination).not_to have_selector('a', text: Regexp.new("^#{current_page}$"))+ expect(pagination).to have_no_css('a', text: Regexp.new("^#{current_page}$"))endit 'has an element for the current page' do- expect(pagination).to have_selector('.op-pagination--item_current',- text: Regexp.new("^#{current_page}$"))+ expect(pagination).to have_css('.op-pagination--item_current',+ text: Regexp.new("^#{current_page}$"))endit 'shows the range of the entries displayed' dorange = "(#{(current_page * per_page) - per_page + 1} - " +"#{current_page * per_page}/#{total_entries})"- expect(pagination).to have_selector('.op-pagination--range', text: range)+ expect(pagination).to have_css('.op-pagination--range', text: range)endit 'has different urls if the params are specified as options' do@@ -111,7 +111,7 @@ RSpec.describe PaginationHelper dohref = work_packages_path({ page: i }.merge(params))- expect(pagination).to have_selector("a[href='#{href}']", text: Regexp.new("^#{i}$"))+ expect(pagination).to have_css("a[href='#{href}']", text: Regexp.new("^#{i}$"))endend@@ -120,24 +120,24 @@ RSpec.describe PaginationHelper do.to receive(:per_page_options).and_return("#{per_page},#{per_page * 10}")- expect(pagination).to have_selector('.op-pagination--options')+ expect(pagination).to have_css('.op-pagination--options')- expect(pagination).to have_selector('.op-pagination--options .op-pagination--item_current', text: per_page)+ expect(pagination).to have_css('.op-pagination--options .op-pagination--item_current', text: per_page)path = work_packages_path(page: current_page, per_page: Setting.per_page_options_array.last)- expect(pagination).to have_selector(".op-pagination--options a[href='#{path}']")+ expect(pagination).to have_css(".op-pagination--options a[href='#{path}']")enddescribe 'WHEN the first page is the current' dolet(:current_page) { 1 }it 'deactivates the previous page link' do- expect(pagination).not_to have_selector('.op-pagination--item_prev')+ expect(pagination).to have_no_css('.op-pagination--item_prev')endit 'has a link to the next page' dopath = work_packages_path(page: current_page + 1)- expect(pagination).to have_selector(".op-pagination--item_next a[href='#{path}']")+ expect(pagination).to have_css(".op-pagination--item_next a[href='#{path}']")endend@@ -145,12 +145,12 @@ RSpec.describe PaginationHelper dolet(:current_page) { (total_entries / per_page) + 1 }it 'deactivates the next page link' do- expect(pagination).not_to have_selector('.op-pagination--item_next')+ expect(pagination).to have_no_css('.op-pagination--item_next')endit 'has a link to the previous page' dopath = work_packages_path(page: current_page - 1)- expect(pagination).to have_selector(".op-pagination--item_prev a[href='#{path}']")+ expect(pagination).to have_css(".op-pagination--item_prev a[href='#{path}']")endend@@ -158,11 +158,11 @@ RSpec.describe PaginationHelper dolet(:total_entries) { 0 }it 'shows no pages' do- expect(pagination).not_to have_selector('.op-pagination--items .op-pagination--item')+ expect(pagination).to have_no_css('.op-pagination--items .op-pagination--item')endit 'shows no pagination' do- expect(pagination).not_to have_selector('.op-pagination')+ expect(pagination).to have_no_css('.op-pagination')endendenddiff --git a/spec/helpers/security_badge_helper_spec.rb b/spec/helpers/security_badge_helper_spec.rbindex 4928d92cb4a..9b53f468acd 100644--- a/spec/helpers/security_badge_helper_spec.rb+++ b/spec/helpers/security_badge_helper_spec.rb@@ -39,7 +39,7 @@ RSpec.describe SecurityBadgeHelper douri = URI.parse(helper.security_badge_url)query = Rack::Utils.parse_nested_query(uri.query)expect(uri.host).to eq("releases.openproject.com")- expect(query.keys).to match_array(["uuid", "type", "version", "db", "lang", "ee"])+ expect(query.keys).to contain_exactly("uuid", "type", "version", "db", "lang", "ee")expect(query["uuid"]).to eq("abcd1234")expect(query["version"]).to eq(OpenProject::VERSION.to_semver)expect(query["type"]).to eq("manual")diff --git a/spec/helpers/settings_helper_spec.rb b/spec/helpers/settings_helper_spec.rbindex d00e5152ffd..9d07f4b02ff 100644--- a/spec/helpers/settings_helper_spec.rb+++ b/spec/helpers/settings_helper_spec.rb@@ -77,7 +77,7 @@ RSpec.describe SettingsHelper doit_behaves_like 'field disabled if non writable'it 'outputs element' do- expect(output).to have_selector 'select.form--select > option', count: 3+ expect(output).to have_css 'select.form--select > option', count: 3expect(output).to have_select 'settings_field', selected: 'Jello'endend@@ -96,15 +96,15 @@ RSpec.describe SettingsHelper doendit 'has checkboxes wrapped in checkbox-container' do- expect(output).to have_selector 'span.form--check-box-container', count: 3+ expect(output).to have_css 'span.form--check-box-container', count: 3endit 'has three labels' do- expect(output).to have_selector 'label.form--label-with-check-box', count: 3+ expect(output).to have_css 'label.form--label-with-check-box', count: 3endit 'outputs element' do- expect(output).to have_selector 'input[type="checkbox"].form--check-box', count: 3+ expect(output).to have_css 'input[type="checkbox"].form--check-box', count: 3endcontext 'when the setting isn`t writable' do@@ -115,8 +115,8 @@ RSpec.describe SettingsHelper doendit 'is disabled and has no hidden field' do- expect(output).not_to have_selector 'input[type="hidden"][value=""]', visible: :all- expect(output).to have_selector 'input[type="checkbox"][disabled="disabled"].form--check-box', count: 3+ expect(output).to have_no_css 'input[type="hidden"][value=""]', visible: :all+ expect(output).to have_css 'input[type="checkbox"][disabled="disabled"].form--check-box', count: 3endendend@@ -154,15 +154,15 @@ RSpec.describe SettingsHelper doit_behaves_like 'not wrapped in container'it 'is structured as a table' do- expect(output).to have_selector 'table.form--matrix'+ expect(output).to have_css 'table.form--matrix'endit 'has table headers' do- expect(output).to have_selector 'thead th.form--matrix-header-cell', count: 3+ expect(output).to have_css 'thead th.form--matrix-header-cell', count: 3endit 'has three table rows' do- expect(output).to have_selector 'tbody > tr.form--matrix-row', count: 4+ expect(output).to have_css 'tbody > tr.form--matrix-row', count: 4endit 'has cells with text labels' do@@ -276,8 +276,8 @@ important text</textarea>it_behaves_like 'field disabled if non writable'it 'outputs element' do- expect(output).to have_selector 'input[type="hidden"][value=0]', visible: :hidden- expect(output).to have_selector 'input[type="checkbox"].custom-class.form--check-box'+ expect(output).to have_css 'input[type="hidden"][value=0]', visible: :hidden+ expect(output).to have_css 'input[type="checkbox"].custom-class.form--check-box'expect(output).to have_checked_field 'settings_field'end@@ -289,7 +289,7 @@ important text</textarea>endit 'does not output a hidden field' do- expect(output).not_to have_selector 'input[type="hidden"][value=0]', visible: :hidden+ expect(output).to have_no_css 'input[type="hidden"][value=0]', visible: :hiddenendendend@@ -305,8 +305,8 @@ important text</textarea>it_behaves_like 'field disabled if non writable'it 'outputs element' do- expect(output).to have_selector 'input[type="hidden"][value=0]', visible: :hidden- expect(output).to have_selector 'input[type="checkbox"].custom-class.form--check-box'+ expect(output).to have_css 'input[type="hidden"][value=0]', visible: :hidden+ expect(output).to have_css 'input[type="checkbox"].custom-class.form--check-box'expect(output).to have_unchecked_field 'settings_field'end@@ -318,7 +318,7 @@ important text</textarea>endit 'does not output a hidden field' do- expect(output).not_to have_selector 'input[type="hidden"][value=0]', visible: :hidden+ expect(output).to have_no_css 'input[type="hidden"][value=0]', visible: :hiddenendendenddiff --git a/spec/helpers/work_packages_helper_spec.rb b/spec/helpers/work_packages_helper_spec.rbindex 36b0989cce7..e4e61a448e3 100644--- a/spec/helpers/work_packages_helper_spec.rb+++ b/spec/helpers/work_packages_helper_spec.rb@@ -44,7 +44,7 @@ RSpec.describe WorkPackagesHelper dodescribe 'without parameters' doit 'returns a link to the work package with type and id as the text if type is set' dolink_text = Regexp.new("^#{stub_type.name} ##{stub_work_package.id}$")- expect(helper.link_to_work_package(stub_work_package)).to have_selector(+ expect(helper.link_to_work_package(stub_work_package)).to have_css("a[href='#{work_package_path(stub_work_package)}']", text: link_text)end@@ -57,14 +57,14 @@ RSpec.describe WorkPackagesHelper doit 'prepends an invisible closed information if the work package is closed' dostub_work_package.status = closed_status- expect(helper.link_to_work_package(stub_work_package)).to have_selector('a span.hidden-for-sighted', text: 'closed')+ expect(helper.link_to_work_package(stub_work_package)).to have_css('a span.hidden-for-sighted', text: 'closed')endit 'omits the invisible closed information if told so even though the work package is closed' dostub_work_package.status = closed_statusexpect(helper.link_to_work_package(stub_work_package, no_hidden: true))- .not_to have_selector('a span.hidden-for-sighted', text: 'closed')+ .to have_no_css('a span.hidden-for-sighted', text: 'closed')endend@@ -72,7 +72,7 @@ RSpec.describe WorkPackagesHelper doit 'returns a link to the work package with the type, id, and subject as the text' dolink_text = Regexp.new("^#{stub_type} ##{stub_work_package.id}: #{stub_work_package.subject}$")expect(helper.link_to_work_package(stub_work_package,- all_link: true)).to have_selector(+ all_link: true)).to have_css("a[href='#{work_package_path(stub_work_package)}']", text: link_text)end@@ -96,7 +96,7 @@ RSpec.describe WorkPackagesHelper dodescribe 'when omitting the subject' doit 'omits the subject' do- expect(helper.link_to_work_package(stub_work_package, subject: false)).not_to have_text(stub_work_package.subject)+ expect(helper.link_to_work_package(stub_work_package, subject: false)).to have_no_text(stub_work_package.subject)endend@@ -104,8 +104,8 @@ RSpec.describe WorkPackagesHelper doit 'omits the type' dolink_text = Regexp.new("^##{stub_work_package.id}$")expect(helper.link_to_work_package(stub_work_package,- type: false)).to have_selector("a[href='#{work_package_path(stub_work_package)}']",- text: link_text)+ type: false)).to have_css("a[href='#{work_package_path(stub_work_package)}']",+ text: link_text)endend@@ -121,7 +121,7 @@ RSpec.describe WorkPackagesHelper doendit 'does not include the project name if the parameter is missing/false' do- expect(helper.link_to_work_package(stub_work_package)).not_to have_text(text)+ expect(helper.link_to_work_package(stub_work_package)).to have_no_text(text)endend@@ -129,12 +129,12 @@ RSpec.describe WorkPackagesHelper doit 'returns a link with the id as text only' dolink_text = Regexp.new("^##{stub_work_package.id}$")expect(helper.link_to_work_package(stub_work_package,- id_only: true)).to have_selector("a[href='#{work_package_path(stub_work_package)}']",- text: link_text)+ id_only: true)).to have_css("a[href='#{work_package_path(stub_work_package)}']",+ text: link_text)endit 'does not have the subject as text' do- expect(helper.link_to_work_package(stub_work_package, id_only: true)).not_to have_text(stub_work_package.subject)+ expect(helper.link_to_work_package(stub_work_package, id_only: true)).to have_no_text(stub_work_package.subject)endend@@ -142,7 +142,7 @@ RSpec.describe WorkPackagesHelper doit 'returns a link with the subject as text' dolink_text = Regexp.new("^#{stub_work_package.subject}$")expect(helper.link_to_work_package(stub_work_package,- subject_only: true)).to have_selector(+ subject_only: true)).to have_css("a[href='#{work_package_path(stub_work_package)}']", text: link_text)end@@ -152,8 +152,8 @@ RSpec.describe WorkPackagesHelper doit 'returns a link with the status name contained in the text' dolink_text = Regexp.new("^#{stub_type.name} ##{stub_work_package.id} #{stub_work_package.status}$")expect(helper.link_to_work_package(stub_work_package,- status: true)).to have_selector("a[href='#{work_package_path(stub_work_package)}']",- text: link_text)+ status: true)).to have_css("a[href='#{work_package_path(stub_work_package)}']",+ text: link_text)endendenddiff --git a/spec/lib/api/v3/queries/schemas/query_filter_instance_schema_representer_spec.rb b/spec/lib/api/v3/queries/schemas/query_filter_instance_schema_representer_spec.rbindex 6c2799b3d32..ebd7178f6ac 100644--- a/spec/lib/api/v3/queries/schemas/query_filter_instance_schema_representer_spec.rb+++ b/spec/lib/api/v3/queries/schemas/query_filter_instance_schema_representer_spec.rb@@ -226,10 +226,6 @@ RSpec.describe API::V3::Queries::Schemas::QueryFilterInstanceSchemaRepresenter dform_embedded:).and_return(dependency)end- end-- before do- # fill the cacheinstance.to_jsonenddiff --git a/spec/lib/api/v3/work_packages/eager_loading/custom_actions_integration_spec.rb b/spec/lib/api/v3/work_packages/eager_loading/custom_actions_integration_spec.rbindex eba3b44ded7..1f888d132ff 100644--- a/spec/lib/api/v3/work_packages/eager_loading/custom_actions_integration_spec.rb+++ b/spec/lib/api/v3/work_packages/eager_loading/custom_actions_integration_spec.rb@@ -27,7 +27,7 @@#++require 'rspec'require 'spec_helper'-require_relative './eager_loading_mock_wrapper'+require_relative 'eager_loading_mock_wrapper'RSpec.describe API::V3::WorkPackages::EagerLoading::CustomAction dolet!(:work_package1) { create(:work_package) }@@ -60,10 +60,10 @@ RSpec.describe API::V3::WorkPackages::EagerLoading::CustomAction do.not_to receive(:custom_actions)expect(wrapped.detect { |w| w.id == work_package1.id }.custom_actions(user))- .to match_array [status_custom_action]+ .to contain_exactly(status_custom_action)expect(wrapped.detect { |w| w.id == work_package2.id }.custom_actions(user))- .to match_array [role_custom_action]+ .to contain_exactly(role_custom_action)endendenddiff --git a/spec/lib/api/v3/work_packages/eager_loading/project_integration_spec.rb b/spec/lib/api/v3/work_packages/eager_loading/project_integration_spec.rbindex 3afd7ae9517..0cd8c781485 100644--- a/spec/lib/api/v3/work_packages/eager_loading/project_integration_spec.rb+++ b/spec/lib/api/v3/work_packages/eager_loading/project_integration_spec.rb@@ -27,7 +27,7 @@#++require 'rspec'require 'spec_helper'-require_relative './eager_loading_mock_wrapper'+require_relative 'eager_loading_mock_wrapper'RSpec.describe API::V3::WorkPackages::EagerLoading::Project dolet!(:parent_work_package1) { create(:work_package, project: parent_project) }diff --git a/spec/lib/api/v3/work_packages/schema/work_package_sums_schema_spec.rb b/spec/lib/api/v3/work_packages/schema/work_package_sums_schema_spec.rbindex fa586a21f36..40d85854f72 100644--- a/spec/lib/api/v3/work_packages/schema/work_package_sums_schema_spec.rb+++ b/spec/lib/api/v3/work_packages/schema/work_package_sums_schema_spec.rb@@ -42,7 +42,7 @@ RSpec.describe API::V3::WorkPackages::Schema::WorkPackageSumsSchema doallow(WorkPackageCustomField).to receive(:summable) { [cf1, cf2, cf3] }- expect(subject.available_custom_fields).to match_array [cf1, cf2, cf3]+ expect(subject.available_custom_fields).to contain_exactly(cf1, cf2, cf3)endendenddiff --git a/spec/lib/api/v3/work_packages/work_package_payload_representer_spec.rb b/spec/lib/api/v3/work_packages/work_package_payload_representer_spec.rbindex e4d6d4c75b1..77db72b28b2 100644--- a/spec/lib/api/v3/work_packages/work_package_payload_representer_spec.rb+++ b/spec/lib/api/v3/work_packages/work_package_payload_representer_spec.rb@@ -279,7 +279,7 @@ RSpec.describe API::V3::WorkPackages::WorkPackagePayloadRepresenter doshared_examples_for 'linked property with 0 value' do |attribute, association = attribute|context "with a 0 for #{attribute}_id" dobefore do- work_package.send("#{association}_id=", 0)+ work_package.send(:"#{association}_id=", 0)endit_behaves_like 'linked property' dodiff --git a/spec/lib/open_project/changed_by_system_spec.rb b/spec/lib/open_project/changed_by_system_spec.rbindex d7d95cc2c2d..2cf365d177c 100644--- a/spec/lib/open_project/changed_by_system_spec.rb+++ b/spec/lib/open_project/changed_by_system_spec.rb@@ -43,7 +43,7 @@ RSpec.describe OpenProject::ChangedBySystem doit 'returns the attribute' doexpect(model.changed_by_user)- .to match_array ['title']+ .to contain_exactly('title')endend@@ -71,7 +71,7 @@ RSpec.describe OpenProject::ChangedBySystem doit 'returns the attribute' doexpect(model.changed_by_user)- .to match_array ['title']+ .to contain_exactly('title')endenddiff --git a/spec/lib/open_project/feature_decisions_spec.rb b/spec/lib/open_project/feature_decisions_spec.rbindex 3a6bd5771b1..493cf216b85 100644--- a/spec/lib/open_project/feature_decisions_spec.rb+++ b/spec/lib/open_project/feature_decisions_spec.rb@@ -49,7 +49,7 @@ RSpec.describe OpenProject::FeatureDecisions, :settings_reset doinclude_context 'when adding without env variable'it 'is false by default' do- expect(described_class.send("#{flag_name}_active?"))+ expect(described_class.send(:"#{flag_name}_active?")).to be falseendend@@ -59,7 +59,7 @@ RSpec.describe OpenProject::FeatureDecisions, :settings_reset doinclude_context 'when adding the given feature flag'it 'is true' do- expect(described_class.send("#{flag_name}_active?"))+ expect(described_class.send(:"#{flag_name}_active?")).to be trueendenddiff --git a/spec/lib/open_project/form_tag_helper_spec.rb b/spec/lib/open_project/form_tag_helper_spec.rbindex 0b7c4f24101..53e0505b527 100644--- a/spec/lib/open_project/form_tag_helper_spec.rb+++ b/spec/lib/open_project/form_tag_helper_spec.rb@@ -234,7 +234,7 @@ Words are important</textarea>it_behaves_like 'not wrapped in container', 'submit-container'it 'outputs element' do- expect(html).to have_selector('input[type=submit]')+ expect(html).to have_css('input[type=submit]')endenddiff --git a/spec/lib/open_project/hook_spec.rb b/spec/lib/open_project/hook_spec.rbindex 13456f0ca5c..9defc1be229 100644--- a/spec/lib/open_project/hook_spec.rb+++ b/spec/lib/open_project/hook_spec.rb@@ -72,7 +72,7 @@ RSpec.describe OpenProject::Hook dotest_hook1_classexpect(described_class.hook_listeners(:view_layouts_base_html_head))- .to match_array([test_hook1_class])+ .to contain_exactly(test_hook1_class)endend@@ -90,7 +90,7 @@ RSpec.describe OpenProject::Hook doit 'adds listeners' dodescribed_class.add_listener(test_class)expect(described_class.hook_listeners(:view_layouts_base_html_head))- .to match_array([test_class])+ .to contain_exactly(test_class)endend@@ -152,8 +152,8 @@ RSpec.describe OpenProject::Hook doit 'calls all registered methods' doexpect(described_class.call_hook(:view_layouts_base_html_head))- .to match_array [test_hook1_class.instance.view_layouts_base_html_head(nil),- test_hook2_class.instance.view_layouts_base_html_head(nil)]+ .to contain_exactly(test_hook1_class.instance.view_layouts_base_html_head(nil),+ test_hook2_class.instance.view_layouts_base_html_head(nil))endend@@ -171,7 +171,7 @@ RSpec.describe OpenProject::Hook doit 'passes the context through' doexpect(described_class.call_hook(:view_layouts_base_html_head, **context))- .to match_array [context]+ .to contain_exactly(context)endend@@ -187,7 +187,7 @@ RSpec.describe OpenProject::Hook doit 'renders the link' doexpect(described_class.call_hook(:view_layouts_base_html_head))- .to match_array ['<a href="/work_packages">Work packages</a>']+ .to contain_exactly('<a href="/work_packages">Work packages</a>')endend@@ -221,7 +221,7 @@ RSpec.describe OpenProject::Hook doit 'adds to the context' doexpect(instance.call_hook(:view_layouts_base_html_head, {}))- .to match_array [{ project:, controller: instance, request:, hook_caller: instance }]+ .to contain_exactly({ project:, controller: instance, request:, hook_caller: instance })endendenddiff --git a/spec/lib/open_project/scm/adapters/git_adapter_spec.rb b/spec/lib/open_project/scm/adapters/git_adapter_spec.rbindex f1eb2025ea4..c2fdc4bfc88 100644--- a/spec/lib/open_project/scm/adapters/git_adapter_spec.rb+++ b/spec/lib/open_project/scm/adapters/git_adapter_spec.rb@@ -442,8 +442,7 @@ RSpec.describe OpenProject::SCM::Adapters::Git doannotate = adapter.annotate('renamed_test.txt')expect(annotate.lines.length).to eq(2)expect(annotate.content).to eq("This is a test\nLet's pretend I'm adding a new feature!")- expect(annotate.lines).to match_array(['This is a test',- "Let's pretend I'm adding a new feature!"])+ expect(annotate.lines).to contain_exactly('This is a test', "Let's pretend I'm adding a new feature!")expect(annotate.revisions.length).to eq(2)expect(annotate.revisions[0].identifier).to eq('fba357b886984ee71185ad2065e65fc0417d9b92')diff --git a/spec/lib/open_project/storage_spec.rb b/spec/lib/open_project/storage_spec.rbindex 15f679583a5..36078d74404 100644--- a/spec/lib/open_project/storage_spec.rb+++ b/spec/lib/open_project/storage_spec.rb@@ -43,7 +43,7 @@ RSpec.describe OpenProject::Storage dosubject { OpenProject::Storage.known_storage_paths }it 'contains attachments path' do- expect(subject.length).to be == 1+ expect(subject.length).to eq 1expect(subject[:attachments]).to eq(label: I18n.t('attributes.attachments'),path: OpenProject::Configuration.attachments_storage_path.to_s)@@ -62,7 +62,7 @@ RSpec.describe OpenProject::Storage doit 'contains one fs entry' doexpect(File.exist?(tmpdir)).to be true- expect(subject.length).to be == 1+ expect(subject.length).to eq 1entry = subject.values.firstexpect(entry[:labels]).to eq(['this is foobar'])@@ -92,12 +92,11 @@ RSpec.describe OpenProject::Storage dosubject { OpenProject::Storage.known_storage_paths }it 'contains both paths' do- expect(subject.length).to be == 2+ expect(subject.length).to eq 2labels = subject.values.pluck(:label)expect(labels)- .to match_array([I18n.t(:label_managed_repositories_vendor, vendor: 'Git'),- I18n.t('attributes.attachments')])+ .to contain_exactly(I18n.t(:label_managed_repositories_vendor, vendor: 'Git'), I18n.t('attributes.attachments'))endend@@ -109,8 +108,7 @@ RSpec.describe OpenProject::Storage doentry = subject.values.firstexpect(entry[:labels])- .to match_array([I18n.t(:label_managed_repositories_vendor, vendor: 'Git'),- I18n.t('attributes.attachments')])+ .to contain_exactly(I18n.t(:label_managed_repositories_vendor, vendor: 'Git'), I18n.t('attributes.attachments'))endcontext 'with multiple filesystem ids' dodiff --git a/spec/lib/open_project/text_formatting/markdown/attribute_macros_spec.rb b/spec/lib/open_project/text_formatting/markdown/attribute_macros_spec.rbindex f9adb7465f3..57ddb87155c 100644--- a/spec/lib/open_project/text_formatting/markdown/attribute_macros_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/attribute_macros_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './expected_markdown'+require_relative 'expected_markdown'RSpec.describe OpenProject::TextFormatting,'Attribute macros' dodiff --git a/spec/lib/open_project/text_formatting/markdown/blockquote_spec.rb b/spec/lib/open_project/text_formatting/markdown/blockquote_spec.rbindex 43af75671ab..f06033358b6 100644--- a/spec/lib/open_project/text_formatting/markdown/blockquote_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/blockquote_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './expected_markdown'+require_relative 'expected_markdown'RSpec.describe OpenProject::TextFormatting,'blockquote' dodiff --git a/spec/lib/open_project/text_formatting/markdown/code_spec.rb b/spec/lib/open_project/text_formatting/markdown/code_spec.rbindex f8078377725..d5a1da389cd 100644--- a/spec/lib/open_project/text_formatting/markdown/code_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/code_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './expected_markdown'+require_relative 'expected_markdown'RSpec.describe OpenProject::TextFormatting,'code' dodiff --git a/spec/lib/open_project/text_formatting/markdown/embedded_table_macro_spec.rb b/spec/lib/open_project/text_formatting/markdown/embedded_table_macro_spec.rbindex 4efb0d83d97..881c5ea65e0 100644--- a/spec/lib/open_project/text_formatting/markdown/embedded_table_macro_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/embedded_table_macro_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './expected_markdown'+require_relative 'expected_markdown'RSpec.describe OpenProject::TextFormatting,'toc macro' dodiff --git a/spec/lib/open_project/text_formatting/markdown/headings_spec.rb b/spec/lib/open_project/text_formatting/markdown/headings_spec.rbindex 9bc608179bc..f71c5c0888c 100644--- a/spec/lib/open_project/text_formatting/markdown/headings_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/headings_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './expected_markdown'+require_relative 'expected_markdown'RSpec.describe OpenProject::TextFormatting,'headings' dodiff --git a/spec/lib/open_project/text_formatting/markdown/images_spec.rb b/spec/lib/open_project/text_formatting/markdown/images_spec.rbindex e4b97b89e36..00f8f29b406 100644--- a/spec/lib/open_project/text_formatting/markdown/images_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/images_spec.rb@@ -28,7 +28,7 @@require 'spec_helper'-require_relative './expected_markdown'+require_relative 'expected_markdown'RSpec.describe OpenProject::TextFormatting,'images' doinclude_context 'expected markdown modules'diff --git a/spec/lib/open_project/text_formatting/markdown/lists_spec.rb b/spec/lib/open_project/text_formatting/markdown/lists_spec.rbindex 4bd9afdeb9e..4d328bc892e 100644--- a/spec/lib/open_project/text_formatting/markdown/lists_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/lists_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './expected_markdown'+require_relative 'expected_markdown'RSpec.describe OpenProject::TextFormatting,'lists' dodiff --git a/spec/lib/open_project/text_formatting/markdown/markdown_formatting_spec.rb b/spec/lib/open_project/text_formatting/markdown/markdown_formatting_spec.rbindex 410dc6400d5..5f7aec20493 100644--- a/spec/lib/open_project/text_formatting/markdown/markdown_formatting_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/markdown_formatting_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './expected_markdown'+require_relative 'expected_markdown'RSpec.describe OpenProject::TextFormatting::Formats::Markdown::Formatter doit 'modifierses' do@@ -67,7 +67,7 @@ RSpec.describe OpenProject::TextFormatting::Formats::Markdown::Formatter doexpect_paragraph = options.delete :expect_paragraphto_test.each do |text, expected|- expected = expect_paragraph ? "<p class=\"op-uc-p\">#{expected}</p>" : expected+ expected = "<p class=\"op-uc-p\">#{expected}</p>" if expect_paragraphexpect(to_html(text, options)).to be_html_eql expectedendenddiff --git a/spec/lib/open_project/text_formatting/markdown/paragraphs_spec.rb b/spec/lib/open_project/text_formatting/markdown/paragraphs_spec.rbindex 59c73b8d846..b8cf87f2ca6 100644--- a/spec/lib/open_project/text_formatting/markdown/paragraphs_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/paragraphs_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './expected_markdown'+require_relative 'expected_markdown'RSpec.describe OpenProject::TextFormatting,'paragraphs' dodiff --git a/spec/lib/open_project/text_formatting/markdown/setting_variable_spec.rb b/spec/lib/open_project/text_formatting/markdown/setting_variable_spec.rbindex eae9bde14a3..814d69ebd6b 100644--- a/spec/lib/open_project/text_formatting/markdown/setting_variable_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/setting_variable_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './expected_markdown'+require_relative 'expected_markdown'RSpec.describe OpenProject::TextFormatting,'Setting variable' dodiff --git a/spec/lib/open_project/text_formatting/markdown/tables_spec.rb b/spec/lib/open_project/text_formatting/markdown/tables_spec.rbindex 6027bcdd03b..45552933973 100644--- a/spec/lib/open_project/text_formatting/markdown/tables_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/tables_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './expected_markdown'+require_relative 'expected_markdown'RSpec.describe OpenProject::TextFormatting,'tables' dodiff --git a/spec/lib/open_project/text_formatting/markdown/toc_macro_spec.rb b/spec/lib/open_project/text_formatting/markdown/toc_macro_spec.rbindex 2593a80c43f..a90a4150515 100644--- a/spec/lib/open_project/text_formatting/markdown/toc_macro_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/toc_macro_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './expected_markdown'+require_relative 'expected_markdown'RSpec.describe OpenProject::TextFormatting,'toc macro' dodiff --git a/spec/lib/open_project/text_formatting/markdown/user_provided_links_spec.rb b/spec/lib/open_project/text_formatting/markdown/user_provided_links_spec.rbindex 4d58c7813d3..9dea075cf4b 100644--- a/spec/lib/open_project/text_formatting/markdown/user_provided_links_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/user_provided_links_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './expected_markdown'+require_relative 'expected_markdown'RSpec.describe OpenProject::TextFormatting,'user provided links' dodiff --git a/spec/lib/open_project/text_formatting/markdown/work_package_buttons_macro_spec.rb b/spec/lib/open_project/text_formatting/markdown/work_package_buttons_macro_spec.rbindex 228fc6582fa..a0c68c7ab58 100644--- a/spec/lib/open_project/text_formatting/markdown/work_package_buttons_macro_spec.rb+++ b/spec/lib/open_project/text_formatting/markdown/work_package_buttons_macro_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './expected_markdown'+require_relative 'expected_markdown'RSpec.describe OpenProject::TextFormatting,'work package button macro' dodiff --git a/spec/lib/redmine/i18n_spec.rb b/spec/lib/redmine/i18n_spec.rbindex 5696825c2b5..3c60ccf8336 100644--- a/spec/lib/redmine/i18n_spec.rb+++ b/spec/lib/redmine/i18n_spec.rb@@ -86,7 +86,7 @@ module OpenProjectendit 'returns no js language as they are duplicates of the rest of the other language' do- expect(all_languages).not_to be_any { |l| l.to_s.start_with?('js-') }+ expect(all_languages).not_to(be_any { |l| l.to_s.start_with?('js-') })end# it is OK if more languages existdiff --git a/spec/lib/tabular_form_builder_spec.rb b/spec/lib/tabular_form_builder_spec.rbindex eb80ca0452e..991d11e437f 100644--- a/spec/lib/tabular_form_builder_spec.rb+++ b/spec/lib/tabular_form_builder_spec.rb@@ -65,7 +65,7 @@ RSpec.describe TabularFormBuilder docontext 'with help text' dolet(:options) { { title: 'Name', class: 'custom-class', help_text: { attribute: 'foo', 'attribute-scope': 'bar' } } }- it 'will output a label with an attribute-help-text tag' do+ it 'outputs a label with an attribute-help-text tag' doexpect(output).to be_html_eql(%{<label class="form--label"for="user_name"@@ -209,8 +209,8 @@ JJ Abrams</textarea>context 'an id is missing' doit 'outputs the wysiwyg wrapper' do- expect(output).to have_selector 'textarea'- expect(output).to have_selector 'ckeditor-augmented-textarea'+ expect(output).to have_css 'textarea'+ expect(output).to have_css 'ckeditor-augmented-textarea'endend@@ -218,8 +218,8 @@ JJ Abrams</textarea>let(:options) { { id: 'my-id', title: 'Name', class: 'custom-class', with_text_formatting: true } }it 'outputs the wysiwyg wrapper' do- expect(output).to have_selector 'textarea'- expect(output).to have_selector 'ckeditor-augmented-textarea'+ expect(output).to have_css 'textarea'+ expect(output).to have_css 'ckeditor-augmented-textarea'endendend@@ -262,8 +262,8 @@ JJ Abrams</textarea>it_behaves_like 'wrapped in container', 'select-container'it 'outputs element' do- expect(output).to have_selector 'select.custom-class.form--select > option', count: 3- expect(output).to have_selector 'option:first[value="56"]'+ expect(output).to have_css 'select.custom-class.form--select > option', count: 3+ expect(output).to have_css 'option:first[value="56"]'expect(output).to have_text 'Jonas'endend@@ -279,9 +279,9 @@ JJ Abrams</textarea>it_behaves_like 'wrapped in field-container by default'it 'outputs element' do- expect(output).to have_selector 'select', count: 3- expect(output).to have_selector 'select:nth-of-type(2) > option', count: 12- expect(output).to have_selector 'select:last > option', count: 31+ expect(output).to have_css 'select', count: 3+ expect(output).to have_css 'select:nth-of-type(2) > option', count: 12+ expect(output).to have_css 'select:last > option', count: 31endend@@ -524,7 +524,7 @@ JJ Abrams</textarea>it_behaves_like 'not wrapped in container', 'submit-container'it 'outputs element' do- expect(output).to have_selector('input[name=commit]')+ expect(output).to have_css('input[name=commit]')endend@@ -654,16 +654,16 @@ JJ Abrams</textarea>endit 'shows an appropriate error label' do- expect(output).to have_selector 'label.-error',- count: 1,- text: 'Name'+ expect(output).to have_css 'label.-error',+ count: 1,+ text: 'Name'endit 'contains a specific error as a hidden sub-label' do- expect(output).to have_selector 'label.-error p',- count: 1,- text: 'This field is invalid: Name is invalid. ' \- 'Name is not set to one of the allowed values.'+ expect(output).to have_css 'label.-error p',+ count: 1,+ text: 'This field is invalid: Name is invalid. ' \+ 'Name is not set to one of the allowed values.'endendenddiff --git a/spec/mailers/announcement_mailer_spec.rb b/spec/mailers/announcement_mailer_spec.rbindex c5329fabb7f..16bf151bfd0 100644--- a/spec/mailers/announcement_mailer_spec.rb+++ b/spec/mailers/announcement_mailer_spec.rb@@ -57,7 +57,7 @@ RSpec.describe AnnouncementMailer doit 'sends to the recipient' doexpect(mail.to)- .to match_array [recipient.mail]+ .to contain_exactly(recipient.mail)endendenddiff --git a/spec/mailers/digest_mailer_spec.rb b/spec/mailers/digest_mailer_spec.rbindex 9016c1a7ce1..a06d7aa834f 100644--- a/spec/mailers/digest_mailer_spec.rb+++ b/spec/mailers/digest_mailer_spec.rb@@ -84,7 +84,7 @@ RSpec.describe DigestMailer doit 'sends to the recipient' doexpect(mail.to)- .to match_array [recipient.mail]+ .to contain_exactly(recipient.mail)endit 'sets the expected message_id header' dodiff --git a/spec/mailers/shared_examples.rb b/spec/mailers/shared_examples.rbindex 15c9a781d7f..389f5af2135 100644--- a/spec/mailers/shared_examples.rb+++ b/spec/mailers/shared_examples.rb@@ -12,7 +12,7 @@ RSpec.shared_examples_for 'mail is sent' doendit 'is sent from the configured address' do- expect(deliveries.first.from).to match_array([Setting.mail_from])+ expect(deliveries.first.from).to contain_exactly(Setting.mail_from)endenddiff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rbindex 75325dbdcbf..bed4a396ae6 100644--- a/spec/mailers/user_mailer_spec.rb+++ b/spec/mailers/user_mailer_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_examples'+require_relative 'shared_examples'RSpec.describe UserMailer dosubject(:deliveries) { ActionMailer::Base.deliveries }diff --git a/spec/mailers/work_package_mailer_spec.rb b/spec/mailers/work_package_mailer_spec.rbindex 239d30bd384..b334c7f4c6f 100644--- a/spec/mailers/work_package_mailer_spec.rb+++ b/spec/mailers/work_package_mailer_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './shared_examples'+require_relative 'shared_examples'RSpec.describe WorkPackageMailer doinclude OpenProject::ObjectLinking@@ -63,7 +63,7 @@ RSpec.describe WorkPackageMailer doit 'is sent to the recipient' doexpect(mail.to)- .to match_array([recipient.mail])+ .to contain_exactly(recipient.mail)endit 'has a project header' dodiff --git a/spec/models/activities/work_package_activity_provider_spec.rb b/spec/models/activities/work_package_activity_provider_spec.rbindex fb3febaff09..c3ac9b0dc8a 100644--- a/spec/models/activities/work_package_activity_provider_spec.rb+++ b/spec/models/activities/work_package_activity_provider_spec.rb@@ -70,7 +70,7 @@ RSpec.describe Activities::WorkPackageActivityProvider do.map { |a| a.journable_id.to_s }end- it { is_expected.to eq(work_packages.reverse.first(3)) }+ it { is_expected.to eq(work_packages.last(3).reverse) }endcontext 'when a work package has been created and then closed' dodiff --git a/spec/models/announcement_spec.rb b/spec/models/announcement_spec.rbindex 57f4137e4fb..4dcc6e85d56 100644--- a/spec/models/announcement_spec.rb+++ b/spec/models/announcement_spec.rb@@ -1,18 +1,41 @@require 'spec_helper'RSpec.describe Announcement do- it do is_expected.to respond_to :text end- it do is_expected.to respond_to :text= end- it do is_expected.to respond_to :show_until end- it do is_expected.to respond_to :show_until= end- it do is_expected.to respond_to :active? end- it do is_expected.to respond_to :active= end+ it do+ expect(subject).to respond_to :text+ end++ it do+ expect(subject).to respond_to :text=+ end++ it do+ expect(subject).to respond_to :show_until+ end++ it do+ expect(subject).to respond_to :show_until=+ end++ it do+ expect(subject).to respond_to :active?+ end++ it do+ expect(subject).to respond_to :active=+ enddescribe 'class methods' dodescribe '#only_one' docontext 'WHEN no announcement exists' do- it do expect(Announcement.only_one.text).to eql 'Announcement' end- it do expect(Announcement.only_one.show_until).to eql(Date.today + 14.days) end+ it do+ expect(Announcement.only_one.text).to eql 'Announcement'+ end++ it do+ expect(Announcement.only_one.show_until).to eql(Date.today + 14.days)+ end+it { expect(Announcement.only_one.active).to be false }enddiff --git a/spec/models/attachment_spec.rb b/spec/models/attachment_spec.rbindex acf8a81d679..7cb4b58a8d3 100644--- a/spec/models/attachment_spec.rb+++ b/spec/models/attachment_spec.rb@@ -68,7 +68,7 @@ RSpec.describe Attachment doit 'raises an error regarding description length' doexpect(stubbed_attachment.errors[:description])- .to match_array [I18n.t('activerecord.errors.messages.too_long', count: 255)]+ .to contain_exactly(I18n.t('activerecord.errors.messages.too_long', count: 255))endend@@ -103,7 +103,7 @@ RSpec.describe Attachment dostubbed_attachment.valid?expect(stubbed_attachment.errors.symbols_for(:container))- .to match_array [:unchangeable]+ .to contain_exactly(:unchangeable)endend@@ -116,7 +116,7 @@ RSpec.describe Attachment dostubbed_attachment.valid?expect(stubbed_attachment.errors.symbols_for(:container))- .to match_array [:unchangeable]+ .to contain_exactly(:unchangeable)endend@@ -129,7 +129,7 @@ RSpec.describe Attachment dostubbed_attachment.valid?expect(stubbed_attachment.errors.symbols_for(:container))- .to match_array [:unchangeable]+ .to contain_exactly(:unchangeable)endendend@@ -210,7 +210,7 @@ RSpec.describe Attachment do# We just use with_direct_uploads here to make sure the# FogAttachment class is defined and Fog is mocked.- describe "#external_url", with_direct_uploads: true do+ describe "#external_url", :with_direct_uploads dolet(:author) { create(:user) }let(:image_path) { Rails.root.join("spec/fixtures/files/image.png") }diff --git a/spec/models/attribute_help_text/work_package_spec.rb b/spec/models/attribute_help_text/work_package_spec.rbindex 7eee94049e1..cc940e65f30 100644--- a/spec/models/attribute_help_text/work_package_spec.rb+++ b/spec/models/attribute_help_text/work_package_spec.rb@@ -91,7 +91,7 @@ RSpec.describe AttributeHelpText::WorkPackage doit 'returns the help text for the static attribute but not the one for the custom field' doexpect(subject)- .to match_array([static_instance])+ .to contain_exactly(static_instance)endend@@ -100,7 +100,7 @@ RSpec.describe AttributeHelpText::WorkPackage doit 'returns the help text for the static and cf attribute' doexpect(subject)- .to match_array([static_instance, cf_instance])+ .to contain_exactly(static_instance, cf_instance)endend@@ -146,7 +146,7 @@ RSpec.describe AttributeHelpText::WorkPackage doit 'returns the help text for the static and active cf attributes' doexpect(subject)- .to match_array([static_instance, cf_instance_active, cf_instance_for_all])+ .to contain_exactly(static_instance, cf_instance_active, cf_instance_for_all)endendenddiff --git a/spec/models/custom_action_spec.rb b/spec/models/custom_action_spec.rbindex 369d4074117..63cd20e197b 100644--- a/spec/models/custom_action_spec.rb+++ b/spec/models/custom_action_spec.rb@@ -96,7 +96,7 @@ RSpec.describe CustomAction dostubbed_instance.actions = [CustomActions::Actions::AssignedTo.new(1)]expect(stubbed_instance.actions.map { |a| [a.key, a.values] })- .to match_array [[:assigned_to, [1]]]+ .to contain_exactly([:assigned_to, [1]])endit 'can be persisted' do@@ -105,7 +105,7 @@ RSpec.describe CustomAction doinstance.save!expect(CustomAction.find(instance.id).actions.map { |a| [a.key, a.values] })- .to match_array [[:assigned_to, [1]]]+ .to contain_exactly([:assigned_to, [1]])endend@@ -138,8 +138,7 @@ RSpec.describe CustomAction doCustomActions::Conditions::Role.new(role.id)]expect(stubbed_instance.conditions.map { |a| [a.key, a.values] })- .to match_array [[:status, [status.id]],- [:role, [role.id]]]+ .to contain_exactly([:status, [status.id]], [:role, [role.id]])endit 'can be persisted' do@@ -149,8 +148,7 @@ RSpec.describe CustomAction doinstance.save!expect(CustomAction.find(instance.id).conditions.map { |a| [a.key, a.values] })- .to match_array [[:status, [status.id]],- [:role, [role.id]]]+ .to contain_exactly([:status, [status.id]], [:role, [role.id]])endit 'existing permissions can be removed' do@@ -216,10 +214,7 @@ RSpec.describe CustomAction dodescribe '.all_conditions' doit 'returns all available conditions with the default value initialized' doexpect(stubbed_instance.all_conditions.map { |a| [a.key, a.values] })- .to match_array [[:status, []],- [:role, []],- [:type, []],- [:project, []]]+ .to contain_exactly([:status, []], [:role, []], [:type, []], [:project, []])endendenddiff --git a/spec/models/custom_actions/shared_expectations.rb b/spec/models/custom_actions/shared_expectations.rbindex 5d191f4c93b..db3203e3f46 100644--- a/spec/models/custom_actions/shared_expectations.rb+++ b/spec/models/custom_actions/shared_expectations.rb@@ -66,7 +66,7 @@ RSpec.shared_examples_for 'base custom action' dodescribe '.all' doit 'is an array with the class itself' doexpect(described_class.all)- .to match_array [described_class]+ .to contain_exactly(described_class)endend@@ -392,7 +392,7 @@ RSpec.shared_examples_for 'int values transformation' doinstance.values = [42, nil, '23', 'some bogus', '12.34234', '42a34e324r32']expect(instance.values)- .to match_array [42, nil, 23]+ .to contain_exactly(42, nil, 23)endendend@@ -403,7 +403,7 @@ RSpec.shared_examples_for 'float values transformation' doinstance.values = [42, nil, '23', 'some bogus', '12.34234', '42a34e324r32']expect(instance.values)- .to match_array [42, nil, 23, 12.34234]+ .to contain_exactly(42, nil, 23, 12.34234)endendend@@ -414,7 +414,7 @@ RSpec.shared_examples_for 'string values transformation' doinstance.values = [42, nil, '23', 'some bogus', '12.34234', '42a34e324r32']expect(instance.values)- .to match_array ['42', nil, '23', 'some bogus', '12.34234', '42a34e324r32']+ .to contain_exactly('42', nil, '23', 'some bogus', '12.34234', '42a34e324r32')endendend@@ -425,7 +425,7 @@ RSpec.shared_examples_for 'text values transformation' doinstance.values = [42, nil, '23', 'some bogus', '12.34234', '42a34e324r32']expect(instance.values)- .to match_array ['42', nil, '23', 'some bogus', '12.34234', '42a34e324r32']+ .to contain_exactly('42', nil, '23', 'some bogus', '12.34234', '42a34e324r32')endendend@@ -436,7 +436,7 @@ RSpec.shared_examples_for 'date values transformation' doinstance.values = ["2015-03-29", Date.today, nil, (Date.today - 1.day).to_datetime, 'bogus', '%CURRENT_DATE%']expect(instance.values)- .to match_array [Date.parse("2015-03-29"), Date.today, nil, Date.today - 1.day, '%CURRENT_DATE%']+ .to contain_exactly(Date.parse("2015-03-29"), Date.today, nil, Date.today - 1.day, '%CURRENT_DATE%')endendenddiff --git a/spec/models/custom_option_spec.rb b/spec/models/custom_option_spec.rbindex e52fd2c0366..d5bbbe3583e 100644--- a/spec/models/custom_option_spec.rb+++ b/spec/models/custom_option_spec.rb@@ -79,7 +79,7 @@ RSpec.describe CustomOption doit 'reports an error' doexpect(custom_option.errors[:base])- .to match_array [I18n.t(:'activerecord.errors.models.custom_field.at_least_one_custom_option')]+ .to contain_exactly(I18n.t(:'activerecord.errors.models.custom_field.at_least_one_custom_option'))endit 'does not remove the custom option' dodiff --git a/spec/models/custom_style_spec.rb b/spec/models/custom_style_spec.rbindex ae6c82dca94..153277621a3 100644--- a/spec/models/custom_style_spec.rb+++ b/spec/models/custom_style_spec.rb@@ -34,7 +34,7 @@ RSpec.describe CustomStyle dolet!(:file_path) { custom_style.send(image).file.path }before do- custom_style.send "remove_#{image}"+ custom_style.send :"remove_#{image}"endit 'deletes the file' dodiff --git a/spec/models/enterprise_token_spec.rb b/spec/models/enterprise_token_spec.rbindex 9be7e216337..e3caccc4b73 100644--- a/spec/models/enterprise_token_spec.rb+++ b/spec/models/enterprise_token_spec.rb@@ -113,7 +113,7 @@ RSpec.describe EnterpriseToken doendcontext 'updating it with an invalid token' do- it 'will fail validations' do+ it 'fails validations' dosubject.encoded_token = "bar"expect(subject.save).to be_falseyenddiff --git a/spec/models/issue_priority_spec.rb b/spec/models/issue_priority_spec.rbindex 5873948db0d..0a711708da6 100644--- a/spec/models/issue_priority_spec.rb+++ b/spec/models/issue_priority_spec.rb@@ -89,7 +89,7 @@ RSpec.describe IssuePriority dopriority.transfer_relations(new_priority)expect(new_priority.work_packages.reload)- .to match_array [work_package3, work_package1]+ .to contain_exactly(work_package3, work_package1)endenddiff --git a/spec/models/journable/timestamps_spec.rb b/spec/models/journable/timestamps_spec.rbindex d42da6701de..7356bcf0d20 100644--- a/spec/models/journable/timestamps_spec.rb+++ b/spec/models/journable/timestamps_spec.rb@@ -625,7 +625,7 @@ RSpec.describe Journable::Timestamps doendit 'loads the custom_values relation with the historic values' do- expect(subject.send("custom_field_#{custom_field.id}"))+ expect(subject.send(:"custom_field_#{custom_field.id}")).to eq 'The custom field as it has been on Monday'endenddiff --git a/spec/models/journable/with_historic_attributes_spec.rb b/spec/models/journable/with_historic_attributes_spec.rbindex 726f742a74a..836c6954ae9 100644--- a/spec/models/journable/with_historic_attributes_spec.rb+++ b/spec/models/journable/with_historic_attributes_spec.rb@@ -598,7 +598,7 @@ RSpec.describe Journable::WithHistoricAttributes,context 'for a timestamp where the work package did exist' doit 'returns the changed attributes at the timestamp compared to the current attribute values' doexpect(subject.changed_at_timestamp(Timestamp.parse("2022-01-01T00:00:00Z")))- .to match_array ['subject']+ .to contain_exactly('subject')endcontext 'when the work package includes custom field changes' dodiff --git a/spec/models/journal_spec.rb b/spec/models/journal_spec.rbindex cffa32b6d6f..1083c843a93 100644--- a/spec/models/journal_spec.rb+++ b/spec/models/journal_spec.rb@@ -47,7 +47,7 @@ RSpec.describe Journal doit 'has a notifications association' doexpect(journal.notifications)- .to match_array([notification])+ .to contain_exactly(notification)endit 'destroys the associated notifications upon journal destruction' dodiff --git a/spec/models/news_spec.rb b/spec/models/news_spec.rbindex 9aca488dfb6..7a19b664c00 100644--- a/spec/models/news_spec.rb+++ b/spec/models/news_spec.rb@@ -57,7 +57,7 @@ RSpec.describe News doendit 'includes news elements from projects where news module is enabled' do- expect(described_class.latest).to match_array [news]+ expect(described_class.latest).to contain_exactly(news)endit "doesn't include news elements from projects where news module is not enabled" do@@ -71,7 +71,7 @@ RSpec.describe News docreate(:news, project: private_project)latest_news = described_class.latest(user: User.anonymous)- expect(latest_news).to match_array [news]+ expect(latest_news).to contain_exactly(news)endit 'limits the number of returned news elements' dodiff --git a/spec/models/notifications/scopes/reminder_mail_unsent_spec.rb b/spec/models/notifications/scopes/reminder_mail_unsent_spec.rbindex f3118ad9abb..2036b1ffb94 100644--- a/spec/models/notifications/scopes/reminder_mail_unsent_spec.rb+++ b/spec/models/notifications/scopes/reminder_mail_unsent_spec.rb@@ -44,7 +44,7 @@ RSpec.describe Notifications::Scopes::MailReminderUnsent doit 'contains the notifications with read_mail: false' doexpect(scope)- .to match_array([unread_mail_notification])+ .to contain_exactly(unread_mail_notification)endendenddiff --git a/spec/models/notifications/scopes/unsent_reminders_before_spec.rb b/spec/models/notifications/scopes/unsent_reminders_before_spec.rbindex 0e94b4a5821..d700cde8548 100644--- a/spec/models/notifications/scopes/unsent_reminders_before_spec.rb+++ b/spec/models/notifications/scopes/unsent_reminders_before_spec.rb@@ -63,7 +63,7 @@ RSpec.describe Notifications::Scopes::UnsentRemindersBefore docontext 'with a unread and not reminded notification that was created before the time and for the user' doit 'returns the notification' doexpect(scope)- .to match_array([notification])+ .to contain_exactly(notification)endenddiff --git a/spec/models/notifications/scopes/visible_spec.rb b/spec/models/notifications/scopes/visible_spec.rbindex f6024a9baaf..5bf28505535 100644--- a/spec/models/notifications/scopes/visible_spec.rb+++ b/spec/models/notifications/scopes/visible_spec.rb@@ -60,7 +60,7 @@ RSpec.describe Notifications::Scopes::Visible docontext 'with the user being recipient and being allowed to see the work package' doit 'returns the notification' doexpect(scope)- .to match_array([notification])+ .to contain_exactly(notification)endenddiff --git a/spec/models/placeholder_users/scopes/visible_spec.rb b/spec/models/placeholder_users/scopes/visible_spec.rbindex e68e77d6f0b..e0cab80c604 100644--- a/spec/models/placeholder_users/scopes/visible_spec.rb+++ b/spec/models/placeholder_users/scopes/visible_spec.rb@@ -45,7 +45,7 @@ RSpec.describe PlaceholderUsers::Scopes::Visible docurrent_user { create(:user, member_with_roles: { project => role }) }it 'sees all users' do- expect(subject).to match_array [other_project_placeholder, global_placeholder]+ expect(subject).to contain_exactly(other_project_placeholder, global_placeholder)endend@@ -53,7 +53,7 @@ RSpec.describe PlaceholderUsers::Scopes::Visible docurrent_user { create(:user, member_with_permissions: { other_project => %i[view_work_packages] }) }it 'sees the other user in the same project' do- expect(subject).to match_array [other_project_placeholder]+ expect(subject).to contain_exactly(other_project_placeholder)endend@@ -61,7 +61,7 @@ RSpec.describe PlaceholderUsers::Scopes::Visible docurrent_user { create(:user) }it 'sees nothing' do- expect(subject).to match_array []+ expect(subject).to be_emptyendendenddiff --git a/spec/models/principals/scopes/like_spec.rb b/spec/models/principals/scopes/like_spec.rbindex 06484eb9734..df9f3f223f4 100644--- a/spec/models/principals/scopes/like_spec.rb+++ b/spec/models/principals/scopes/like_spec.rb@@ -57,22 +57,22 @@ RSpec.describe Principals::Scopes::Like doit 'finds by login' doexpect(Principal.like('login'))- .to match_array [login, login2]+ .to contain_exactly(login, login2)endit 'finds by firstname' doexpect(Principal.like('firstname'))- .to match_array [firstname, firstname2]+ .to contain_exactly(firstname, firstname2)endit 'finds by lastname' doexpect(Principal.like('lastname'))- .to match_array [lastname, lastname2]+ .to contain_exactly(lastname, lastname2)endit 'finds by mail' doexpect(Principal.like('mail'))- .to match_array [mail, mail2]+ .to contain_exactly(mail, mail2)endendenddiff --git a/spec/models/projects/project_acts_as_journalized_spec.rb b/spec/models/projects/project_acts_as_journalized_spec.rbindex 52c3ba276d1..f8650063c0c 100644--- a/spec/models/projects/project_acts_as_journalized_spec.rb+++ b/spec/models/projects/project_acts_as_journalized_spec.rb@@ -46,32 +46,32 @@ RSpec.describe Project, 'acts_as_journalized' doit 'notes the changes to name' doexpect(Journal.first.details[:name])- .to match_array [nil, project.name]+ .to contain_exactly(nil, project.name)endit 'notes the changes to description' doexpect(Journal.first.details[:description])- .to match_array [nil, project.description]+ .to contain_exactly(nil, project.description)endit 'notes the changes to public flag' doexpect(Journal.first.details[:public])- .to match_array [nil, project.public]+ .to contain_exactly(nil, project.public)endit 'notes the changes to identifier' doexpect(Journal.first.details[:identifier])- .to match_array [nil, project.identifier]+ .to contain_exactly(nil, project.identifier)endit 'notes the changes to active flag' doexpect(Journal.first.details[:active])- .to match_array [nil, project.active]+ .to contain_exactly(nil, project.active)endit 'notes the changes to template flag' doexpect(Journal.first.details[:templated])- .to match_array [nil, project.templated]+ .to contain_exactly(nil, project.templated)endit 'has the timestamp of the project update time for created_at' dodiff --git a/spec/models/queries/members/filters/principal_filter_spec.rb b/spec/models/queries/members/filters/principal_filter_spec.rbindex 92ca732bd04..abc177c964b 100644--- a/spec/models/queries/members/filters/principal_filter_spec.rb+++ b/spec/models/queries/members/filters/principal_filter_spec.rb@@ -35,9 +35,6 @@ RSpec.describe Queries::Members::Filters::PrincipalFilter dobefore dologin_as(current_user)- end-- before doprincipal_scope = double('principal scope')allow(Principal)diff --git a/spec/models/queries/principals/principal_query_integrations_spec.rb b/spec/models/queries/principals/principal_query_integrations_spec.rbindex 82f11e9f5dd..efdcabf81c0 100644--- a/spec/models/queries/principals/principal_query_integrations_spec.rb+++ b/spec/models/queries/principals/principal_query_integrations_spec.rb@@ -69,7 +69,7 @@ RSpec.describe Queries::Principals::PrincipalQuery, 'integration' doit 'returns all principals being member' doexpect(instance.results)- .to match_array [project_user]+ .to contain_exactly(project_user)endend@@ -80,7 +80,7 @@ RSpec.describe Queries::Principals::PrincipalQuery, 'integration' doit 'returns all principals not being member' doexpect(instance.results)- .to match_array [current_user, other_project_user]+ .to contain_exactly(current_user, other_project_user)endendenddiff --git a/spec/models/queries/projects/filters/type_filter_spec.rb b/spec/models/queries/projects/filters/type_filter_spec.rbindex 5b445b7c07a..33c81fe3d5d 100644--- a/spec/models/queries/projects/filters/type_filter_spec.rb+++ b/spec/models/queries/projects/filters/type_filter_spec.rb@@ -44,7 +44,7 @@ RSpec.describe Queries::Projects::Filters::TypeFilter dodescribe '#allowed_values' doit 'is a list of the possible values' do- expect(instance.allowed_values).to match_array([['Foo', '1234']])+ expect(instance.allowed_values).to contain_exactly(['Foo', '1234'])endendenddiff --git a/spec/models/queries/scopes/visible_spec.rb b/spec/models/queries/scopes/visible_spec.rbindex 29deb7d6e64..06ca67c0b05 100644--- a/spec/models/queries/scopes/visible_spec.rb+++ b/spec/models/queries/scopes/visible_spec.rb@@ -91,7 +91,7 @@ RSpec.describe Queries::Scopes::Visible docontext 'with the user having the :view_work_packages permission' doit 'returns the queries that are public or that are the user`s' doexpect(scope)- .to match_array([private_user_query, public_query, global_user_query, global_other_user_public_query])+ .to contain_exactly(private_user_query, public_query, global_user_query, global_other_user_public_query)endenddiff --git a/spec/models/queries/work_packages/filter/attachment_content_filter_spec.rb b/spec/models/queries/work_packages/filter/attachment_content_filter_spec.rbindex 33cc50b0e99..167bd8592f6 100644--- a/spec/models/queries/work_packages/filter/attachment_content_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/attachment_content_filter_spec.rb@@ -52,7 +52,7 @@ RSpec.describe Queries::WorkPackages::Filter::AttachmentContentFilter doperform_enqueued_jobsexpect(WorkPackage.joins(instance.joins).where(instance.where))- .to match_array [work_package]+ .to contain_exactly(work_package)endend@@ -79,7 +79,7 @@ RSpec.describe Queries::WorkPackages::Filter::AttachmentContentFilter doinstance.valid_values!expect(instance.values)- .to match_array ['none', 'is', 'changed']+ .to contain_exactly('none', 'is', 'changed')endenddiff --git a/spec/models/queries/work_packages/filter/attachment_file_name_filter_spec.rb b/spec/models/queries/work_packages/filter/attachment_file_name_filter_spec.rbindex d19363f9cfa..be4b7acced0 100644--- a/spec/models/queries/work_packages/filter/attachment_file_name_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/attachment_file_name_filter_spec.rb@@ -53,7 +53,7 @@ RSpec.describe Queries::WorkPackages::Filter::AttachmentFileNameFilter doinstance.valid_values!expect(instance.values)- .to match_array ['none', 'is', 'changed']+ .to contain_exactly('none', 'is', 'changed')endenddiff --git a/spec/models/queries/work_packages/filter/author_filter_spec.rb b/spec/models/queries/work_packages/filter/author_filter_spec.rbindex a76987266dc..b31a4f6b268 100644--- a/spec/models/queries/work_packages/filter/author_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/author_filter_spec.rb@@ -107,8 +107,7 @@ RSpec.describe Queries::WorkPackages::Filter::AuthorFilter do.and_return([[nil, user_1.id.to_s]])expect(instance.allowed_values)- .to match_array([[I18n.t(:label_me), 'me'],- [nil, user_1.id.to_s]])+ .to contain_exactly([I18n.t(:label_me), 'me'], [nil, user_1.id.to_s])endend@@ -121,7 +120,7 @@ RSpec.describe Queries::WorkPackages::Filter::AuthorFilter do.and_return([[nil, user_1.id.to_s]])expect(instance.allowed_values)- .to match_array([[nil, user_1.id.to_s]])+ .to contain_exactly([nil, user_1.id.to_s])endendenddiff --git a/spec/models/queries/work_packages/filter/category_filter_spec.rb b/spec/models/queries/work_packages/filter/category_filter_spec.rbindex 1ba52b99104..f1e83ad435c 100644--- a/spec/models/queries/work_packages/filter/category_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/category_filter_spec.rb@@ -74,7 +74,7 @@ RSpec.describe Queries::WorkPackages::Filter::CategoryFilter doit 'returns an array of type options' doexpect(instance.allowed_values)- .to match_array [[category.name, category.id.to_s]]+ .to contain_exactly([category.name, category.id.to_s])endend@@ -92,7 +92,7 @@ RSpec.describe Queries::WorkPackages::Filter::CategoryFilter doit 'returns an array of category' doexpect(instance.value_objects)- .to match_array [category2]+ .to contain_exactly(category2)endenddiff --git a/spec/models/queries/work_packages/filter/comment_filter_spec.rb b/spec/models/queries/work_packages/filter/comment_filter_spec.rbindex 1eb458c8ed6..fb1bdcdd184 100644--- a/spec/models/queries/work_packages/filter/comment_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/comment_filter_spec.rb@@ -52,7 +52,7 @@ RSpec.describe Queries::WorkPackages::Filter::CommentFilter doinstance.valid_values!expect(instance.values)- .to match_array ['none', 'is', 'changed']+ .to contain_exactly('none', 'is', 'changed')endenddiff --git a/spec/models/queries/work_packages/filter/custom_fields/contains_text_custom_field_filter_spec.rb b/spec/models/queries/work_packages/filter/custom_fields/contains_text_custom_field_filter_spec.rbindex adb988939a1..ecd7b85ca73 100644--- a/spec/models/queries/work_packages/filter/custom_fields/contains_text_custom_field_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/custom_fields/contains_text_custom_field_filter_spec.rb@@ -80,7 +80,7 @@ RSpec.describe Queries::WorkPackages::Filter::CustomFieldFilter,it 'returns the one matching work package' doexpect(subject)- .to match_array [wp_contains]+ .to contain_exactly(wp_contains)endend@@ -89,7 +89,7 @@ RSpec.describe Queries::WorkPackages::Filter::CustomFieldFilter,it 'returns the three non-matching work package' doexpect(subject)- .to match_array [wp_not_contains, wp_empty, wp_nil]+ .to contain_exactly(wp_not_contains, wp_empty, wp_nil)endendenddiff --git a/spec/models/queries/work_packages/filter/description_filter_spec.rb b/spec/models/queries/work_packages/filter/description_filter_spec.rbindex f4cb3dd1358..e3b2bfdb261 100644--- a/spec/models/queries/work_packages/filter/description_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/description_filter_spec.rb@@ -52,7 +52,7 @@ RSpec.describe Queries::WorkPackages::Filter::DescriptionFilter doinstance.valid_values!expect(instance.values)- .to match_array ['none', 'is', 'changed']+ .to contain_exactly('none', 'is', 'changed')endenddiff --git a/spec/models/queries/work_packages/filter/duration_filter_spec.rb b/spec/models/queries/work_packages/filter/duration_filter_spec.rbindex dcf402e13d0..fda515ab51a 100644--- a/spec/models/queries/work_packages/filter/duration_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/duration_filter_spec.rb@@ -63,12 +63,12 @@ RSpec.describe Queries::WorkPackages::Filter::DurationFilter doendit 'finds zero and none values also including milestones' do- expect(subject).to match_array [work_package_zero_duration, work_package_no_duration, work_package_with_milestone]+ expect(subject).to contain_exactly(work_package_zero_duration, work_package_no_duration, work_package_with_milestone)endendit 'does not returns milestone work packages' do- expect(subject).to match_array [work_package_with_duration]+ expect(subject).to contain_exactly(work_package_with_duration)endendenddiff --git a/spec/models/queries/work_packages/filter/estimated_hours_filter_spec.rb b/spec/models/queries/work_packages/filter/estimated_hours_filter_spec.rbindex 9cfae180147..6cf763e9f85 100644--- a/spec/models/queries/work_packages/filter/estimated_hours_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/estimated_hours_filter_spec.rb@@ -58,7 +58,7 @@ RSpec.describe Queries::WorkPackages::Filter::EstimatedHoursFilter doendit 'finds zero and none values' do- expect(WorkPackage.where(instance.where)).to match_array [work_package_zero_hour, work_package_no_hours]+ expect(WorkPackage.where(instance.where)).to contain_exactly(work_package_zero_hour, work_package_no_hours)endendenddiff --git a/spec/models/queries/work_packages/filter/group_filter_spec.rb b/spec/models/queries/work_packages/filter/group_filter_spec.rbindex c3a341c8af4..5be366010b3 100644--- a/spec/models/queries/work_packages/filter/group_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/group_filter_spec.rb@@ -63,7 +63,7 @@ RSpec.describe Queries::WorkPackages::Filter::GroupFilter doit 'is an array of group values' doexpect(instance.allowed_values)- .to match_array [[group.name, group.id.to_s]]+ .to contain_exactly([group.name, group.id.to_s])endend@@ -87,7 +87,7 @@ RSpec.describe Queries::WorkPackages::Filter::GroupFilter doit 'returns an array of groups' doexpect(instance.value_objects)- .to match_array([group2])+ .to contain_exactly(group2)endendenddiff --git a/spec/models/queries/work_packages/filter/id_filter_spec.rb b/spec/models/queries/work_packages/filter/id_filter_spec.rbindex 975df2cfa8e..4ebcc8e0d04 100644--- a/spec/models/queries/work_packages/filter/id_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/id_filter_spec.rb@@ -43,7 +43,7 @@ RSpec.describe Queries::WorkPackages::Filter::IdFilter doit 'filters' doexpect(WorkPackage.where(instance.where))- .to match_array [visible_wp]+ .to contain_exactly(visible_wp)endendenddiff --git a/spec/models/queries/work_packages/filter/manual_sort_filter_spec.rb b/spec/models/queries/work_packages/filter/manual_sort_filter_spec.rbindex 1ac6b4dbf1b..6b5079f7605 100644--- a/spec/models/queries/work_packages/filter/manual_sort_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/manual_sort_filter_spec.rb@@ -43,7 +43,7 @@ RSpec.describe Queries::WorkPackages::Filter::ManualSortFilter dodescribe '#where' doit 'filters based on the manual sort order' doexpect(WorkPackage.where(instance.where))- .to match_array [in_order2, in_order]+ .to contain_exactly(in_order2, in_order)endendenddiff --git a/spec/models/queries/work_packages/filter/parent_filter_spec.rb b/spec/models/queries/work_packages/filter/parent_filter_spec.rbindex 084597cc205..58c294a323a 100644--- a/spec/models/queries/work_packages/filter/parent_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/parent_filter_spec.rb@@ -114,7 +114,7 @@ RSpec.describe Queries::WorkPackages::Filter::ParentFilter do.and_return([visible_wp])expect(instance.value_objects)- .to match_array [visible_wp]+ .to contain_exactly(visible_wp)endcontext "with the 'templated' value" do@@ -161,7 +161,7 @@ RSpec.describe Queries::WorkPackages::Filter::ParentFilter doinstance.valid_values!expect(instance.values)- .to match_array [visible_wp.id.to_s]+ .to contain_exactly(visible_wp.id.to_s)endend@@ -181,7 +181,7 @@ RSpec.describe Queries::WorkPackages::Filter::ParentFilter doinstance.valid_values!expect(instance.values)- .to match_array [visible_wp.id.to_s]+ .to contain_exactly(visible_wp.id.to_s)endendend@@ -282,7 +282,7 @@ RSpec.describe Queries::WorkPackages::Filter::ParentFilter do.where(instance.where)expect(scope)- .to match_array [visible_wp]+ .to contain_exactly(visible_wp)endendenddiff --git a/spec/models/queries/work_packages/filter/principal_loader_spec.rb b/spec/models/queries/work_packages/filter/principal_loader_spec.rbindex 63a392bc86b..029f4a6bdf5 100644--- a/spec/models/queries/work_packages/filter/principal_loader_spec.rb+++ b/spec/models/queries/work_packages/filter/principal_loader_spec.rb@@ -44,7 +44,7 @@ RSpec.describe Queries::WorkPackages::Filter::PrincipalLoader dodescribe '#user_values' doit 'returns a user array' do- expect(instance.user_values).to match_array([[nil, user.id.to_s]])+ expect(instance.user_values).to contain_exactly([nil, user.id.to_s])endit 'is empty if no user exists' do@@ -58,7 +58,7 @@ RSpec.describe Queries::WorkPackages::Filter::PrincipalLoader dodescribe '#group_values' doit 'returns a group array' do- expect(instance.group_values).to match_array([[nil, group.id.to_s]])+ expect(instance.group_values).to contain_exactly([nil, group.id.to_s])endit 'is empty if no group exists' do@@ -73,9 +73,7 @@ RSpec.describe Queries::WorkPackages::Filter::PrincipalLoader dodescribe '#principal_values' doit 'returns an array of principals as [name, id]' doexpect(instance.principal_values)- .to match_array([[nil, group.id.to_s],- [nil, user.id.to_s],- [nil, placeholder_user.id.to_s]])+ .to contain_exactly([nil, group.id.to_s], [nil, user.id.to_s], [nil, placeholder_user.id.to_s])endit 'is empty if no principal exists' do@@ -105,7 +103,7 @@ RSpec.describe Queries::WorkPackages::Filter::PrincipalLoader dodescribe '#user_values' doit 'returns a user array' do- expect(instance.user_values).to match_array([[nil, user.id.to_s]])+ expect(instance.user_values).to contain_exactly([nil, user.id.to_s])endcontext 'if no user exists' do@@ -119,7 +117,7 @@ RSpec.describe Queries::WorkPackages::Filter::PrincipalLoader dodescribe '#group_values' doit 'returns a group array' do- expect(instance.group_values).to match_array([[nil, group.id.to_s]])+ expect(instance.group_values).to contain_exactly([nil, group.id.to_s])endcontext 'if no group exists' do@@ -134,9 +132,7 @@ RSpec.describe Queries::WorkPackages::Filter::PrincipalLoader dodescribe '#principal_values' doit 'returns an array of principals as [name, id]' doexpect(instance.principal_values)- .to match_array([[nil, group.id.to_s],- [nil, user.id.to_s],- [nil, placeholder_user.id.to_s]])+ .to contain_exactly([nil, group.id.to_s], [nil, user.id.to_s], [nil, placeholder_user.id.to_s])endcontext 'if no principals exist' dodiff --git a/spec/models/queries/work_packages/filter/priority_filter_spec.rb b/spec/models/queries/work_packages/filter/priority_filter_spec.rbindex 4e6e9c45711..ee3e02d0abe 100644--- a/spec/models/queries/work_packages/filter/priority_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/priority_filter_spec.rb@@ -62,7 +62,7 @@ RSpec.describe Queries::WorkPackages::Filter::PriorityFilter doit 'is an array of group values' doexpect(instance.allowed_values)- .to match_array [[priority.name, priority.id.to_s]]+ .to contain_exactly([priority.name, priority.id.to_s])endend@@ -86,7 +86,7 @@ RSpec.describe Queries::WorkPackages::Filter::PriorityFilter doit 'returns an array of priorities' doexpect(instance.value_objects)- .to match_array([priority2])+ .to contain_exactly(priority2)endendenddiff --git a/spec/models/queries/work_packages/filter/project_filter_spec.rb b/spec/models/queries/work_packages/filter/project_filter_spec.rbindex 3fec5cbb11c..8f9946ef221 100644--- a/spec/models/queries/work_packages/filter/project_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/project_filter_spec.rb@@ -99,8 +99,7 @@ RSpec.describe Queries::WorkPackages::Filter::ProjectFilter do.and_yield(child, 1)expect(instance.allowed_values)- .to match_array [[parent.name, parent.id.to_s],- ["-- #{child.name}", child.id.to_s]]+ .to contain_exactly([parent.name, parent.id.to_s], ["-- #{child.name}", child.id.to_s])endend@@ -124,7 +123,7 @@ RSpec.describe Queries::WorkPackages::Filter::ProjectFilter doit 'returns an array of projects' doexpect(instance.value_objects)- .to match_array([selected])+ .to contain_exactly(selected)endcontext 'with a visible child' do@@ -133,7 +132,7 @@ RSpec.describe Queries::WorkPackages::Filter::ProjectFilter doit 'still only returns the parent object' doexpect(instance.value_objects)- .to match_array([selected])+ .to contain_exactly(selected)endendenddiff --git a/spec/models/queries/work_packages/filter/search_filter_spec.rb b/spec/models/queries/work_packages/filter/search_filter_spec.rbindex 96228dbf462..8f03344563c 100644--- a/spec/models/queries/work_packages/filter/search_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/search_filter_spec.rb@@ -48,13 +48,13 @@ RSpec.describe Queries::WorkPackages::Filter::SearchFilter doit 'finds in subject' doinstance.values = ['bogus subject']expect(subject)- .to match_array [work_package]+ .to contain_exactly(work_package)endit 'finds in description' doinstance.values = ['short description']expect(subject)- .to match_array [work_package]+ .to contain_exactly(work_package)endit 'finds in comments' do@@ -63,7 +63,7 @@ RSpec.describe Queries::WorkPackages::Filter::SearchFilter doinstance.values = [journal.notes]expect(subject)- .to match_array [work_package]+ .to contain_exactly(work_package)endendend@@ -76,7 +76,7 @@ RSpec.describe Queries::WorkPackages::Filter::SearchFilter doit 'finds in subject' doinstance.values = ['big cat']expect(subject)- .to match_array [work_package]+ .to contain_exactly(work_package)endend@@ -88,7 +88,7 @@ RSpec.describe Queries::WorkPackages::Filter::SearchFilter doit 'does not match a partial result currently' doinstance.values = ['big cat']expect(subject)- .to match_array []+ .to be_emptyendend@@ -114,7 +114,7 @@ RSpec.describe Queries::WorkPackages::Filter::SearchFilter doinstance.values = ['ipsum']expect(WorkPackage.joins(instance.joins).where(instance.where))- .to match_array [work_package]+ .to contain_exactly(work_package)endit "finds in attachment file name" do@@ -122,7 +122,7 @@ RSpec.describe Queries::WorkPackages::Filter::SearchFilter doinstance.values = [filename]expect(WorkPackage.joins(instance.joins).where(instance.where))- .to match_array [work_package]+ .to contain_exactly(work_package)endend@@ -148,7 +148,7 @@ RSpec.describe Queries::WorkPackages::Filter::SearchFilter doinstance.values = ['plaintext']expect(WorkPackage.joins(instance.joins).where(instance.where).pluck(:id))- .to match_array [work_package.id]+ .to contain_exactly(work_package.id)endendend@@ -177,7 +177,7 @@ RSpec.describe Queries::WorkPackages::Filter::SearchFilter doinstance.valid_values!expect(instance.values)- .to match_array ['none', 'is', 'changed']+ .to contain_exactly('none', 'is', 'changed')endenddiff --git a/spec/models/queries/work_packages/filter/status_filter_spec.rb b/spec/models/queries/work_packages/filter/status_filter_spec.rbindex e478cff57d3..d198b2b61ed 100644--- a/spec/models/queries/work_packages/filter/status_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/status_filter_spec.rb@@ -63,7 +63,7 @@ RSpec.describe Queries::WorkPackages::Filter::StatusFilter doit 'is an array of status values' doexpect(instance.allowed_values)- .to match_array [[status.name, status.id.to_s]]+ .to contain_exactly([status.name, status.id.to_s])endend@@ -79,7 +79,7 @@ RSpec.describe Queries::WorkPackages::Filter::StatusFilter doit 'remove the invalid value' doinstance.valid_values!- expect(instance.values).to match_array [status.id.to_s]+ expect(instance.values).to contain_exactly(status.id.to_s)endend@@ -94,7 +94,7 @@ RSpec.describe Queries::WorkPackages::Filter::StatusFilter doinstance.values = [status.id.to_s]expect(instance.value_objects)- .to match_array [status]+ .to contain_exactly(status)endenddiff --git a/spec/models/queries/work_packages/filter/subject_filter_spec.rb b/spec/models/queries/work_packages/filter/subject_filter_spec.rbindex 5192efcfae0..1c04a6e72e2 100644--- a/spec/models/queries/work_packages/filter/subject_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/subject_filter_spec.rb@@ -52,7 +52,7 @@ RSpec.describe Queries::WorkPackages::Filter::SubjectFilter doinstance.valid_values!expect(instance.values)- .to match_array ['none', 'is', 'changed']+ .to contain_exactly('none', 'is', 'changed')endenddiff --git a/spec/models/queries/work_packages/filter/subproject_filter_spec.rb b/spec/models/queries/work_packages/filter/subproject_filter_spec.rbindex f8422f22747..f79d42576f6 100644--- a/spec/models/queries/work_packages/filter/subproject_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/subproject_filter_spec.rb@@ -114,8 +114,8 @@ RSpec.describe Queries::WorkPackages::Filter::SubprojectFilter dolet(:projects) { [subproject1, subproject2] }it 'returns a list of all visible descendants' do- expect(instance.allowed_values).to match_array [[subproject1.name, subproject1.id.to_s],- [subproject2.name, subproject2.id.to_s]]+ expect(instance.allowed_values).to contain_exactly([subproject1.name, subproject1.id.to_s],+ [subproject2.name, subproject2.id.to_s])endenddiff --git a/spec/models/queries/work_packages/filter/type_filter_spec.rb b/spec/models/queries/work_packages/filter/type_filter_spec.rbindex 0dbbe8d7cfc..4d87c724c89 100644--- a/spec/models/queries/work_packages/filter/type_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/type_filter_spec.rb@@ -89,7 +89,7 @@ RSpec.describe Queries::WorkPackages::Filter::TypeFilter doit 'returns an array of type options' doexpect(instance.allowed_values)- .to match_array [[type.name, type.id.to_s]]+ .to contain_exactly([type.name, type.id.to_s])endend@@ -104,7 +104,7 @@ RSpec.describe Queries::WorkPackages::Filter::TypeFilter doit 'returns an array of type options' doexpect(instance.allowed_values)- .to match_array [[type.name, type.id.to_s]]+ .to contain_exactly([type.name, type.id.to_s])endendend@@ -130,7 +130,7 @@ RSpec.describe Queries::WorkPackages::Filter::TypeFilter doit 'returns an array of types' doexpect(instance.value_objects)- .to match_array([type1, type2])+ .to contain_exactly(type1, type2)endendenddiff --git a/spec/models/queries/work_packages/filter/version_filter_spec.rb b/spec/models/queries/work_packages/filter/version_filter_spec.rbindex 07981944b3d..e9e4eff6b58 100644--- a/spec/models/queries/work_packages/filter/version_filter_spec.rb+++ b/spec/models/queries/work_packages/filter/version_filter_spec.rb@@ -85,7 +85,7 @@ RSpec.describe Queries::WorkPackages::Filter::VersionFilter docontext 'within a project' dobefore doexpect(instance.allowed_values)- .to match_array [[version.id.to_s, version.id.to_s]]+ .to contain_exactly([version.id.to_s, version.id.to_s])endend@@ -94,7 +94,7 @@ RSpec.describe Queries::WorkPackages::Filter::VersionFilter dobefore doexpect(instance.allowed_values)- .to match_array [[version.id.to_s, version.id.to_s]]+ .to contain_exactly([version.id.to_s, version.id.to_s])endendend@@ -120,7 +120,7 @@ RSpec.describe Queries::WorkPackages::Filter::VersionFilter doit 'returns an array of versions' doexpect(instance.value_objects)- .to match_array([version1])+ .to contain_exactly(version1)endendenddiff --git a/spec/models/query/results_subject_filter_integration_spec.rb b/spec/models/query/results_subject_filter_integration_spec.rbindex 57279276f86..6a5817d8fc1 100644--- a/spec/models/query/results_subject_filter_integration_spec.rb+++ b/spec/models/query/results_subject_filter_integration_spec.rb@@ -82,7 +82,7 @@ RSpec.describe Query::Results, 'Subject filter integration' doit 'returns the work packages containing the string regardless of order' doexpect(query_results.work_packages)- .to match_array [contains_wp, contains_reversed_wp]+ .to contain_exactly(contains_wp, contains_reversed_wp)endend@@ -92,7 +92,7 @@ RSpec.describe Query::Results, 'Subject filter integration' doit 'returns the work packages not containing the string regardless of order' doexpect(query_results.work_packages)- .to match_array [not_contains_wp, partially_contains_wp]+ .to contain_exactly(not_contains_wp, partially_contains_wp)endendenddiff --git a/spec/models/relations/scopes/visible_spec.rb b/spec/models/relations/scopes/visible_spec.rbindex 02604bfb301..9c9f5731c0d 100644--- a/spec/models/relations/scopes/visible_spec.rb+++ b/spec/models/relations/scopes/visible_spec.rb@@ -62,7 +62,7 @@ RSpec.describe Relations::Scopes::Visible doit 'returns the relations' doexpect(Relation.visible(user))- .to match_array([relation1, relation2])+ .to contain_exactly(relation1, relation2)endend@@ -73,7 +73,7 @@ RSpec.describe Relations::Scopes::Visible doit 'returns the relation within the one project' doexpect(Relation.visible(user))- .to match_array([relation1])+ .to contain_exactly(relation1)endenddiff --git a/spec/models/type_spec.rb b/spec/models/type_spec.rbindex c83db94cfe8..8287ccc3456 100644--- a/spec/models/type_spec.rb+++ b/spec/models/type_spec.rb@@ -42,7 +42,7 @@ RSpec.describe Type doendit 'returns the types enabled in the provided project' do- expect(Type.enabled_in(project)).to match_array([type])+ expect(Type.enabled_in(project)).to contain_exactly(type)endenddiff --git a/spec/models/types/scopes/milestone_spec.rb b/spec/models/types/scopes/milestone_spec.rbindex 622b5242509..aaf33ba623d 100644--- a/spec/models/types/scopes/milestone_spec.rb+++ b/spec/models/types/scopes/milestone_spec.rb@@ -37,7 +37,7 @@ RSpec.describe Types::Scopes::Milestone doit 'returns only milestones' doexpect(subject)- .to match_array [milestone]+ .to contain_exactly(milestone)endendenddiff --git a/spec/models/user_preference_spec.rb b/spec/models/user_preference_spec.rbindex 6e994116e4f..94a18fd3c4b 100644--- a/spec/models/user_preference_spec.rb+++ b/spec/models/user_preference_spec.rb@@ -224,7 +224,7 @@ RSpec.describe UserPreference dodescribe '[]=' dolet(:user) { create(:user) }- it 'will save the values on sending "save"' do+ it 'saves the values on sending "save"' dosubject.savevalue_warn_on_leaving_unsaved = !subject[:warn_on_leaving_unsaved]diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rbindex e8d02f79153..b4e9431ab4b 100644--- a/spec/models/user_spec.rb+++ b/spec/models/user_spec.rb@@ -797,10 +797,10 @@ RSpec.describe User doexpect([user1.id, user2.id]).to include(match2.id)matches = described_class.where_mail_with_suffix('[email protected]')- expect(matches.pluck(:id)).to match_array [user1.id, user2.id]+ expect(matches.pluck(:id)).to contain_exactly(user1.id, user2.id)matches = described_class.where_mail_with_suffix('[email protected]')- expect(matches.pluck(:id)).to match_array [user1.id]+ expect(matches.pluck(:id)).to contain_exactly(user1.id)endend@@ -816,7 +816,7 @@ RSpec.describe User doexpect([user1.id, user2.id, user3.id]).to include(match2.id)matches = described_class.where_mail_with_suffix('[email protected]')- expect(matches.pluck(:id)).to match_array [user1.id, user2.id, user3.id]+ expect(matches.pluck(:id)).to contain_exactly(user1.id, user2.id, user3.id)endendenddiff --git a/spec/models/users/scopes/having_reminder_mail_to_send_spec.rb b/spec/models/users/scopes/having_reminder_mail_to_send_spec.rbindex 285198faa38..e4719942d37 100644--- a/spec/models/users/scopes/having_reminder_mail_to_send_spec.rb+++ b/spec/models/users/scopes/having_reminder_mail_to_send_spec.rb@@ -80,7 +80,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' docontext 'for a user whose local time is matching the configured time' doit 'contains the user' doexpect(scope)- .to match_array([paris_user])+ .to contain_exactly(paris_user)endend@@ -135,7 +135,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' doit 'contains the user' doexpect(scope)- .to match_array([paris_user])+ .to contain_exactly(paris_user)endend@@ -179,7 +179,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' doit 'contains the user' doexpect(scope)- .to match_array([hawaii_user])+ .to contain_exactly(hawaii_user)endcontext 'when the user disables Wednesday as a workday' do@@ -217,7 +217,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' doit 'contains the user' doexpect(scope)- .to match_array([hawaii_user])+ .to contain_exactly(hawaii_user)endendend@@ -249,7 +249,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' doit 'contains the user' doexpect(scope)- .to match_array([samoa_user])+ .to contain_exactly(samoa_user)endcontext 'when the user disables Wednesday as a workday' do@@ -283,7 +283,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' doit 'contains the user' doexpect(scope)- .to match_array([moscow_user])+ .to contain_exactly(moscow_user)endend@@ -301,7 +301,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' doit 'contains the user' doexpect(scope)- .to match_array([paris_user])+ .to contain_exactly(paris_user)endend@@ -319,7 +319,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' doit 'contains the user' doexpect(scope)- .to match_array([paris_user])+ .to contain_exactly(paris_user)endend@@ -381,7 +381,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' doit 'contains the user' doexpect(scope)- .to match_array([paris_user])+ .to contain_exactly(paris_user)endend@@ -428,7 +428,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' doit 'contains the user' doexpect(scope)- .to match_array([kathmandu_user])+ .to contain_exactly(kathmandu_user)endend@@ -569,7 +569,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' doit 'is including the user as Etc/UTC is assumed' doexpect(scope)- .to match_array([paris_user])+ .to contain_exactly(paris_user)endend@@ -590,7 +590,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' doit 'is including the user as Etc/UTC is assumed' doexpect(scope)- .to match_array([paris_user])+ .to contain_exactly(paris_user)endend@@ -606,7 +606,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' doit 'is including the user as Etc/UTC at 08:00 is assumed' doexpect(scope)- .to match_array([paris_user])+ .to contain_exactly(paris_user)endend@@ -648,7 +648,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' doit 'is including the configured default timezone is assumed' doexpect(scope)- .to match_array([moscow_user])+ .to contain_exactly(moscow_user)endend@@ -671,7 +671,7 @@ RSpec.describe User, '.having_reminder_mail_to_send' doit 'is including the user as Etc/UTC at 08:00 is assumed' doexpect(scope)- .to match_array([paris_user])+ .to contain_exactly(paris_user)endenddiff --git a/spec/models/version_spec.rb b/spec/models/version_spec.rbindex c898927fe9a..485a96b6113 100644--- a/spec/models/version_spec.rb+++ b/spec/models/version_spec.rb@@ -87,7 +87,7 @@ RSpec.describe Version doversion.sharing = 'system'version.save!- expect(described_class.systemwide).to match_array [version]+ expect(described_class.systemwide).to contain_exactly(version)endit 'is empty if the version is not shared' do@@ -258,52 +258,41 @@ RSpec.describe Version doit 'returns project the version is defined in for unshared' dounshared_version.save- expect(unshared_version.projects).to match_array([parent_project])+ expect(unshared_version.projects).to contain_exactly(parent_project)endit 'returns all projects the version is shared with (hierarchy)' dohierarchy_shared_version.save!- expect(hierarchy_shared_version.projects).to match_array([grand_parent_project,- parent_project,- child_project,- sibling_project])+ expect(hierarchy_shared_version.projects).to contain_exactly(grand_parent_project, parent_project, child_project,+ sibling_project)endit 'returns all projects the version is shared with (descendants)' dodescendants_shared_version.save!- expect(descendants_shared_version.projects).to match_array([parent_project,- child_project,- sibling_project])+ expect(descendants_shared_version.projects).to contain_exactly(parent_project, child_project, sibling_project)endit 'returns all projects the version is shared with (tree)' dotree_shared_version.save!- expect(tree_shared_version.projects).to match_array([grand_parent_project,- parent_project,- sibling_parent_project,- child_project,- sibling_project])+ expect(tree_shared_version.projects).to contain_exactly(grand_parent_project, parent_project, sibling_parent_project,+ child_project, sibling_project)endit 'returns all projects the version is shared with (system)' dosystem_shared_version.save!- expect(system_shared_version.projects).to match_array([grand_parent_project,- parent_project,- sibling_parent_project,- child_project,- sibling_project,- unrelated_project])+ expect(system_shared_version.projects).to contain_exactly(grand_parent_project, parent_project, sibling_parent_project,+ child_project, sibling_project, unrelated_project)endit 'returns only the projects for the version although there is a system shared version' dounshared_version.savesystem_shared_version.save!- expect(unshared_version.projects).to match_array([parent_project])+ expect(unshared_version.projects).to contain_exactly(parent_project)endenddiff --git a/spec/models/versions/scopes/rolled_up_spec.rb b/spec/models/versions/scopes/rolled_up_spec.rbindex 2f2e320255d..01c9b0b6161 100644--- a/spec/models/versions/scopes/rolled_up_spec.rb+++ b/spec/models/versions/scopes/rolled_up_spec.rb@@ -43,14 +43,14 @@ RSpec.describe Versions::Scopes::RolledUp dodescribe '.rolled_up' doit 'includes versions of self and all descendants' doexpect(project.rolled_up_versions)- .to match_array [version, child_version, grand_child_version]+ .to contain_exactly(version, child_version, grand_child_version)endit 'excludes versions from inactive projects' dogrand_child_project.update(active: false)expect(project.rolled_up_versions)- .to match_array [version, child_version]+ .to contain_exactly(version, child_version)endendenddiff --git a/spec/models/versions/scopes/shared_with_spec.rb b/spec/models/versions/scopes/shared_with_spec.rbindex afaace78930..8ba486266d1 100644--- a/spec/models/versions/scopes/shared_with_spec.rb+++ b/spec/models/versions/scopes/shared_with_spec.rb@@ -44,7 +44,7 @@ RSpec.describe Versions::Scopes::SharedWith doit 'is visible within the original project' doexpect(Version.shared_with(project))- .to match_array [version]+ .to contain_exactly(version)endit 'is not visible in any other project' do@@ -69,7 +69,7 @@ RSpec.describe Versions::Scopes::SharedWith dochild_project,grand_child_project].each do |p|expect(Version.shared_with(p))- .to match_array [version]+ .to contain_exactly(version)endend@@ -110,7 +110,7 @@ RSpec.describe Versions::Scopes::SharedWith dochild_project,grand_child_project].each do |p|expect(Version.shared_with(p))- .to match_array [version]+ .to contain_exactly(version)endend@@ -151,7 +151,7 @@ RSpec.describe Versions::Scopes::SharedWith doaunt_project,sibling_project].each do |p|expect(Version.shared_with(p))- .to match_array [version]+ .to contain_exactly(version)endend@@ -191,7 +191,7 @@ RSpec.describe Versions::Scopes::SharedWith dosibling_project,other_root_project].each do |p|expect(Version.shared_with(p))- .to match_array [version]+ .to contain_exactly(version)endenddiff --git a/spec/models/watcher_spec.rb b/spec/models/watcher_spec.rbindex 00b5bf4794a..75520efab4d 100644--- a/spec/models/watcher_spec.rb+++ b/spec/models/watcher_spec.rb@@ -205,7 +205,7 @@ RSpec.describe Watcher do.to match_array(saved_user)end- it 'will not add the same user when called twice' do+ it 'does not add the same user when called twice' dosaved_watchable.add_watcher(saved_user)saved_watchable.add_watcher(saved_user)@@ -253,7 +253,7 @@ RSpec.describe Watcher doexpect(saved_watchable).to be_validexpect(saved_watchable.watchers.map(&:user))- .to match_array([saved_user])+ .to contain_exactly(saved_user)endendenddiff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rbindex 3f113e28545..1403c7f83f4 100644--- a/spec/models/wiki_page_spec.rb+++ b/spec/models/wiki_page_spec.rb@@ -91,7 +91,7 @@ RSpec.describe WikiPage docontext 'with another default language', with_settings: { default_language: 'de' } dolet(:wiki_page) { build(:wiki_page, wiki:, title: 'Übersicht') }- it 'will still use english slug methods' do+ it 'stills use english slug methods' doexpect(wiki_page.save).to be trueexpect(wiki_page.slug).to eq 'ubersicht'end@@ -100,7 +100,7 @@ RSpec.describe WikiPage docontext 'with another I18n.locale set', with_settings: { default_language: 'de' } dolet(:wiki_page) { build(:wiki_page, wiki:, title: 'Übersicht') }- it 'will still use english slug methods' do+ it 'stills use english slug methods' doI18n.locale = :deexpect(wiki_page.save).to be trueexpect(wiki_page.slug).to eq 'ubersicht'@@ -176,7 +176,7 @@ RSpec.describe WikiPage donew_wiki_page.valid?expect(new_wiki_page.errors.symbols_for(:title))- .to match_array [:blank]+ .to contain_exactly(:blank)endendend@@ -284,7 +284,7 @@ RSpec.describe WikiPage doit 'returns all pages for which the user has the \'view_wiki_pages\' permission' doexpect(described_class.visible(user))- .to match_array [wiki_page]+ .to contain_exactly(wiki_page)endenddiff --git a/spec/models/work_package/work_package_custom_actions_spec.rb b/spec/models/work_package/work_package_custom_actions_spec.rbindex 04689085fb6..64493120cc6 100644--- a/spec/models/work_package/work_package_custom_actions_spec.rb+++ b/spec/models/work_package/work_package_custom_actions_spec.rb@@ -67,7 +67,7 @@ RSpec.describe WorkPackage, 'custom_actions' doit 'returns the action' doexpect(work_package.custom_actions(user))- .to match_array [custom_action]+ .to contain_exactly(custom_action)endend@@ -79,7 +79,7 @@ RSpec.describe WorkPackage, 'custom_actions' doit 'returns the action' doexpect(work_package.custom_actions(user))- .to match_array [custom_action]+ .to contain_exactly(custom_action)endend@@ -103,7 +103,7 @@ RSpec.describe WorkPackage, 'custom_actions' docontext 'with the user having the same role' doit 'returns the action' doexpect(work_package.custom_actions(user))- .to match_array [custom_action]+ .to contain_exactly(custom_action)endenddiff --git a/spec/models/work_package/work_package_custom_fields_spec.rb b/spec/models/work_package/work_package_custom_fields_spec.rbindex 2ff3b3a3b8f..8a6bca2d127 100644--- a/spec/models/work_package/work_package_custom_fields_spec.rb+++ b/spec/models/work_package/work_package_custom_fields_spec.rb@@ -60,7 +60,7 @@ RSpec.describe WorkPackage dodef self.change_custom_field_value(work_package, value, save: true)val = custom_field.custom_options.find { |co| co.value == value }.try(:id)- work_package.custom_field_values = { custom_field.id => (val || value) }+ work_package.custom_field_values = { custom_field.id => val || value }work_package.save if saveendend@@ -168,7 +168,7 @@ RSpec.describe WorkPackage doit 'stores the symbol' doactual_symbols = work_package.errors.symbols_for(custom_field_key)- expect(actual_symbols).to match_array([error_key.to_sym])+ expect(actual_symbols).to contain_exactly(error_key.to_sym)endenddiff --git a/spec/models/work_package/work_package_visibility_spec.rb b/spec/models/work_package/work_package_visibility_spec.rbindex 9c334d32389..2bb0d9bfee0 100644--- a/spec/models/work_package/work_package_visibility_spec.rb+++ b/spec/models/work_package/work_package_visibility_spec.rb@@ -46,7 +46,7 @@ RSpec.describe 'WorkPackage-Visibility' do# is a default in Redmine::DefaultData::Loader - but this not loaded in the tests: here we# just make sure, that the work package is visible, when this permission is setProjectRole.anonymous.add_permission! :view_work_packages- expect(WorkPackage.visible(anonymous)).to match_array [subject]+ expect(WorkPackage.visible(anonymous)).to contain_exactly(subject)endend@@ -54,11 +54,11 @@ RSpec.describe 'WorkPackage-Visibility' dosubject { create(:work_package, project: private_project) }it 'is visible for the admin, even if the project is private' do- expect(WorkPackage.visible(admin)).to match_array [subject]+ expect(WorkPackage.visible(admin)).to contain_exactly(subject)endit 'is not visible for anonymous users, when the project is private' do- expect(WorkPackage.visible(anonymous)).to match_array []+ expect(WorkPackage.visible(anonymous)).to be_emptyendit 'is visible for members of the project, with the view_work_packages permission' do@@ -67,7 +67,7 @@ RSpec.describe 'WorkPackage-Visibility' doproject: private_project,role_ids: [view_work_packages.id])- expect(WorkPackage.visible(user)).to match_array [subject]+ expect(WorkPackage.visible(user)).to contain_exactly(subject)endit 'is only returned once for members with two roles having view_work_packages permission' do@@ -79,11 +79,11 @@ RSpec.describe 'WorkPackage-Visibility' dorole_ids: [view_work_packages.id,view_work_packages_role2.id])- expect(WorkPackage.visible(user).pluck(:id)).to match_array [subject.id]+ expect(WorkPackage.visible(user).pluck(:id)).to contain_exactly(subject.id)endit 'is not visible for non-members of the project without the view_work_packages permission' do- expect(WorkPackage.visible(user)).to match_array []+ expect(WorkPackage.visible(user)).to be_emptyendit 'is not visible for members of the project, without the view_work_packages permission' do@@ -93,7 +93,7 @@ RSpec.describe 'WorkPackage-Visibility' doproject: private_project,role_ids: [no_permission.id])- expect(WorkPackage.visible(user)).to match_array []+ expect(WorkPackage.visible(user)).to be_emptyendendenddiff --git a/spec/models/work_packages/scopes/for_scheduling_spec.rb b/spec/models/work_packages/scopes/for_scheduling_spec.rbindex f58f9ab09b4..7f99d65c51c 100644--- a/spec/models/work_packages/scopes/for_scheduling_spec.rb+++ b/spec/models/work_packages/scopes/for_scheduling_spec.rb@@ -129,7 +129,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'consists of the parent' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([parent])+ .to contain_exactly(parent)endend@@ -138,7 +138,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'consists of the successor' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor])+ .to contain_exactly(successor)endend@@ -166,7 +166,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' docontext 'with all scheduled automatically' doit 'consists of the successor, its child and parent' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor, successor_child, successor_parent])+ .to contain_exactly(successor, successor_child, successor_parent)endend@@ -188,7 +188,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'consists of the successor and its child' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor, successor_child])+ .to contain_exactly(successor, successor_child)endend@@ -214,7 +214,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' docontext 'with all scheduled automatically' doit 'consists of the successor, its child and parent and the successor successor' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor, successor_child, successor_parent, successor_successor])+ .to contain_exactly(successor, successor_child, successor_parent, successor_successor)endend@@ -225,7 +225,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'consists of the successor, its child and successor successor' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor, successor_child, successor_successor])+ .to contain_exactly(successor, successor_child, successor_successor)endend@@ -251,7 +251,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' docontext 'with all scheduled automatically' doit 'consists of the successor, its child and parent' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor, successor_parent])+ .to contain_exactly(successor, successor_parent)endend@@ -273,7 +273,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'consists of the successor' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor])+ .to contain_exactly(successor)endend@@ -296,7 +296,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' docontext 'with all scheduled automatically' doit 'consists of the successor, its child and the successor˚s successor' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor, successor_child, successor_child2, successor_successor])+ .to contain_exactly(successor, successor_child, successor_child2, successor_successor)endend@@ -307,7 +307,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'consists of the successor, its automatically scheduled child and the successor˚s successor' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor_child, successor, successor_successor])+ .to contain_exactly(successor_child, successor, successor_successor)endend@@ -329,7 +329,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'consists of the parent, grandparent' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([parent, grandparent])+ .to contain_exactly(parent, grandparent)endend@@ -338,7 +338,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'consists of the parent, parent successor' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([parent, parent_successor])+ .to contain_exactly(parent, parent_successor)endend@@ -348,7 +348,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' docontext 'with all scheduled automatically' doit 'consists of the parent, self and the whole parent successor hierarchy' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([parent, parent_successor, parent_successor_parent, parent_successor_child])+ .to contain_exactly(parent, parent_successor, parent_successor_parent, parent_successor_child)endend@@ -359,7 +359,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'consists of the parent' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([parent])+ .to contain_exactly(parent)endend@@ -381,7 +381,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'contains the parent and self' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([parent])+ .to contain_exactly(parent)endendend@@ -392,7 +392,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' docontext 'with all scheduled automatically' doit 'consists of both successors' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor, successor_successor])+ .to contain_exactly(successor, successor_successor)endend@@ -414,7 +414,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'contains the successor' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor])+ .to contain_exactly(successor)endendend@@ -425,7 +425,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' docontext 'with all scheduled automatically' doit 'consists of both successors' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor, successor_child, successor_grandchild])+ .to contain_exactly(successor, successor_child, successor_grandchild)endend@@ -436,7 +436,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'contains the successor' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array [successor]+ .to contain_exactly(successor)endendend@@ -451,7 +451,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' docontext 'with all scheduled automatically' doit 'consists of the successor with its descendants' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor, successor_child, successor_grandchild, successor_grandchild2])+ .to contain_exactly(successor, successor_child, successor_grandchild, successor_grandchild2)endend@@ -462,7 +462,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'contains the successor and the non automatically scheduled descendants' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor, successor_child, successor_grandchild2])+ .to contain_exactly(successor, successor_child, successor_grandchild2)endend@@ -474,7 +474,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'includes successor' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor])+ .to contain_exactly(successor)endend@@ -498,7 +498,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'contains the successor' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array [successor]+ .to contain_exactly(successor)endendend@@ -515,7 +515,7 @@ RSpec.describe WorkPackages::Scopes::ForScheduling, 'allowed scope' doit 'contains the successor and the parents but not the siblings' doexpect(WorkPackage.for_scheduling([origin]))- .to match_array([successor, parent, successor_parent])+ .to contain_exactly(successor, parent, successor_parent)endendenddiff --git a/spec/rails_helper.rb b/spec/rails_helper.rbindex 8da493b6910..58fb8e04892 100644--- a/spec/rails_helper.rb+++ b/spec/rails_helper.rb@@ -74,9 +74,9 @@ require 'rubocop/rspec/support'# may lead to broken specs on the CI, if we don't sort here# (example: with_config.rb has to precede with_direct_uploads.rb).#-require_relative "./support/parallel_helper"-require_relative "./support/download_list"-require_relative "./support/capybara"+require_relative "support/parallel_helper"+require_relative "support/download_list"+require_relative "support/capybara"Dir[Rails.root.join('spec/support/**/*.rb')].sort.each { |f| require_relative f }Dir[Rails.root.join('spec/features/support/**/*.rb')].sort.each { |f| require f }Dir[Rails.root.join('spec/lib/api/v3/support/**/*.rb')].sort.each { |f| require f }@@ -88,7 +88,7 @@ ActiveRecord::Migration.maintain_test_schema! unless ENV['CI']RSpec.configure do |config|# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures- config.fixture_path = "#{Rails.root}/spec/fixtures"+ config.fixture_path = "#{Rails.root.join('spec/fixtures')}"# Filter lines from Rails gems in backtraces.config.filter_rails_from_backtrace!diff --git a/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb b/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rbindex 63656d1d463..f662e7d5121 100644--- a/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb+++ b/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb@@ -536,7 +536,7 @@ RSpec.shared_examples 'an APIv3 attachment resource', content_type: :json, type:subject(:response) { last_response }describe '#get' do- let(:get_path) { api_v3_paths.send "attachments_by_#{attachment_type}", container.id }+ let(:get_path) { api_v3_paths.send :"attachments_by_#{attachment_type}", container.id }before docreate_list(:attachment, 2, container:)@@ -551,7 +551,7 @@ RSpec.shared_examples 'an APIv3 attachment resource', content_type: :json, type:enddescribe '#post' do- let(:request_path) { api_v3_paths.send "attachments_by_#{attachment_type}", container.id }+ let(:request_path) { api_v3_paths.send :"attachments_by_#{attachment_type}", container.id }let(:request_parts) { { metadata: metadata.to_json, file: } }let(:metadata) { { fileName: 'cat.png' } }let(:file) { mock_uploaded_file(name: 'original-filename.txt') }diff --git a/spec/requests/api/v3/attachments/wiki_page_spec.rb b/spec/requests/api/v3/attachments/wiki_page_spec.rbindex 3996029ba6b..7b4c0263c33 100644--- a/spec/requests/api/v3/attachments/wiki_page_spec.rb+++ b/spec/requests/api/v3/attachments/wiki_page_spec.rb@@ -27,7 +27,7 @@#++require 'spec_helper'-require_relative './attachment_resource_shared_examples'+require_relative 'attachment_resource_shared_examples'RSpec.describe "wiki page attachments" doit_behaves_like "an APIv3 attachment resource" dodiff --git a/spec/requests/api/v3/notifications/show_resource_spec.rb b/spec/requests/api/v3/notifications/show_resource_spec.rbindex 64c4c751144..a7c19b0bbc2 100644--- a/spec/requests/api/v3/notifications/show_resource_spec.rb+++ b/spec/requests/api/v3/notifications/show_resource_spec.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.require 'spec_helper'-require_relative './show_resource_examples'+require_relative 'show_resource_examples'RSpec.describe API::V3::Notifications::NotificationsAPI,'show',diff --git a/spec/requests/api/v3/queries/schemas/query_filter_instance_schema_resource_spec.rb b/spec/requests/api/v3/queries/schemas/query_filter_instance_schema_resource_spec.rbindex ff02fca2c7f..90b23da77af 100644--- a/spec/requests/api/v3/queries/schemas/query_filter_instance_schema_resource_spec.rb+++ b/spec/requests/api/v3/queries/schemas/query_filter_instance_schema_resource_spec.rb@@ -62,7 +62,7 @@ RSpec.describe 'API v3 Query Filter Schema resource' do%i[globalproject].each do |current_path|context current_path do- let(:path) { send "#{current_path}_path".to_sym }+ let(:path) { send :"#{current_path}_path" }it 'succeeds' doexpect(subject.status)diff --git a/spec/requests/api/v3/relations/relations_index_spec.rb b/spec/requests/api/v3/relations/relations_index_spec.rbindex e6e706d007a..12e9f94c098 100644--- a/spec/requests/api/v3/relations/relations_index_spec.rb+++ b/spec/requests/api/v3/relations/relations_index_spec.rb@@ -85,31 +85,31 @@ RSpec.describe 'GET /api/v3/relations' do# This saves about 75% on the runtime (6s vs 24s on this machine) of the spec.it 'work' doexpect(filter_relations("id", "=", [relations[0], relations[2]]))- .to match_array [relations[0], relations[2]]+ .to contain_exactly(relations[0], relations[2])expect(filter_relations("id", "!", [relations[0], relations[2]]))- .to match_array [relations[1], relations[3]]+ .to contain_exactly(relations[1], relations[3])expect(filter_relations("from", "=", [work_package.id]))- .to match_array [relations[0], relations[1]]+ .to contain_exactly(relations[0], relations[1])expect(filter_relations("from", "!", [work_package.id]))- .to match_array [relations[2], relations[3]]+ .to contain_exactly(relations[2], relations[3])expect(filter_relations("to", "=", [work_package.id])).to eq [relations[2]]expect(filter_relations("to", "!", [work_package.id]))- .to match_array [relations[0], relations[1], relations[3]]+ .to contain_exactly(relations[0], relations[1], relations[3])expect(filter_relations("involved", "=", [work_package.id]))- .to match_array [relations[0], relations[1], relations[2]]+ .to contain_exactly(relations[0], relations[1], relations[2])expect(filter_relations("involved", "!", [work_package.id])).to eq [relations[3]]expect(filter_relations("type", "=", ["blocks"]))- .to match_array [relations[1], relations[3]]+ .to contain_exactly(relations[1], relations[3])expect(filter_relations("type", "=", ["blocks", "precedes"]))- .to match_array [relations[0], relations[1], relations[2], relations[3]]+ .to contain_exactly(relations[0], relations[1], relations[2], relations[3])expect(filter_relations("type", "!", ["blocks"]))- .to match_array [relations[0], relations[2]]+ .to contain_exactly(relations[0], relations[2])endendenddiff --git a/spec/requests/api/v3/root_resource_spec.rb b/spec/requests/api/v3/root_resource_spec.rbindex 252280c7870..255b4698a37 100644--- a/spec/requests/api/v3/root_resource_spec.rb+++ b/spec/requests/api/v3/root_resource_spec.rb@@ -80,7 +80,7 @@ RSpec.describe 'API v3 Root resource' doexpect(subject).to have_json_path('instanceName')end- context 'without the X-requested-with header', skip_xhr_header: true do+ context 'without the X-requested-with header', :skip_xhr_header doit 'returns OK because GET requests are allowed' doexpect(response.status).to eq(200)expect(subject).to have_json_path('instanceName')diff --git a/spec/requests/api/v3/user/filters_spec.rb b/spec/requests/api/v3/user/filters_spec.rbindex 0bbc773d6f4..f2f417931d3 100644--- a/spec/requests/api/v3/user/filters_spec.rb+++ b/spec/requests/api/v3/user/filters_spec.rb@@ -61,29 +61,29 @@ RSpec.describe 'GET /api/v3/users' dodescribe 'status filter' doit '=' do- expect(filter_users("status", "=", :active)).to match_array ["admin", "h.wurst", "m.mario"]+ expect(filter_users("status", "=", :active)).to contain_exactly("admin", "h.wurst", "m.mario")endit '!' do- expect(filter_users("status", "!", :active)).to match_array ["h.heine"]+ expect(filter_users("status", "!", :active)).to contain_exactly("h.heine")endenddescribe 'login filter' doit '=' do- expect(filter_users("login", "=", "admin")).to match_array ["admin"]+ expect(filter_users("login", "=", "admin")).to contain_exactly("admin")endit '!' do- expect(filter_users("login", "!", "admin")).to match_array ["h.wurst", "h.heine", "m.mario"]+ expect(filter_users("login", "!", "admin")).to contain_exactly("h.wurst", "h.heine", "m.mario")endit '~' do- expect(filter_users("login", "~", "h.")).to match_array ["h.wurst", "h.heine"]+ expect(filter_users("login", "~", "h.")).to contain_exactly("h.wurst", "h.heine")endit '!~' do- expect(filter_users("login", "!~", "h.")).to match_array ["admin", "m.mario"]+ expect(filter_users("login", "!~", "h.")).to contain_exactly("admin", "m.mario")endendenddiff --git a/spec/requests/api/v3/versions/project_resource_spec.rb b/spec/requests/api/v3/versions/project_resource_spec.rbindex 7657746e223..cac5d1b62d3 100644--- a/spec/requests/api/v3/versions/project_resource_spec.rb+++ b/spec/requests/api/v3/versions/project_resource_spec.rb@@ -78,7 +78,7 @@ RSpec.describe "API v3 version's projects resource" doit 'includes only the projects which the user can see' doid_in_response = JSON.parse(response.body)['_embedded']['elements'].map { |p| p['id'] }- expect(id_in_response).to match_array [project.id, project2.id, project3.id]+ expect(id_in_response).to contain_exactly(project.id, project2.id, project3.id)endenddiff --git a/spec/requests/api/v3/work_packages/available_projects_on_edit_api_spec.rb b/spec/requests/api/v3/work_packages/available_projects_on_edit_api_spec.rbindex 8b9f076fe2b..90a3b82d8a1 100644--- a/spec/requests/api/v3/work_packages/available_projects_on_edit_api_spec.rb+++ b/spec/requests/api/v3/work_packages/available_projects_on_edit_api_spec.rb@@ -34,7 +34,7 @@ RSpec.describe 'API::V3::WorkPackages::AvailableProjectsOnEditAPI' dolet(:edit_role) docreate(:project_role, permissions: %i[edit_work_packages- view_work_packages])+ view_work_packages])endlet(:move_role) docreate(:project_role, permissions: [:move_work_packages])diff --git a/spec/requests/api/v3/work_packages/show_resource_spec.rb b/spec/requests/api/v3/work_packages/show_resource_spec.rbindex abf2c2264d1..05438fa1c49 100644--- a/spec/requests/api/v3/work_packages/show_resource_spec.rb+++ b/spec/requests/api/v3/work_packages/show_resource_spec.rb@@ -121,7 +121,7 @@ RSpec.describe 'API v3 Work package resource',# resolves linksexpect(subject['html'])- .to have_selector("opce-macro-wp-quickinfo[data-id='#{other_wp.id}']")+ .to have_css("opce-macro-wp-quickinfo[data-id='#{other_wp.id}']")# resolves macros, e.g. tocexpect(subject['html']).to have_css('.op-uc-toc--list-item', text: "OpenProject Masterplan for 2015")diff --git a/spec/requests/auth/auth_source_sso_spec.rb b/spec/requests/auth/auth_source_sso_spec.rbindex 26f7007effe..26eb723c72c 100644--- a/spec/requests/auth/auth_source_sso_spec.rb+++ b/spec/requests/auth/auth_source_sso_spec.rb@@ -28,8 +28,7 @@require 'spec_helper'-RSpec.describe AuthSourceSSO,- skip_2fa_stage: true, # Prevent redirects to 2FA stage+RSpec.describe AuthSourceSSO, :skip_2fa_stage, # Prevent redirects to 2FA stagetype: :rails_request dolet(:sso_config) do{diff --git a/spec/requests/openid_google_provider_callback_spec.rb b/spec/requests/openid_google_provider_callback_spec.rbindex e92620b4389..21f294622f6 100644--- a/spec/requests/openid_google_provider_callback_spec.rb+++ b/spec/requests/openid_google_provider_callback_spec.rb@@ -90,7 +90,7 @@ RSpec.describe 'OpenID Google provider callback', with_ee: %i[openid_providers]}end- it 'redirects user without errors', webmock: true, with_settings: {+ it 'redirects user without errors', :webmock, with_settings: {plugin_openproject_openid_connect: {"providers" => { "google" => { "identifier" => "identifier", "secret" => "secret" } }}diff --git a/spec/requests/rate_limiting/lost_password_rate_limiting_spec.rb b/spec/requests/rate_limiting/lost_password_rate_limiting_spec.rbindex 7df4ad442d0..1fc76692422 100644--- a/spec/requests/rate_limiting/lost_password_rate_limiting_spec.rb+++ b/spec/requests/rate_limiting/lost_password_rate_limiting_spec.rb@@ -31,7 +31,6 @@ require 'spec_helper'RSpec.describe 'Rate limiting lost_password',:with_rack_attack,type: :rails_request do-before doallow_any_instance_of(ActionController::Base) # rubocop:disable RSpec/AnyInstance.to(receive(:protect_against_forgery?))diff --git a/spec/routing/activities_spec.rb b/spec/routing/activities_spec.rbindex e2d676ed493..342885be454 100644--- a/spec/routing/activities_spec.rb+++ b/spec/routing/activities_spec.rb@@ -39,6 +39,7 @@ RSpec.describe ActivitiesController, 'routing' doaction: 'index',format: 'atom')}+it {expect(get('/activity/menu')).to route_to(controller: 'activities',action: 'menu')diff --git a/spec/seeders/demo_data/work_package_seeder_spec.rb b/spec/seeders/demo_data/work_package_seeder_spec.rbindex 161a6a14e13..3e4d4b1d3dd 100644--- a/spec/seeders/demo_data/work_package_seeder_spec.rb+++ b/spec/seeders/demo_data/work_package_seeder_spec.rb@@ -74,7 +74,7 @@ RSpec.describe DemoData::WorkPackageSeeder do]end- it 'will start n days after the Monday of the current week' do+ it 'starts n days after the Monday of the current week' docurrent_week_monday = Date.current.mondayexpect(WorkPackage.first.start_date).to eq(current_week_monday + 2.days)expect(WorkPackage.second.start_date).to eq(current_week_monday + 42.days)@@ -89,7 +89,7 @@ RSpec.describe DemoData::WorkPackageSeeder do]end- it 'will start n days before the Monday of the current week' do+ it 'starts n days before the Monday of the current week' docurrent_week_monday = Date.current.mondayexpect(WorkPackage.first.start_date).to eq(current_week_monday - 3.days)expect(WorkPackage.second.start_date).to eq(current_week_monday - 17.days)@@ -105,7 +105,7 @@ RSpec.describe DemoData::WorkPackageSeeder do]end- it 'will have finish date calculated being start + duration - 1' do+ it 'has finish date calculated being start + duration - 1' docurrent_week_monday = Date.current.mondayexpect(WorkPackage.first.due_date).to eq(current_week_monday)expect(WorkPackage.second.due_date).to eq(current_week_monday + 5.days)@@ -120,11 +120,11 @@ RSpec.describe DemoData::WorkPackageSeeder do]end- it 'will have no duration' do+ it 'has no duration' doexpect(WorkPackage.first.duration).to be_nilend- it 'will have no finish date' do+ it 'has no finish date' doexpect(WorkPackage.first.due_date).to be_nilendend@@ -136,17 +136,17 @@ RSpec.describe DemoData::WorkPackageSeeder do]end- it 'will have ignore_non_working_day set to true' do+ it 'has ignore_non_working_day set to true' doexpect(WorkPackage.first.ignore_non_working_days).to be(false)end- it 'will have finish date calculated from duration based on real days' do+ it 'has finish date calculated from duration based on real days' dowork_package = WorkPackage.firstexpect(work_package.due_date).to eq(work_package.start_date + 9.days)expect(work_package.due_date.wday).to eq(4)end- it 'will have duration adjusted to count only working days' do+ it 'has duration adjusted to count only working days' doexpect(WorkPackage.first.duration).to eq(8)endend@@ -159,12 +159,12 @@ RSpec.describe DemoData::WorkPackageSeeder do]end- it 'will have ignore_non_working_day set to true' do+ it 'has ignore_non_working_day set to true' doexpect(WorkPackage.first.ignore_non_working_days).to be(true)expect(WorkPackage.second.ignore_non_working_days).to be(true)end- it 'will have duration being the same as defined' do+ it 'has duration being the same as defined' doexpect(WorkPackage.first.duration).to eq(3)expect(WorkPackage.second.duration).to eq(7)enddiff --git a/spec/services/authorization/query_transformation_spec.rb b/spec/services/authorization/query_transformation_spec.rbindex ddafb06fcaa..d1bb100b8f3 100644--- a/spec/services/authorization/query_transformation_spec.rb+++ b/spec/services/authorization/query_transformation_spec.rb@@ -67,7 +67,7 @@ RSpec.describe Authorization::QueryTransformation docontext 'apply' doit 'calls the block' do- expect(instance.apply(1, 2, 3)).to match_array [1, 2, 3]+ expect(instance.apply(1, 2, 3)).to contain_exactly(1, 2, 3)endendenddiff --git a/spec/services/authorization/query_transformations_spec.rb b/spec/services/authorization/query_transformations_spec.rbindex 52f0276d481..5f4a3baf26c 100644--- a/spec/services/authorization/query_transformations_spec.rb+++ b/spec/services/authorization/query_transformations_spec.rb@@ -54,7 +54,7 @@ RSpec.describe Authorization::QueryTransformations doexpect(instance.for(:on)[0].on).to be :onexpect(instance.for(:on)[0].name).to be :name- expect(instance.for(:on)[0].block.call(1, 2, 3)).to match_array [1, 2, 3]+ expect(instance.for(:on)[0].block.call(1, 2, 3)).to contain_exactly(1, 2, 3)endit 'is nil for another name' do@@ -94,7 +94,7 @@ RSpec.describe Authorization::QueryTransformations doexpect(instance.for(:on)[1].on).to be :onexpect(instance.for(:on)[1].name).to be :transformation1- expect(instance.for(:on)[1].block.call(1, 2, 3)).to match_array [1, 2, 3]+ expect(instance.for(:on)[1].block.call(1, 2, 3)).to contain_exactly(1, 2, 3)endendend@@ -130,7 +130,7 @@ RSpec.describe Authorization::QueryTransformations doexpect(instance.for(:on)[1].on).to be :onexpect(instance.for(:on)[1].name).to be :transformation1- expect(instance.for(:on)[1].block.call(1, 2, 3)).to match_array [1, 2, 3]+ expect(instance.for(:on)[1].block.call(1, 2, 3)).to contain_exactly(1, 2, 3)endendenddiff --git a/spec/services/authorization/user_allowed_query_spec.rb b/spec/services/authorization/user_allowed_query_spec.rbindex a660fd385b6..0237efce486 100644--- a/spec/services/authorization/user_allowed_query_spec.rb+++ b/spec/services/authorization/user_allowed_query_spec.rb@@ -69,7 +69,7 @@ RSpec.describe Authorization::UserAllowedQuery doendit 'returns the user' do- expect(described_class.query(action, project)).to match_array [user]+ expect(described_class.query(action, project)).to contain_exactly(user)endend@@ -81,7 +81,7 @@ RSpec.describe Authorization::UserAllowedQuery doendit 'returns the user' do- expect(described_class.query(action, project)).to match_array [user]+ expect(described_class.query(action, project)).to contain_exactly(user)endend@@ -162,7 +162,7 @@ RSpec.describe Authorization::UserAllowedQuery doendit 'returns the user' do- expect(described_class.query(action, project)).to match_array [user]+ expect(described_class.query(action, project)).to contain_exactly(user)endend@@ -180,7 +180,7 @@ RSpec.describe Authorization::UserAllowedQuery doendit 'returns the anonymous user' do- expect(described_class.query(action, project)).to match_array([anonymous])+ expect(described_class.query(action, project)).to contain_exactly(anonymous)endend@@ -248,7 +248,7 @@ RSpec.describe Authorization::UserAllowedQuery doendit 'returns the user' do- expect(described_class.query(public_action, project)).to match_array [user]+ expect(described_class.query(public_action, project)).to contain_exactly(user)endend@@ -262,7 +262,7 @@ RSpec.describe Authorization::UserAllowedQuery doendit 'returns the user and anonymous' do- expect(described_class.query(public_action, project)).to match_array [user, anonymous]+ expect(described_class.query(public_action, project)).to contain_exactly(user, anonymous)endenddiff --git a/spec/services/custom_actions/update_service_spec.rb b/spec/services/custom_actions/update_service_spec.rbindex 4604c174731..29b135972ca 100644--- a/spec/services/custom_actions/update_service_spec.rb+++ b/spec/services/custom_actions/update_service_spec.rb@@ -138,7 +138,7 @@ RSpec.describe CustomActions::UpdateService do.map { |a| [a.key, a.values] }expect(new_actions)- .to match_array [[:assigned_to, [2]], [:priority, [3]]]+ .to contain_exactly([:assigned_to, [2]], [:priority, [3]])endit 'handles unknown actions' do@@ -149,7 +149,7 @@ RSpec.describe CustomActions::UpdateService do.map { |a| [a.key, a.values] }expect(new_actions)- .to match_array [[:inexistent, ['3']]]+ .to contain_exactly([:inexistent, ['3']])endit 'updates the conditions' do@@ -165,7 +165,7 @@ RSpec.describe CustomActions::UpdateService do.map { |a| [a.key, a.values] }expect(new_conditions)- .to match_array [[:status, [new_status.id]]]+ .to contain_exactly([:status, [new_status.id]])endit 'handles unknown conditions' do@@ -176,7 +176,7 @@ RSpec.describe CustomActions::UpdateService do.map { |a| [a.key, a.values] }expect(new_conditions)- .to match_array [[:inexistent, [3]]]+ .to contain_exactly([:inexistent, [3]])endendenddiff --git a/spec/services/notifications/create_from_journal_job_shared.rb b/spec/services/notifications/create_from_journal_job_shared.rbindex 9cf5cd0b836..41234362c77 100644--- a/spec/services/notifications/create_from_journal_job_shared.rb+++ b/spec/services/notifications/create_from_journal_job_shared.rb@@ -87,7 +87,7 @@ RSpec.shared_context 'with CreateFromJournalJob context' do.and_return(ServiceResult.success(result: notification))expect(call.all_results)- .to match_array([notification])+ .to contain_exactly(notification)expect(notifications_service).to have_received(:call)diff --git a/spec/services/notifications/create_from_model_service_comment_spec.rb b/spec/services/notifications/create_from_model_service_comment_spec.rbindex 25ec8b5035e..981bd479bca 100644--- a/spec/services/notifications/create_from_model_service_comment_spec.rb+++ b/spec/services/notifications/create_from_model_service_comment_spec.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++require 'spec_helper'-require_relative './create_from_journal_job_shared'+require_relative 'create_from_journal_job_shared'RSpec.describe Notifications::CreateFromModelService, 'comment', with_settings: { journal_aggregation_time_minutes: 0 } dosubject(:call) dodiff --git a/spec/services/notifications/create_from_model_service_message_spec.rb b/spec/services/notifications/create_from_model_service_message_spec.rbindex 989a110a024..b21702e52e8 100644--- a/spec/services/notifications/create_from_model_service_message_spec.rb+++ b/spec/services/notifications/create_from_model_service_message_spec.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++require 'spec_helper'-require_relative './create_from_journal_job_shared'+require_relative 'create_from_journal_job_shared'RSpec.describe Notifications::CreateFromModelService, 'message', with_settings: { journal_aggregation_time_minutes: 0 } dosubject(:call) dodiff --git a/spec/services/notifications/create_from_model_service_news_spec.rb b/spec/services/notifications/create_from_model_service_news_spec.rbindex 4dba5a1bea3..f99c6f78b46 100644--- a/spec/services/notifications/create_from_model_service_news_spec.rb+++ b/spec/services/notifications/create_from_model_service_news_spec.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++require 'spec_helper'-require_relative './create_from_journal_job_shared'+require_relative 'create_from_journal_job_shared'RSpec.describe Notifications::CreateFromModelService, 'news', with_settings: { journal_aggregation_time_minutes: 0 } dosubject(:call) dodiff --git a/spec/services/notifications/create_from_model_service_wiki_spec.rb b/spec/services/notifications/create_from_model_service_wiki_spec.rbindex 85224b497bf..70efcc2b750 100644--- a/spec/services/notifications/create_from_model_service_wiki_spec.rb+++ b/spec/services/notifications/create_from_model_service_wiki_spec.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++require 'spec_helper'-require_relative './create_from_journal_job_shared'+require_relative 'create_from_journal_job_shared'RSpec.describe Notifications::CreateFromModelService, 'wiki', with_settings: { journal_aggregation_time_minutes: 0 } dosubject(:call) dodiff --git a/spec/services/notifications/create_service_intergration_spec.rb b/spec/services/notifications/create_service_intergration_spec.rbindex 96ddf6621ba..fbae6c67130 100644--- a/spec/services/notifications/create_service_intergration_spec.rb+++ b/spec/services/notifications/create_service_intergration_spec.rb@@ -82,7 +82,7 @@ RSpec.describe Notifications::CreateService, 'integration', type: :model do.to be_failureexpect(service_result.errors.details[:journal_id])- .to match_array [{ error: :does_not_exist }]+ .to contain_exactly({ error: :does_not_exist })endendenddiff --git a/spec/services/notifications/mail_service_mentioned_integration_spec.rb b/spec/services/notifications/mail_service_mentioned_integration_spec.rbindex c5450737fd9..b31521b207a 100644--- a/spec/services/notifications/mail_service_mentioned_integration_spec.rb+++ b/spec/services/notifications/mail_service_mentioned_integration_spec.rb@@ -78,7 +78,7 @@ RSpec.describe Notifications::MailService, 'Mentioned integration', type: :modelexpect(assigned_notification.mail_alert_sent).to be falseend- it 'will trigger only one mention notification mail when editing attributes afterwards' do+ it 'triggers only one mention notification mail when editing attributes afterwards' doallow(WorkPackageMailer).to receive(:mentioned).and_call_originaldiff --git a/spec/services/notifications/mail_service_spec.rb b/spec/services/notifications/mail_service_spec.rbindex 1a4c1ed79ba..6b5550af8de 100644--- a/spec/services/notifications/mail_service_spec.rb+++ b/spec/services/notifications/mail_service_spec.rb@@ -29,7 +29,7 @@require 'spec_helper'RSpec.describe Notifications::MailService, type: :model do- require_relative './mentioned_journals_shared'+ require_relative 'mentioned_journals_shared'subject(:call) { instance.call }diff --git a/spec/services/parse_schema_filter_params_service_spec.rb b/spec/services/parse_schema_filter_params_service_spec.rbindex 0571075d4bb..acd11fccd24 100644--- a/spec/services/parse_schema_filter_params_service_spec.rb+++ b/spec/services/parse_schema_filter_params_service_spec.rb@@ -67,7 +67,7 @@ RSpec.describe ParseSchemaFilterParamsService doendit 'returns the [project, type] pair' do- expect(result.result).to match_array [[project, type]]+ expect(result.result).to contain_exactly([project, type])endend@@ -79,7 +79,7 @@ RSpec.describe ParseSchemaFilterParamsService doendit 'returns an empty array' do- expect(result.result).to match_array []+ expect(result.result).to be_emptyendend@@ -91,7 +91,7 @@ RSpec.describe ParseSchemaFilterParamsService doendit 'returns an empty array' do- expect(result.result).to match_array []+ expect(result.result).to be_emptyendend@@ -109,7 +109,7 @@ RSpec.describe ParseSchemaFilterParamsService doendit 'returns an error message' do- expect(result.errors.messages[:base]).to match_array ['The operator is not supported.']+ expect(result.errors.messages[:base]).to contain_exactly('The operator is not supported.')endend@@ -127,7 +127,7 @@ RSpec.describe ParseSchemaFilterParamsService doendit 'returns an error message' do- expect(result.errors.messages[:base]).to match_array ['A value is invalid.']+ expect(result.errors.messages[:base]).to contain_exactly('A value is invalid.')endend@@ -145,7 +145,7 @@ RSpec.describe ParseSchemaFilterParamsService doendit 'returns an error message' do- expect(result.errors.messages[:base]).to match_array ['An \'id\' filter is required.']+ expect(result.errors.messages[:base]).to contain_exactly('An \'id\' filter is required.')endendenddiff --git a/spec/services/projects/copy_service_integration_spec.rb b/spec/services/projects/copy_service_integration_spec.rbindex 01a2bb804af..d48b613d147 100644--- a/spec/services/projects/copy_service_integration_spec.rb+++ b/spec/services/projects/copy_service_integration_spec.rb@@ -216,7 +216,6 @@ RSpec.describe(context 'with all modules selected' dolet(:only_args) { all_modules }- # rubocop:disable RSpec/IndexedLetlet(:storage1) { source_automatic_project_storage.storage }let(:storage2) { source_manual_project_storage.storage }# rubocop:enable RSpec/IndexedLet@@ -1014,7 +1013,7 @@ RSpec.describe(context 'with wiki' dolet(:only_args) { %i[wiki] }- it 'will copy wiki menu items' do+ it 'copies wiki menu items' dosource.wiki.wiki_menu_items << create(:wiki_menu_item_with_parent, wiki: source.wiki)expect(subject).to be_success@@ -1057,7 +1056,7 @@ RSpec.describe(let(:only_args) { nil }# rubocop:disable RSpec/MultipleExpectations- it 'will set attributes only without copying dependencies' do+ it 'sets attributes only without copying dependencies' doexpect(subject).to be_successexpect(project_copy.members.count).to eq 1@@ -1102,7 +1101,7 @@ RSpec.describe(create(:group, members: [user])end- it 'will not copy group members' do+ it 'does not copy group members' doMembers::CreateService.new(user: current_user, contract_class: EmptyContract).call(principal: group, roles: [another_role], project: source)diff --git a/spec/services/projects/delete_service_spec.rb b/spec/services/projects/delete_service_spec.rbindex 7eb0c9aa69e..e7bfb97ea10 100644--- a/spec/services/projects/delete_service_spec.rb+++ b/spec/services/projects/delete_service_spec.rb@@ -48,7 +48,7 @@ RSpec.describe Projects::DeleteService, type: :model do.not_to have_received(:new)end- context 'when the file storages are involved', webmock: true do+ context 'when the file storages are involved', :webmock doit 'removes any remote storages defined for the project' dostorage = create(:nextcloud_storage)project_storage = create(:project_storage, project:, storage:)diff --git a/spec/services/projects/set_attributes_service_integration_spec.rb b/spec/services/projects/set_attributes_service_integration_spec.rbindex 3209949332f..4f87d001909 100644--- a/spec/services/projects/set_attributes_service_integration_spec.rb+++ b/spec/services/projects/set_attributes_service_integration_spec.rb@@ -43,7 +43,7 @@ RSpec.describe Projects::SetAttributesService, 'integration', type: :model dodescribe 'with a project name starting with numbers' dolet(:attributes) { { name: '100 Project A' } }- it 'will create an identifier including the numbers' do+ it 'creates an identifier including the numbers' doexpect(service_result).to be_successexpect(service_result.result.identifier).to eq '100-project-a'end@@ -56,7 +56,7 @@ RSpec.describe Projects::SetAttributesService, 'integration', type: :model docontext 'and a new project with no identifier set' dolet(:project) { Project.new name: 'My new project' }- it 'will auto-correct the identifier' do+ it 'auto-corrects the identifier' doexpect(service_result).to be_successexpect(service_result.result.identifier).to eq 'my-new-project-1'end@@ -65,7 +65,7 @@ RSpec.describe Projects::SetAttributesService, 'integration', type: :model docontext 'and a new project with the same identifier set' dolet(:project) { Project.new name: 'My new project', identifier: 'my-new-project' }- it 'will result in an error' do+ it 'results in an error' doexpect(service_result).not_to be_successexpect(service_result.result.identifier).to eq 'my-new-project'diff --git a/spec/services/relations/update_service_spec.rb b/spec/services/relations/update_service_spec.rbindex 45731bdefb2..cb6e633f189 100644--- a/spec/services/relations/update_service_spec.rb+++ b/spec/services/relations/update_service_spec.rb@@ -138,7 +138,7 @@ RSpec.describe Relations::UpdateService doit 'has a dependent result for the from-work package' doexpect(subject.dependent_results)- .to match_array [set_schedule_work_package2_result]+ .to contain_exactly(set_schedule_work_package2_result)endenddiff --git a/spec/services/scm/create_managed_repository_service_spec.rb b/spec/services/scm/create_managed_repository_service_spec.rbindex 612e7449c4c..21b6dd34637 100644--- a/spec/services/scm/create_managed_repository_service_spec.rb+++ b/spec/services/scm/create_managed_repository_service_spec.rb@@ -141,7 +141,7 @@ RSpec.describe SCM::CreateManagedRepositoryService, skip_if_command_unavailable:endend- context 'with managed remote config', webmock: true do+ context 'with managed remote config', :webmock dolet(:url) { 'http://myreposerver.example.com/api/' }let(:config) do{diff --git a/spec/services/scm/delete_managed_repository_service_spec.rb b/spec/services/scm/delete_managed_repository_service_spec.rbindex ac90129d537..9af99b6dc7a 100644--- a/spec/services/scm/delete_managed_repository_service_spec.rb+++ b/spec/services/scm/delete_managed_repository_service_spec.rb@@ -115,7 +115,7 @@ RSpec.describe SCM::DeleteManagedRepositoryService, skip_if_command_unavailable:endend- context 'with managed remote config', webmock: true do+ context 'with managed remote config', :webmock dolet(:url) { 'http://myreposerver.example.com/api/' }let(:config) do{diff --git a/spec/services/settings/update_service_spec.rb b/spec/services/settings/update_service_spec.rbindex abff0b6e38e..f29ab572242 100644--- a/spec/services/settings/update_service_spec.rb+++ b/spec/services/settings/update_service_spec.rb@@ -28,7 +28,6 @@ require 'spec_helper'require_relative 'shared/shared_call_examples'require_relative 'shared/shared_setup_context'-RSpec.describe Settings::UpdateService doinclude_context 'with update service setup'diff --git a/spec/services/users/create_service_spec.rb b/spec/services/users/create_service_spec.rbindex 2ebfb5655c1..4df2c4af537 100644--- a/spec/services/users/create_service_spec.rb+++ b/spec/services/users/create_service_spec.rb@@ -36,7 +36,7 @@ RSpec.describe Users::CreateService docontext 'and the mail is present' dolet(:model_instance) { build(:invited_user, mail: '[email protected]') }- it 'will call UserInvitation' do+ it 'calls UserInvitation' doexpect(UserInvitation).to receive(:invite_user!).with(model_instance).and_return(model_instance)expect(subject).to be_successend@@ -45,7 +45,7 @@ RSpec.describe Users::CreateService docontext 'and the user has no names set' dolet(:model_instance) { build(:invited_user, firstname: nil, lastname: nil, mail: '[email protected]') }- it 'will call UserInvitation' do+ it 'calls UserInvitation' doexpect(UserInvitation).to receive(:invite_user!).with(model_instance).and_return(model_instance)expect(subject).to be_successend@@ -54,7 +54,7 @@ RSpec.describe Users::CreateService docontext 'and the mail is empty' dolet(:model_instance) { build(:invited_user, mail: nil) }- it 'will call not call UserInvitation' do+ it 'calls not call UserInvitation' doexpect(UserInvitation).not_to receive(:invite_user!)expect(subject).not_to be_successexpect(subject.errors.details[:mail]).to eq [{ error: :blank }]diff --git a/spec/services/users/logout_service_spec.rb b/spec/services/users/logout_service_spec.rbindex 2e1ee7ee9ee..bf8996a7aa3 100644--- a/spec/services/users/logout_service_spec.rb+++ b/spec/services/users/logout_service_spec.rb@@ -103,7 +103,6 @@ RSpec.describe Users::LogoutService, type: :model doexpect(Sessions::UserSession.for_user(user).count).to eq(2)end-describe 'autologin cookie' dolet!(:token) { create(:autologin_token, user:) }let!(:other_token) { create(:autologin_token, user:) }diff --git a/spec/services/work_packages/update_ancestors/loader_spec.rb b/spec/services/work_packages/update_ancestors/loader_spec.rbindex be6daaa28fa..7243c76bf24 100644--- a/spec/services/work_packages/update_ancestors/loader_spec.rb+++ b/spec/services/work_packages/update_ancestors/loader_spec.rb@@ -216,38 +216,29 @@ RSpec.describe WorkPackages::UpdateAncestors::Loader, type: :model docontext 'for the work_package' doit 'is its child (as a hash)' doexpect(instance.descendants_of(work_package))- .to match_array([descendants_of_hash(child)])+ .to contain_exactly(descendants_of_hash(child))endendcontext 'for the parent' doit 'is the work package, its child (as a hash) and its sibling (as a hash)' doexpect(instance.descendants_of(parent))- .to match_array([descendants_of_hash(child),- work_package,- descendants_of_hash(sibling)])+ .to contain_exactly(descendants_of_hash(child), work_package, descendants_of_hash(sibling))endendcontext 'for the grandparent' doit 'is the parent, the work package, its child (as a hash) and its sibling (as a hash)' doexpect(instance.descendants_of(grandparent))- .to match_array([parent,- work_package,- descendants_of_hash(child),- descendants_of_hash(sibling)])+ .to contain_exactly(parent, work_package, descendants_of_hash(child), descendants_of_hash(sibling))endendcontext 'for the grandgrandparent (the root)' doit 'is the complete tree, partly as a hash and partly as the preloaded work packages' doexpect(instance.descendants_of(grandgrandparent))- .to match_array([descendants_of_hash(grandparent_sibling),- grandparent,- parent,- work_package,- descendants_of_hash(child),- descendants_of_hash(sibling)])+ .to contain_exactly(descendants_of_hash(grandparent_sibling), grandparent, parent, work_package,+ descendants_of_hash(child), descendants_of_hash(sibling))endendend@@ -265,30 +256,28 @@ RSpec.describe WorkPackages::UpdateAncestors::Loader, type: :model docontext 'for the work_package' doit 'is its child (as a hash)' doexpect(instance.children_of(work_package))- .to match_array([children_of_hash(child)])+ .to contain_exactly(children_of_hash(child))endendcontext 'for the parent' doit 'is the work package and its sibling (as a hash)' doexpect(instance.children_of(parent))- .to match_array([work_package,- children_of_hash(sibling)])+ .to contain_exactly(work_package, children_of_hash(sibling))endendcontext 'for the grandparent' doit 'is the parent' doexpect(instance.children_of(grandparent))- .to match_array([parent])+ .to contain_exactly(parent)endendcontext 'for the grandgrandparent' doit 'is the grandparent and its sibling (as a hash)' doexpect(instance.children_of(grandgrandparent))- .to match_array([children_of_hash(grandparent_sibling),- grandparent])+ .to contain_exactly(children_of_hash(grandparent_sibling), grandparent)endendenddiff --git a/spec/support/angular.rb b/spec/support/angular.rbindex 713b1973cd2..e1aa5a96d1d 100644--- a/spec/support/angular.rb+++ b/spec/support/angular.rb@@ -29,5 +29,5 @@### Wait for the angular bootstrap to have happeneddef expect_angular_frontend_initialized- expect(page).to have_selector('.__ng2-bootstrap-has-run', wait: 20)+ expect(page).to have_css('.__ng2-bootstrap-has-run', wait: 20)enddiff --git a/spec/support/capybara/additional_accessible_selectors.rb b/spec/support/capybara/additional_accessible_selectors.rbindex 98fc32b1e6d..335bee8158c 100644--- a/spec/support/capybara/additional_accessible_selectors.rb+++ b/spec/support/capybara/additional_accessible_selectors.rb@@ -49,12 +49,12 @@ endmodule Capybaramodule RSpecMatchers%i[list list_item].each do |selector|- define_method "have_#{selector}" do |locator = nil, **options, &optional_filter_block|+ define_method :"have_#{selector}" do |locator = nil, **options, &optional_filter_block|Matchers::HaveSelector.new(selector, locator, **options, &optional_filter_block)end- define_method "have_no_#{selector}" do |*args, **options, &optional_filter_block|- Matchers::NegatedMatcher.new(send("have_#{selector}", *args, **options, &optional_filter_block))+ define_method :"have_no_#{selector}" do |*args, **options, &optional_filter_block|+ Matchers::NegatedMatcher.new(send(:"have_#{selector}", *args, **options, &optional_filter_block))endendenddiff --git a/spec/support/components/admin/type_configuration_form.rb b/spec/support/components/admin/type_configuration_form.rbindex e894132dbf0..e88407a96a4 100644--- a/spec/support/components/admin/type_configuration_form.rb+++ b/spec/support/components/admin/type_configuration_form.rb@@ -58,7 +58,7 @@ module Componentsenddef expect_empty- expect(page).not_to have_selector('#draggable-groups .group-head')+ expect(page).to have_no_css('#draggable-groups .group-head')enddef find_group(name)@@ -88,7 +88,7 @@ module Componentsattribute = page.find(attribute_selector(key))unless translation.nil?- expect(attribute).to have_selector('.attribute-name', text: translation)+ expect(attribute).to have_css('.attribute-name', text: translation)endend@@ -134,7 +134,7 @@ module Componentsmodal = ::Components::WorkPackages::TableConfigurationModal.new- within find('.relation-filter-selector') do+ within '.relation-filter-selector' doselect I18n.t("js.relation_labels.#{relation_filter}")# While we are here, let's check that all relation filters are present.@@ -198,7 +198,7 @@ module Componentsinput.set(to)input.send_keys(:return)- expect(page).to have_selector('.group-edit-handler', text: to.upcase)+ expect(page).to have_css('.group-edit-handler', text: to.upcase)enddef remove_group(name)@@ -206,15 +206,15 @@ module Componentscontainer.find('.delete-group').click- expect(page).not_to have_selector('.group-head', text: name.upcase)+ expect(page).to have_no_css('.group-head', text: name.upcase)enddef expect_no_attribute(attribute, group)- expect(find_group(group)).not_to have_selector(attribute_selector(attribute).to_s)+ expect(find_group(group)).to have_no_selector(attribute_selector(attribute).to_s)enddef expect_group(_label, translation, *attributes)- expect(find_group(translation)).to have_selector(".group-edit-handler", text: translation.upcase)+ expect(find_group(translation)).to have_css(".group-edit-handler", text: translation.upcase)within find_group(translation) doattributes.each do |attribute|@@ -224,7 +224,7 @@ module Componentsenddef expect_inactive(attribute)- expect(inactive_drop).to have_selector(".type-form-conf-attribute[data-key='#{attribute}']")+ expect(inactive_drop).to have_css(".type-form-conf-attribute[data-key='#{attribute}']")endendenddiff --git a/spec/support/components/attachments_list.rb b/spec/support/components/attachments_list.rbindex 449dc12d4c0..4e55a507b6b 100644--- a/spec/support/components/attachments_list.rb+++ b/spec/support/components/attachments_list.rb@@ -27,11 +27,11 @@ module Componentsenddef expect_empty- expect(page).not_to have_selector("#{context_selector} [data-test-selector='op-attachment-list-item']")+ expect(page).to have_no_css("#{context_selector} [data-test-selector='op-attachment-list-item']")enddef expect_attached(name, count: 1)- expect(page).to have_selector("#{context_selector} [data-test-selector='op-attachment-list-item']", text: name, count:)+ expect(page).to have_css("#{context_selector} [data-test-selector='op-attachment-list-item']", text: name, count:)enddef wait_until_visiblediff --git a/spec/support/components/autocompleter/ng_select_autocomplete_helpers.rb b/spec/support/components/autocompleter/ng_select_autocomplete_helpers.rbindex 54c04323275..40701070723 100644--- a/spec/support/components/autocompleter/ng_select_autocomplete_helpers.rb+++ b/spec/support/components/autocompleter/ng_select_autocomplete_helpers.rb@@ -10,7 +10,7 @@ module Components::Autocompleter# Wait for autocompleter options to be loaded (data fetching is debounced by 250ms after creation or typing)wait_for_network_idle if using_cuprite? && wait_for_fetched_options- expect(element).not_to have_selector('.ng-spinner-loader')+ expect(element).to have_no_css('.ng-spinner-loader')# Insert the text to findwithin(element) do@@ -18,7 +18,7 @@ module Components::Autocompleterend# Wait for options to be refreshed after having entered some text.- expect(element).not_to have_selector('.ng-spinner-loader')+ expect(element).to have_no_css('.ng-spinner-loader')# probably not necessary anymoresleep(0.5) unless using_cuprite?@@ -42,13 +42,13 @@ module Components::Autocompleterdef expect_ng_option(element, option, results_selector: nil)within(ng_find_dropdown(element, results_selector:)) do- expect(page).to have_selector('.ng-option', text: option)+ expect(page).to have_css('.ng-option', text: option)endenddef expect_no_ng_option(element, option, results_selector: nil)within(ng_find_dropdown(element, results_selector:)) do- expect(page).not_to have_selector('.ng-option', text: option)+ expect(page).to have_no_css('.ng-option', text: option)endenddiff --git a/spec/support/components/common/sidemenu.rb b/spec/support/components/common/sidemenu.rbindex f92ae7598e1..7a0be6b48ec 100644--- a/spec/support/components/common/sidemenu.rb+++ b/spec/support/components/common/sidemenu.rb@@ -34,11 +34,11 @@ module Componentsinclude RSpec::Matchersdef expect_open- expect(page).to have_selector('[data-test-selector="op-sidemenu"]')+ expect(page).to have_css('[data-test-selector="op-sidemenu"]')enddef expect_item_not_visible(item)- expect(page).not_to have_selector(item_selector, text: item)+ expect(page).to have_no_selector(item_selector, text: item)enddef expect_item_with_count(item, count)@@ -61,17 +61,17 @@ module Componentsdef finished_loadingwait_for_network_idle if using_cuprite?- expect(page).not_to have_selector('[data-test-selector="op-ian-center--loading-indicator"]')+ expect(page).to have_no_css('[data-test-selector="op-ian-center--loading-indicator"]')endprivatedef expect_count(count)- expect(page).to have_selector('.op-bubble', text: count)+ expect(page).to have_css('.op-bubble', text: count)enddef expect_no_count- expect(page).not_to have_selector('.op-bubble')+ expect(page).to have_no_css('.op-bubble')enddef item_action_selector(item)diff --git a/spec/support/components/datepicker/datepicker.rb b/spec/support/components/datepicker/datepicker.rbindex cb9ccb3c3ad..d075465ec01 100644--- a/spec/support/components/datepicker/datepicker.rb+++ b/spec/support/components/datepicker/datepicker.rb@@ -44,11 +44,11 @@ module Componentsenddef expect_visible- expect(container).to have_selector('.flatpickr-calendar .flatpickr-current-month', wait: 10)+ expect(container).to have_css('.flatpickr-calendar .flatpickr-current-month', wait: 10)enddef expect_not_visible- expect(container).not_to have_selector('.flatpickr-calendar .flatpickr-current-month', wait: 10)+ expect(container).to have_no_css('.flatpickr-calendar .flatpickr-current-month', wait: 10)end##@@ -124,13 +124,13 @@ module Components### Expect the selected daydef expect_day(value)- expect(flatpickr_container).to have_selector('.flatpickr-day.selected', text: value)+ expect(flatpickr_container).to have_css('.flatpickr-day.selected', text: value)end### Expect the selected yeardef expect_year(value)- expect(flatpickr_container).to have_selector('.cur-year') { |field|+ expect(flatpickr_container).to have_css('.cur-year') { |field|field.value.to_i == value.to_i}end@@ -150,32 +150,32 @@ module Components# Expect the given date to be non workingdef expect_non_working(date)label = date.strftime('%B %-d, %Y')- expect(page).to have_selector(".flatpickr-day.flatpickr-non-working-day[aria-label='#{label}']",- wait: 20)+ expect(page).to have_css(".flatpickr-day.flatpickr-non-working-day[aria-label='#{label}']",+ wait: 20)end### Expect the given date to be non workingdef expect_working(date)label = date.strftime('%B %-d, %Y')- expect(page).to have_selector(".flatpickr-day:not(.flatpickr-non-working-day)[aria-label='#{label}']",- wait: 20)+ expect(page).to have_css(".flatpickr-day:not(.flatpickr-non-working-day)[aria-label='#{label}']",+ wait: 20)end### Expect the given date to be non workingdef expect_disabled(date)label = date.strftime('%B %-d, %Y')- expect(page).to have_selector(".flatpickr-day.flatpickr-disabled[aria-label='#{label}']",- wait: 20)+ expect(page).to have_css(".flatpickr-day.flatpickr-disabled[aria-label='#{label}']",+ wait: 20)end### Expect the given date to be non workingdef expect_not_disabled(date)label = date.strftime('%B %-d, %Y')- expect(page).to have_selector(".flatpickr-day:not(.flatpickr-disabled)[aria-label='#{label}']",- wait: 20)+ expect(page).to have_css(".flatpickr-day:not(.flatpickr-disabled)[aria-label='#{label}']",+ wait: 20)endprotecteddiff --git a/spec/support/components/datepicker/range_datepicker.rb b/spec/support/components/datepicker/range_datepicker.rbindex 749d0babba9..c3d4698218f 100644--- a/spec/support/components/datepicker/range_datepicker.rb+++ b/spec/support/components/datepicker/range_datepicker.rb@@ -1,4 +1,4 @@-require_relative './basic_datepicker'+require_relative 'basic_datepicker'module Componentsclass RangeDatepicker < BasicDatepickerdiff --git a/spec/support/components/datepicker/work_package_datepicker.rb b/spec/support/components/datepicker/work_package_datepicker.rbindex 9ce64b92b2f..7dae71dc634 100644--- a/spec/support/components/datepicker/work_package_datepicker.rb+++ b/spec/support/components/datepicker/work_package_datepicker.rb@@ -87,11 +87,11 @@ module Componentsenddef expect_start_highlighted- expect(container).to have_selector('[data-test-selector="op-datepicker-modal--start-date-field"][data-qa-highlighted]')+ expect(container).to have_css('[data-test-selector="op-datepicker-modal--start-date-field"][data-qa-highlighted]')enddef expect_due_highlighted- expect(container).to have_selector('[data-test-selector="op-datepicker-modal--end-date-field"][data-qa-highlighted]')+ expect(container).to have_css('[data-test-selector="op-datepicker-modal--end-date-field"][data-qa-highlighted]')enddef duration_field@@ -128,7 +128,7 @@ module Componentsenddef expect_duration_highlighted- expect(container).to have_selector('[data-test-selector="op-datepicker-modal--duration-field"][data-qa-highlighted]')+ expect(container).to have_css('[data-test-selector="op-datepicker-modal--duration-field"][data-qa-highlighted]')enddef expect_scheduling_mode(manually)diff --git a/spec/support/components/global_search.rb b/spec/support/components/global_search.rbindex 60c90993fdc..e9cefdeadb2 100644--- a/spec/support/components/global_search.rb+++ b/spec/support/components/global_search.rb@@ -59,32 +59,32 @@ module Componentsdef expect_global_scope_markedexpect(page)- .to have_selector('.global-search--project-scope[title="all_projects"]', wait: 10)+ .to have_css('.global-search--project-scope[title="all_projects"]', wait: 10)enddef expect_in_project_and_subproject_scope_markedexpect(page)- .to have_selector('.global-search--project-scope[title="current_project_and_all_descendants"]', wait: 10)+ .to have_css('.global-search--project-scope[title="current_project_and_all_descendants"]', wait: 10)enddef expect_scope(text)expect(page)- .to have_selector('.global-search--project-scope', text:, wait: 10)+ .to have_css('.global-search--project-scope', text:, wait: 10)enddef expect_work_package_marked(wp)expect(page)- .to have_selector('.ng-option-marked', text: wp.subject.to_s, wait: 10)+ .to have_css('.ng-option-marked', text: wp.subject.to_s, wait: 10)enddef expect_work_package_option(wp)expect(page)- .to have_selector('.global-search--option', text: wp.subject.to_s, wait: 10)+ .to have_css('.global-search--option', text: wp.subject.to_s, wait: 10)enddef expect_no_work_package_option(wp)expect(page)- .not_to have_selector('.global-search--option', text: wp.subject.to_s)+ .to have_no_css('.global-search--option', text: wp.subject.to_s)enddef click_work_package(wp)@@ -96,7 +96,7 @@ module Componentsenddef find_option(text)- expect(page).to have_selector('.global-search--wp-subject', text:, wait: 10)+ expect(page).to have_css('.global-search--wp-subject', text:, wait: 10)find('.global-search--wp-subject', text:)enddiff --git a/spec/support/components/grids/grid_area.rb b/spec/support/components/grids/grid_area.rbindex bd0922502d0..e779d7f0c44 100644--- a/spec/support/components/grids/grid_area.rb+++ b/spec/support/components/grids/grid_area.rb@@ -39,7 +39,7 @@ module Componentsopen_menuwithin('ul.dropdown-menu') do |element|- expect(element).to have_selector('span', text:)+ expect(element).to have_css('span', text:)endend@@ -89,7 +89,7 @@ module Componentsdef expect_not_resizablewithin area doexpect(page)- .not_to have_selector('.grid--area.-widgeted resizer')+ .to have_no_css('.grid--area.-widgeted resizer')endend@@ -98,14 +98,14 @@ module Componentswithin area doexpect(page)- .not_to have_selector(".grid--area-drag-handle")+ .to have_no_css(".grid--area-drag-handle")endenddef expect_not_renameablewithin area doexpect(page)- .to have_selector(".editable-toolbar-title--fixed")+ .to have_css(".editable-toolbar-title--fixed")endend@@ -114,7 +114,7 @@ module Componentswithin area doexpect(page)- .not_to have_selector(".icon-show-more-horizontal")+ .to have_no_css(".icon-show-more-horizontal")endend@@ -150,7 +150,7 @@ module Componentspage.find('.op-toast--close').clickend- expect(page).not_to have_selector('.op-toast')+ expect(page).to have_no_css('.op-toast')endendenddiff --git a/spec/support/components/menu/dropdown.rb b/spec/support/components/menu/dropdown.rbindex 9785376212d..95f42498c74 100644--- a/spec/support/components/menu/dropdown.rb+++ b/spec/support/components/menu/dropdown.rb@@ -37,11 +37,11 @@ module Componentsenddef expect_closed- expect(page).not_to have_selector('.op-app-menu--dropdown')+ expect(page).to have_no_css('.op-app-menu--dropdown')enddef expect_open- expect(page).to have_selector('.op-app-menu--dropdown')+ expect(page).to have_css('.op-app-menu--dropdown')enddef within_dropdown(&)diff --git a/spec/support/components/menu/quick_add_menu.rb b/spec/support/components/menu/quick_add_menu.rbindex 9219192d30a..0524a5aee9e 100644--- a/spec/support/components/menu/quick_add_menu.rb+++ b/spec/support/components/menu/quick_add_menu.rb@@ -25,7 +25,7 @@## See COPYRIGHT and LICENSE files for more details.#++-require_relative './dropdown'+require_relative 'dropdown'module Componentsclass QuickAddMenu < Dropdown@@ -57,7 +57,7 @@ module Componentsdef expect_no_work_package_typeswithin_dropdown do- expect(page).not_to have_text 'Work packages'+ expect(page).to have_no_text 'Work packages'endend@@ -72,7 +72,7 @@ module Componentsif presentexpect(page).to have_link matcherelse- expect(page).not_to have_link matcher+ expect(page).to have_no_link matcherendendenddiff --git a/spec/support/components/password_confirmation_dialog.rb b/spec/support/components/password_confirmation_dialog.rbindex b0531ac14b5..71482c8a035 100644--- a/spec/support/components/password_confirmation_dialog.rb+++ b/spec/support/components/password_confirmation_dialog.rb@@ -47,7 +47,7 @@ module Componentsenddef expect_closed- expect(page).not_to have_selector(selector)+ expect(page).to have_no_selector(selector)enddef submit_button@@ -68,10 +68,10 @@ module Componentsendif should_fail- expect(page).to have_selector('.op-toast.-error',- text: I18n.t(:notice_password_confirmation_failed))+ expect(page).to have_css('.op-toast.-error',+ text: I18n.t(:notice_password_confirmation_failed))else- expect(page).not_to have_selector('.op-toast.-error')+ expect(page).to have_no_css('.op-toast.-error')endendenddiff --git a/spec/support/components/project_include_component.rb b/spec/support/components/project_include_component.rbindex c44f78b70ec..281f97096f0 100644--- a/spec/support/components/project_include_component.rb+++ b/spec/support/components/project_include_component.rb@@ -42,11 +42,11 @@ module Componentsenddef expect_open- expect(page).to have_selector("[data-test-selector='project-include-list']")+ expect(page).to have_css("[data-test-selector='project-include-list']")enddef expect_count(count)- expect(page).to have_selector("[data-test-selector='project-include-button'] .badge", text: count)+ expect(page).to have_css("[data-test-selector='project-include-button'] .badge", text: count)enddef toggle_include_all_subprojects@@ -89,7 +89,7 @@ module Componentsenddef expect_closed- expect(page).not_to have_selector("[data-test-selector='project-include-list']")+ expect(page).to have_no_css("[data-test-selector='project-include-list']")enddef click_button(text)@@ -115,7 +115,7 @@ module Componentsenddef no_loading_indicator- expect(page).not_to have_selector("[data-test-selector='op-project-include--loading']")+ expect(page).to have_no_css("[data-test-selector='op-project-include--loading']")endendenddiff --git a/spec/support/components/projects/top_menu.rb b/spec/support/components/projects/top_menu.rbindex 411c3e96879..f8cba3c4eba 100644--- a/spec/support/components/projects/top_menu.rb+++ b/spec/support/components/projects/top_menu.rb@@ -59,7 +59,7 @@ module Componentsenddef expect_closed- expect(page).not_to have_selector(autocompleter_selector)+ expect(page).to have_no_selector(autocompleter_selector)enddef search(query)@@ -98,7 +98,7 @@ module Componentsdef expect_no_result(name)within search_results do- expect(page).not_to have_selector(autocompleter_item_title_selector, text: name)+ expect(page).to have_no_selector(autocompleter_item_title_selector, text: name)endend@@ -110,7 +110,7 @@ module Componentswithin search_results dohierarchy_selector = hierarchy_level.times.collect { autocompleter_item_selector }.join(' ')expect(page)- .to have_selector("#{hierarchy_selector} #{autocompleter_item_title_selector}", text: item_name)+ .to have_css("#{hierarchy_selector} #{autocompleter_item_title_selector}", text: item_name)endenddiff --git a/spec/support/components/table_pagination.rb b/spec/support/components/table_pagination.rbindex 2197fb04e12..1906d590867 100644--- a/spec/support/components/table_pagination.rb+++ b/spec/support/components/table_pagination.rb@@ -35,14 +35,14 @@ module Componentsdef expect_range(from, to, total)within_pagination doexpect(page)- .to have_selector('.op-pagination--range', text: "(#{from} - #{to}/#{total})")+ .to have_css('.op-pagination--range', text: "(#{from} - #{to}/#{total})")endenddef expect_no_per_page_optionswithin_pagination doexpect(page)- .not_to have_selector('.op-pagination--options')+ .to have_no_css('.op-pagination--options')endenddiff --git a/spec/support/components/timelines/timeline_row.rb b/spec/support/components/timelines/timeline_row.rbindex f9a76a46e3e..3aa050dd374 100644--- a/spec/support/components/timelines/timeline_row.rb+++ b/spec/support/components/timelines/timeline_row.rb@@ -47,15 +47,15 @@ module Componentshover!unless left.nil?- expect(container).to have_selector(".labelHoverLeft.not-empty", text: left)+ expect(container).to have_css(".labelHoverLeft.not-empty", text: left)endunless right.nil?- expect(container).to have_selector(".labelHoverRight.not-empty", text: right)+ expect(container).to have_css(".labelHoverRight.not-empty", text: right)end- expect(container).to have_selector(".labelLeft", visible: false)- expect(container).to have_selector(".labelRight", visible: false)- expect(container).to have_selector(".labelFarRight", visible: false)+ expect(container).to have_css(".labelLeft", visible: false)+ expect(container).to have_css(".labelRight", visible: false)+ expect(container).to have_css(".labelFarRight", visible: false)enddef expect_labels(left:, right:, farRight:)@@ -65,10 +65,10 @@ module ComponentslabelFarRight: farRight}.each do |className, text|if text.nil?- expect(container).to have_selector(".#{className}", visible: :all)- expect(container).not_to have_selector(".#{className}.not-empty", wait: 0)+ expect(container).to have_css(".#{className}", visible: :all)+ expect(container).to have_no_css(".#{className}.not-empty", wait: 0)else- expect(container).to have_selector(".#{className}.not-empty", text:)+ expect(container).to have_css(".#{className}.not-empty", text:)endendend@@ -87,22 +87,22 @@ module Componentsdef expect_hovered_bar(duration: 1)expected_length = duration * 30- expect(container).to have_selector('div[class^="__hl_background_"', style: { width: "#{expected_length}px" })+ expect(container).to have_css('div[class^="__hl_background_"', style: { width: "#{expected_length}px" })enddef expect_bar(duration: 1)loading_indicator_saveguardexpected_length = duration * 30- expect(container).to have_selector('.timeline-element', style: { width: "#{expected_length}px" })+ expect(container).to have_css('.timeline-element', style: { width: "#{expected_length}px" })enddef expect_no_hovered_bar- expect(container).not_to have_selector('div[class^="__hl_background_"')+ expect(container).to have_no_css('div[class^="__hl_background_"')enddef expect_no_barloading_indicator_saveguard- expect(container).not_to have_selector('.timeline-element')+ expect(container).to have_no_css('.timeline-element')enddef drag_and_drop(offset_days: 0, days: 1)diff --git a/spec/support/components/users/invite_user_modal.rb b/spec/support/components/users/invite_user_modal.rbindex 902121547e6..7639a879812 100644--- a/spec/support/components/users/invite_user_modal.rb+++ b/spec/support/components/users/invite_user_modal.rb@@ -178,7 +178,7 @@ module Componentsdef expect_error_displayed(message)within_modal doexpect(page)- .to have_selector('.spot-form-field--error', text: message)+ .to have_css('.spot-form-field--error', text: message)endenddiff --git a/spec/support/components/work_packages/activities.rb b/spec/support/components/work_packages/activities.rbindex 7befb7d2716..0b6bb814d27 100644--- a/spec/support/components/work_packages/activities.rb+++ b/spec/support/components/work_packages/activities.rb@@ -47,11 +47,11 @@ module Componentsenddef expect_notification_count(count)- expect(page).to have_selector('[data-test-selector="tab-counter-Activity"] span', text: count)+ expect(page).to have_css('[data-test-selector="tab-counter-Activity"] span', text: count)enddef expect_no_notification_badge- expect(page).not_to have_selector('[data-test-selector="tab-counter-Activity"] span')+ expect(page).to have_no_css('[data-test-selector="tab-counter-Activity"] span')enddef hover_action(journal_id, action)diff --git a/spec/support/components/work_packages/baseline.rb b/spec/support/components/work_packages/baseline.rbindex 3d740525d83..bebb5598402 100644--- a/spec/support/components/work_packages/baseline.rb+++ b/spec/support/components/work_packages/baseline.rb@@ -34,30 +34,30 @@ module Componentsinclude RSpec::Matchersdef expect_active- expect(page).to have_selector('.wp-table--baseline-th')+ expect(page).to have_css('.wp-table--baseline-th')enddef expect_legends- expect(page).to have_selector('.op-baseline-legends')+ expect(page).to have_css('.op-baseline-legends')enddef expect_legend_text(text)- expect(page).to have_selector('.op-baseline-legends--filter', text:)+ expect(page).to have_css('.op-baseline-legends--filter', text:)enddef expect_legend_tooltip(text)- expect(page).to have_selector('[data-test-selector="baseline-legend-time-offset"]', visible: :all) { |node|+ expect(page).to have_css('[data-test-selector="baseline-legend-time-offset"]', visible: :all) { |node|node['title'] == text}enddef expect_no_legends- expect(page).not_to have_selector('.op-baseline-legends')+ expect(page).to have_no_css('.op-baseline-legends')enddef expect_inactive- expect(page).not_to have_selector('.wp-table--baseline-th')- expect(page).not_to have_selector('.op-table-baseline--column-cell')+ expect(page).to have_no_css('.wp-table--baseline-th')+ expect(page).to have_no_css('.op-table-baseline--column-cell')enddef expect_changed(work_package)@@ -74,13 +74,13 @@ module Componentsdef expect_unchanged(work_package)page.within(row_selector(work_package)) do- expect(page).not_to have_selector(".op-table-baseline--column-cell *")+ expect(page).to have_no_css(".op-table-baseline--column-cell *")endenddef expect_icon(work_package, icon_type)page.within(row_selector(work_package)) do- expect(page).to have_selector(".op-table-baseline--icon-#{icon_type}")+ expect(page).to have_css(".op-table-baseline--icon-#{icon_type}")endend@@ -88,12 +88,12 @@ module Componentspage.within(row_selector(work_package)) dochanges.each do |attribute, (old_value, new_value)|base_selector = ".op-table-baseline--container.#{attribute}"- expect(page).to have_selector("#{base_selector} .op-table-baseline--old-field", text: old_value)+ expect(page).to have_css("#{base_selector} .op-table-baseline--old-field", text: old_value)if new_value == ''- expect(page).to have_selector("#{base_selector} .op-table-baseline--new-field", text: '', visible: :all)+ expect(page).to have_css("#{base_selector} .op-table-baseline--new-field", text: '', visible: :all)else- expect(page).to have_selector("#{base_selector} .op-table-baseline--new-field", text: new_value)+ expect(page).to have_css("#{base_selector} .op-table-baseline--new-field", text: new_value)endendend@@ -102,7 +102,7 @@ module Componentsdef expect_unchanged_attributes(work_package, *changes)page.within(row_selector(work_package)) dochanges.each do |attribute|- expect(page).not_to have_selector(".#{attribute}.op-table-baseline--old-field")+ expect(page).to have_no_css(".#{attribute}.op-table-baseline--old-field")endendenddiff --git a/spec/support/components/work_packages/baseline_modal.rb b/spec/support/components/work_packages/baseline_modal.rbindex 5bd50b53e3a..441ca4f171a 100644--- a/spec/support/components/work_packages/baseline_modal.rb+++ b/spec/support/components/work_packages/baseline_modal.rb@@ -38,11 +38,11 @@ module Componentsenddef expect_closed- expect(page).not_to have_selector('op-baseline')+ expect(page).to have_no_css('op-baseline')enddef expect_open- expect(page).to have_selector('op-baseline')+ expect(page).to have_css('op-baseline')expect(page).to have_field('op-baseline-filter')end@@ -55,7 +55,7 @@ module Componentsenddef expect_no_time_field- expect(page).not_to have_field('op-baseline-time')+ expect(page).to have_no_field('op-baseline-time')enddef select_filter(option)@@ -64,11 +64,11 @@ module Componentsenddef expect_offset(value, count: 1)- expect(page).to have_selector('.op-baseline--time-help', text: value, count:)+ expect(page).to have_css('.op-baseline--time-help', text: value, count:)enddef expect_time_help_text(text)- expect(page).to have_selector('.spot-form-field--description', text:)+ expect(page).to have_css('.spot-form-field--description', text:)enddef set_time(value, selector = 'op-baseline-time')diff --git a/spec/support/components/work_packages/columns.rb b/spec/support/components/work_packages/columns.rbindex 1b4f581efa9..fd84e227bd3 100644--- a/spec/support/components/work_packages/columns.rb+++ b/spec/support/components/work_packages/columns.rb@@ -58,7 +58,7 @@ module Componentsmodal_open? or open_modalcolumn_autocompleter.click- expect(page).not_to have_selector('.ng-option', text: name, visible: :all)+ expect(page).to have_no_css('.ng-option', text: name, visible: :all)close_autocompleterend@@ -66,7 +66,7 @@ module Componentsmodal_open? or open_modalcolumn_autocompleter.click- expect(page).to have_selector('.ng-option', text: name, visible: :all)+ expect(page).to have_css('.ng-option', text: name, visible: :all)close_autocompleterend@@ -82,7 +82,7 @@ module Componentswithin ".work-package-table" do# for some reason these columns (e.g. 'Overall costs') don't have a proper linkif finicky- expect(page).to have_selector("a", text: /#{name}/i, visible: :all)+ expect(page).to have_css("a", text: /#{name}/i, visible: :all)elseexpect(page).to have_link(name)end@@ -103,13 +103,13 @@ module Componentsdef expect_checked(name)within_modal do- expect(page).to have_selector('.op-draggable-autocomplete--item', text: name)+ expect(page).to have_css('.op-draggable-autocomplete--item', text: name)endenddef expect_unchecked(name)within_modal do- expect(page).not_to have_selector('.op-draggable-autocomplete--item', text: name)+ expect(page).to have_no_css('.op-draggable-autocomplete--item', text: name)endend@@ -117,7 +117,7 @@ module Componentsopen_modal unless modal_open?within_modal do- expect(page).to have_selector('.op-draggable-autocomplete--item', minimum: 1)+ expect(page).to have_css('.op-draggable-autocomplete--item', minimum: 1)page.all('.op-draggable-autocomplete--remove-item').each(&:click)enddiff --git a/spec/support/components/work_packages/context_menu.rb b/spec/support/components/work_packages/context_menu.rbindex 180be2eea1c..d2210ec7319 100644--- a/spec/support/components/work_packages/context_menu.rb+++ b/spec/support/components/work_packages/context_menu.rb@@ -62,7 +62,7 @@ module Componentsenddef expect_closed- expect(page).not_to have_selector(selector)+ expect(page).to have_no_selector(selector)enddef choose(target)@@ -72,14 +72,14 @@ module Componentsdef expect_no_options(*options)expect_openoptions.each do |text|- expect(page).not_to have_selector("#{selector} .menu-item", text:)+ expect(page).to have_no_css("#{selector} .menu-item", text:)endenddef expect_options(options)expect_openoptions.each do |text|- expect(page).to have_selector("#{selector} .menu-item", text:)+ expect(page).to have_css("#{selector} .menu-item", text:)endenddiff --git a/spec/support/components/work_packages/destroy_modal.rb b/spec/support/components/work_packages/destroy_modal.rbindex 5df43bc3760..26849110f5c 100644--- a/spec/support/components/work_packages/destroy_modal.rb+++ b/spec/support/components/work_packages/destroy_modal.rb@@ -41,12 +41,12 @@ module Componentspage.within(container) doif wps.length == 1wp = wps.first- expect(page).to have_selector('strong', text: "#{wp.subject} ##{wp.id}")+ expect(page).to have_css('strong', text: "#{wp.subject} ##{wp.id}")else- expect(page).to have_selector('.danger-zone--warning',- text: 'Are you sure you want to delete the following work packages?')+ expect(page).to have_css('.danger-zone--warning',+ text: 'Are you sure you want to delete the following work packages?')wps.each do |wp|- expect(page).to have_selector('li', text: "##{wp.id} #{wp.subject}")+ expect(page).to have_css('li', text: "##{wp.id} #{wp.subject}")endendenddiff --git a/spec/support/components/work_packages/display_representation.rb b/spec/support/components/work_packages/display_representation.rbindex a359ec1d3e8..ea9690a87e0 100644--- a/spec/support/components/work_packages/display_representation.rb+++ b/spec/support/components/work_packages/display_representation.rb@@ -49,14 +49,14 @@ module Componentsenddef expect_state(text)- expect(page).to have_selector('#wp-view-toggle-button', text:, wait: 10)+ expect(page).to have_css('#wp-view-toggle-button', text:, wait: 10)endprivatedef expect_button(forbidden_text)expect(page).to have_button('wp-view-toggle-button', disabled: false)- expect(page).not_to have_selector('#wp-view-toggle-button', text: forbidden_text)+ expect(page).to have_no_css('#wp-view-toggle-button', text: forbidden_text)enddef select_view(view_name)diff --git a/spec/support/components/work_packages/filters.rb b/spec/support/components/work_packages/filters.rbindex 304f809c698..8aa278f297c 100644--- a/spec/support/components/work_packages/filters.rb+++ b/spec/support/components/work_packages/filters.rb@@ -48,7 +48,7 @@ module Componentsenddef expect_filter_count(num)- expect(filter_button).to have_selector('.badge', text: num, wait: 10)+ expect(filter_button).to have_css('.badge', text: num, wait: 10)enddef expect_open@@ -97,7 +97,7 @@ module Componentsdef expect_loadedSeleniumHubWaiter.wait- expect(filter_button).to have_selector('.badge', wait: 2)+ expect(filter_button).to have_css('.badge', wait: 2)enddef add_filter(name)@@ -138,7 +138,7 @@ module Componentsresults_selector: '.ng-dropdown-panel-items')within target_dropdown do- expect(page).not_to have_selector('.ng-option', text: name)+ expect(page).to have_no_css('.ng-option', text: name)endend@@ -152,7 +152,7 @@ module Componentselsif valueexpect_value(id, Array(value))else- expect(page).not_to have_selector("#values-#{id}")+ expect(page).to have_no_css("#values-#{id}")endend@@ -191,8 +191,8 @@ module Componentsdef expect_no_filter_by(name, selector = nil)id = selector || name.downcase- expect(page).not_to have_select("operators-#{id}")- expect(page).not_to have_select("values-#{id}")+ expect(page).to have_no_select("operators-#{id}")+ expect(page).to have_no_select("values-#{id}")enddef expect_filter_order(name, values, selector = nil)@@ -298,7 +298,7 @@ module Componentsdef expect_value_placeholder(id)filter_element = page.find("#filter_#{id}")if filter_element.has_selector?(".ng-select-container", wait: false)- expect(filter_element).to have_selector(".ng-placeholder", text: I18n.t('js.placeholders.selection'))+ expect(filter_element).to have_css(".ng-placeholder", text: I18n.t('js.placeholders.selection'))elseraise "Non ng-select may not have placeholders currently"end@@ -308,7 +308,7 @@ module Componentswithin_values(id) do |is_select|if is_selectvalue.each do |v|- expect(page).to have_selector("#values-#{id} .ng-value-label", text: v)+ expect(page).to have_css("#values-#{id} .ng-value-label", text: v)endelsif page.has_selector?("#filter_#{id} [data-test-selector='op-basic-range-date-picker']", wait: false)expected_value =diff --git a/spec/support/components/work_packages/group_by.rb b/spec/support/components/work_packages/group_by.rbindex a6d1f012534..eed43445175 100644--- a/spec/support/components/work_packages/group_by.rb+++ b/spec/support/components/work_packages/group_by.rb@@ -64,7 +64,7 @@ module Componentsenddef expect_no_groups- expect(page).not_to have_css('[data-test-selector="op-group--value"]')+ expect(page).to have_no_css('[data-test-selector="op-group--value"]')enddef expect_not_grouped_by(name)diff --git a/spec/support/components/work_packages/hierarchies.rb b/spec/support/components/work_packages/hierarchies.rbindex c7b2f93a390..2dffe645368 100644--- a/spec/support/components/work_packages/hierarchies.rb+++ b/spec/support/components/work_packages/hierarchies.rb@@ -62,17 +62,17 @@ module Componentsenddef expect_no_hierarchies- expect(page).not_to have_selector('.wp-table--hierarchy-span')+ expect(page).to have_no_css('.wp-table--hierarchy-span')endalias_method :expect_mode_disabled, :expect_no_hierarchiesdef expect_mode_enabled- expect(page).to have_selector('.wp-table--table-header .icon-hierarchy')+ expect(page).to have_css('.wp-table--table-header .icon-hierarchy')enddef expect_mode_disabled- expect(page).to have_selector('.wp-table--table-header .icon-no-hierarchy')+ expect(page).to have_css('.wp-table--table-header .icon-no-hierarchy')enddef expect_indent(work_package, indent: true, outdent: true)@@ -99,7 +99,7 @@ module Componentsdef expect_leaf_at(*work_packages)work_packages.each do |wp|- expect(page).to have_selector(".wp-row-#{wp.id} .wp-table--leaf-indicator")+ expect(page).to have_css(".wp-row-#{wp.id} .wp-table--leaf-indicator")endend@@ -110,17 +110,17 @@ module Componentsselector = ".wp-row-#{wp.id} .wp-table--hierarchy-indicator"if collapsed- expect(page).to have_selector("#{selector}#{collapsed_sel}")+ expect(page).to have_css("#{selector}#{collapsed_sel}")elseexpect(page).to have_selector(selector)- expect(page).not_to have_selector("#{selector}#{collapsed_sel}")+ expect(page).to have_no_css("#{selector}#{collapsed_sel}")endendenddef expect_hidden(*work_packages)work_packages.each do |wp|- expect(page).to have_selector(".wp-row-#{wp.id}", visible: :hidden)+ expect(page).to have_css(".wp-row-#{wp.id}", visible: :hidden)endenddiff --git a/spec/support/components/work_packages/query_menu.rb b/spec/support/components/work_packages/query_menu.rbindex 97ab5801a36..6adfd25f692 100644--- a/spec/support/components/work_packages/query_menu.rb+++ b/spec/support/components/work_packages/query_menu.rb@@ -63,11 +63,11 @@ module Componentsenddef expect_menu_entry_not_visible(name)- expect(page).not_to have_selector(autocompleter_item_selector, text: name)+ expect(page).to have_no_selector(autocompleter_item_selector, text: name)enddef expect_no_menu_entry- expect(page).not_to have_selector(autocompleter_item_selector)+ expect(page).to have_no_selector(autocompleter_item_selector)endendenddiff --git a/spec/support/components/work_packages/query_title.rb b/spec/support/components/work_packages/query_title.rbindex 3e7d8f0325f..9b9e5ec9cd2 100644--- a/spec/support/components/work_packages/query_title.rb+++ b/spec/support/components/work_packages/query_title.rb@@ -34,13 +34,13 @@ module Componentsinclude RSpec::Matchersdef expect_changed- expect(page).to have_selector '.editable-toolbar-title--save'- expect(page).to have_selector '.editable-toolbar-title--input.-changed'+ expect(page).to have_css '.editable-toolbar-title--save'+ expect(page).to have_css '.editable-toolbar-title--input.-changed'enddef expect_not_changed- expect(page).not_to have_selector '.editable-toolbar-title--save'- expect(page).not_to have_selector '.editable-toolbar-title--input.-changed'+ expect(page).to have_no_css '.editable-toolbar-title--save'+ expect(page).to have_no_css '.editable-toolbar-title--input.-changed'enddef input_fielddiff --git a/spec/support/components/work_packages/relations.rb b/spec/support/components/work_packages/relations.rbindex e27f33e0b30..b3dbb96610c 100644--- a/spec/support/components/work_packages/relations.rb+++ b/spec/support/components/work_packages/relations.rb@@ -56,7 +56,7 @@ module ComponentsSeleniumHubWaiter.waitrow.find('.relation-row--type').click- expect(row).to have_selector('select.inline-edit--field')+ expect(row).to have_css('select.inline-edit--field')row.find('.inline-edit--field option', text: to_type).select_optionend@@ -107,13 +107,13 @@ module Componentsquery: to.subject,select_text: to.subject- expect(page).to have_selector('.relation-group--header',- text: relation_label.upcase,- wait: 10)+ expect(page).to have_css('.relation-group--header',+ text: relation_label.upcase,+ wait: 10)- expect(page).to have_selector("[data-test-selector='op-relation--row-type']", text: to.type.name.upcase)+ expect(page).to have_css("[data-test-selector='op-relation--row-type']", text: to.type.name.upcase)- expect(page).to have_selector("[data-test-selector='op-relation--row-subject']", text: to.subject)+ expect(page).to have_css("[data-test-selector='op-relation--row-subject']", text: to.subject)## Test if relation existwork_package.reload@@ -123,15 +123,15 @@ module Componentsenddef expect_relation(relatable)- expect(relations_group).to have_selector("[data-test-selector='op-relation--row-subject']", text: relatable.subject)+ expect(relations_group).to have_css("[data-test-selector='op-relation--row-subject']", text: relatable.subject)enddef expect_relation_by_text(text)- expect(relations_group).to have_selector("[data-test-selector='op-relation--row-subject']", text:)+ expect(relations_group).to have_css("[data-test-selector='op-relation--row-subject']", text:)enddef expect_no_relation(relatable)- expect(page).not_to have_selector("[data-test-selector='op-relation--row-subject']", text: relatable.subject)+ expect(page).to have_no_css("[data-test-selector='op-relation--row-subject']", text: relatable.subject)enddef add_parent(query, work_package)@@ -149,13 +149,13 @@ module Componentsenddef expect_parent(work_package)- expect(page).to have_selector '[data-test-selector="op-wp-breadcrumb-parent"]',- text: work_package.subject,- wait: 10+ expect(page).to have_css '[data-test-selector="op-wp-breadcrumb-parent"]',+ text: work_package.subject,+ wait: 10enddef expect_no_parent- expect(page).not_to have_selector '[data-test-selector="op-wp-breadcrumb-parent"]', wait: 10+ expect(page).to have_no_css '[data-test-selector="op-wp-breadcrumb-parent"]', wait: 10enddef remove_parent@@ -177,7 +177,8 @@ module Componentsnext if page.has_selector?('.wp-relations--children .ng-input input')SeleniumHubWaiter.wait- find('[data-test-selector="op-wp-inline-create-reference"]', text: I18n.t('js.relation_buttons.add_existing_child')).click+ find('[data-test-selector="op-wp-inline-create-reference"]',+ text: I18n.t('js.relation_buttons.add_existing_child')).click# Security check to be sure that the autocompleter has finished loadingpage.find '.wp-relations--children .ng-input input'@@ -198,7 +199,7 @@ module Componentswithin container doexpect(page)- .to have_selector('.wp-table--cell-td.subject', text: work_package.subject, wait: 10)+ .to have_css('.wp-table--cell-td.subject', text: work_package.subject, wait: 10)endend@@ -206,7 +207,7 @@ module Componentspage.within('wp-relations-tab .work-packages-embedded-view--container') dorow = ".wp-row-#{work_package.id}-table"- expect(page).not_to have_selector(row)+ expect(page).to have_no_selector(row)endenddiff --git a/spec/support/components/work_packages/settings_menu.rb b/spec/support/components/work_packages/settings_menu.rbindex 5fbb570c178..409201ef8da 100644--- a/spec/support/components/work_packages/settings_menu.rb+++ b/spec/support/components/work_packages/settings_menu.rb@@ -67,7 +67,7 @@ module Componentsenddef expect_closed- expect(page).not_to have_selector(selector)+ expect(page).to have_no_selector(selector)enddef choose(target)@@ -77,7 +77,7 @@ module Componentsdef expect_options(options)expect_openoptions.each do |text|- expect(page).to have_selector("#{selector} a", text:)+ expect(page).to have_css("#{selector} a", text:)endenddiff --git a/spec/support/components/work_packages/share_modal.rb b/spec/support/components/work_packages/share_modal.rbindex 628331e12a7..13192b89ac4 100644--- a/spec/support/components/work_packages/share_modal.rb+++ b/spec/support/components/work_packages/share_modal.rb@@ -69,7 +69,7 @@ module Componentsdef expect_not_selectable(*principals)principals.each do |principal|within user_row(principal) do- expect(page).not_to have_field(principal.name)+ expect(page).to have_no_field(principal.name)endendend@@ -112,7 +112,7 @@ module Componentsdef expect_select_all_not_availableexpect(shares_header)- .not_to have_field('toggle_all', wait: 0)+ .to have_no_field('toggle_all', wait: 0)enddef expect_select_all_toggled@@ -136,7 +136,7 @@ module Componentsdef expect_bulk_actions_not_availablewithin shares_header do- expect(page).not_to have_button('Remove', wait: 0)+ expect(page).to have_no_button('Remove', wait: 0)expect(page).not_to have_test_selector('op-share-wp-bulk-update-role', wait: 0)endend@@ -311,7 +311,7 @@ module Componentswithin shares_list doprincipals.each do |principal|expect(page)- .not_to have_text(principal.name)+ .to have_no_text(principal.name)endendend@@ -388,7 +388,7 @@ module Componentsdef expect_no_user_limit_warningwithin modal_element doexpect(page)- .not_to have_text(I18n.t('work_package.sharing.warning_user_limit_reached'), wait: 0)+ .to have_no_text(I18n.t('work_package.sharing.warning_user_limit_reached'), wait: 0)endend@@ -403,7 +403,7 @@ module Componentswithin modal_element doexpect(page).to have_css('[data-test-selector="op-share-wp-error-message"]',- text: text)+ text:)endend@@ -417,7 +417,7 @@ module Componentsdef expect_no_select_a_user_hintwithin modal_element doexpect(page)- .not_to have_text(I18n.t("work_package.sharing.warning_no_selected_user"), wait: 0)+ .to have_no_text(I18n.t("work_package.sharing.warning_no_selected_user"), wait: 0)endendenddiff --git a/spec/support/components/work_packages/sort_by.rb b/spec/support/components/work_packages/sort_by.rbindex e4082efa09d..8190221af51 100644--- a/spec/support/components/work_packages/sort_by.rb+++ b/spec/support/components/work_packages/sort_by.rb@@ -70,7 +70,7 @@ module Components.each_with_index do |entry, i|column, direction = entrypage.within(".modal-sorting-row-#{i}") do- expect(page).to have_selector("#modal-sorting-attribute-#{i} option", text: column)+ expect(page).to have_css("#modal-sorting-attribute-#{i} option", text: column)checked_radio = (descending?(direction) ? 'Descending' : 'Ascending')expect(page.find_field(checked_radio)).to be_checkedenddiff --git a/spec/support/components/work_packages/table_configuration/filters.rb b/spec/support/components/work_packages/table_configuration/filters.rbindex d3d148e0a0a..991bb86a077 100644--- a/spec/support/components/work_packages/table_configuration/filters.rb+++ b/spec/support/components/work_packages/table_configuration/filters.rb@@ -47,13 +47,13 @@ module Componentsdef expect_filter_count(count)within(modal.selector) do- expect(page).to have_selector('.advanced-filters--filter', count:)+ expect(page).to have_css('.advanced-filters--filter', count:)endenddef expect_openmodal.expect_open- expect(page).to have_selector('.op-tab-row--link_selected', text: 'FILTERS')+ expect(page).to have_css('.op-tab-row--link_selected', text: 'FILTERS')enddelegate :expect_closed, to: :modaldiff --git a/spec/support/components/work_packages/table_configuration_modal.rb b/spec/support/components/work_packages/table_configuration_modal.rbindex bd1910dc2c5..e371a53149c 100644--- a/spec/support/components/work_packages/table_configuration_modal.rb+++ b/spec/support/components/work_packages/table_configuration_modal.rb@@ -94,11 +94,11 @@ module Componentsenddef expect_closed- expect(page).not_to have_selector(selector)+ expect(page).to have_no_selector(selector)enddef expect_disabled_tab(name)- expect(page).to have_selector("#{selector} [data-qa-tab-disabled]", text: name.upcase, wait: 10)+ expect(page).to have_css("#{selector} [data-qa-tab-disabled]", text: name.upcase, wait: 10)enddef selected_tab(name)diff --git a/spec/support/components/work_packages/tabs_counter.rb b/spec/support/components/work_packages/tabs_counter.rbindex b069ad4e1d6..cfd6fb1e021 100644--- a/spec/support/components/work_packages/tabs_counter.rb+++ b/spec/support/components/work_packages/tabs_counter.rb@@ -13,14 +13,14 @@ module Components# Check value of counter for the given tabdef expect_counter(tab, content)- expect(tab).to have_selector('[data-test-selector="tab-count"]')+ expect(tab).to have_css('[data-test-selector="tab-count"]')- expect(tab).to have_selector('[data-test-selector="tab-count"]', text: "(#{content})")+ expect(tab).to have_css('[data-test-selector="tab-count"]', text: "(#{content})")end# Counter should not be displayed, if there are no relations or watchersdef expect_no_counter(tab)- expect(tab).not_to have_selector('[data-test-selector="tab-count"]', wait: 10)+ expect(tab).to have_no_css('[data-test-selector="tab-count"]', wait: 10)endendenddiff --git a/spec/support/components/work_packages/timer_button.rb b/spec/support/components/work_packages/timer_button.rbindex 01b76dc0b77..e01fceaf7ce 100644--- a/spec/support/components/work_packages/timer_button.rb+++ b/spec/support/components/work_packages/timer_button.rb@@ -34,22 +34,22 @@ module Componentsinclude RSpec::Matchersdef expect_active- expect(page).to have_selector('[data-test-selector="timer-active"]', wait: 10)+ expect(page).to have_css('[data-test-selector="timer-active"]', wait: 10)enddef expect_inactive- expect(page).to have_selector('[data-test-selector="timer-inactive"]', wait: 10)+ expect(page).to have_css('[data-test-selector="timer-inactive"]', wait: 10)enddef expect_time(text)- expect(page).to have_selector('[data-test-selector="timer-active"]', wait: 10, text:)+ expect(page).to have_css('[data-test-selector="timer-active"]', wait: 10, text:)enddef expect_visible(visible: true)if visible- expect(page).to have_selector('op-wp-timer-button')+ expect(page).to have_css('op-wp-timer-button')else- expect(page).not_to have_selector('op-wp-timer-button')+ expect(page).to have_no_css('op-wp-timer-button')endenddiff --git a/spec/support/components/wysiwyg/wysiwyg_editor.rb b/spec/support/components/wysiwyg/wysiwyg_editor.rbindex 03930bc781d..74e20ec81ba 100644--- a/spec/support/components/wysiwyg/wysiwyg_editor.rb+++ b/spec/support/components/wysiwyg/wysiwyg_editor.rb@@ -52,7 +52,7 @@ module Componentsenddef expect_no_button(label)- expect(container).not_to have_css('.ck-button', visible: :all, text: label)+ expect(container).to have_no_css('.ck-button', visible: :all, text: label)enddef expect_value(value)@@ -61,7 +61,7 @@ module Componentsdef expect_supports_no_macrosexpect(container)- .not_to have_css('.ck-button', visible: :all, text: 'Macros')+ .to have_no_css('.ck-button', visible: :all, text: 'Macros')enddef within_enabled_previewdiff --git a/spec/support/contracts/shared.rb b/spec/support/contracts/shared.rbindex a25cea570e1..aac3dfe1341 100644--- a/spec/support/contracts/shared.rb+++ b/spec/support/contracts/shared.rb@@ -7,7 +7,7 @@ RSpec.shared_context 'model contract' doit 'explains the not writable error' doinstance.validateexpect(instance.errors.details[attribute])- .to match_array [{ error: :error_readonly }]+ .to contain_exactly({ error: :error_readonly })endenddiff --git a/spec/support/cuprite_setup.rb b/spec/support/cuprite_setup.rbindex 0f9c354ccc8..f85bfae5a1e 100644--- a/spec/support/cuprite_setup.rb+++ b/spec/support/cuprite_setup.rb@@ -123,7 +123,7 @@ RSpec.configure do |config|endend- config.around(:each, type: :feature, with_cuprite: true) do |example|+ config.around(:each, :with_cuprite, type: :feature) do |example|original_driver = Capybara.javascript_driverbeginCapybara.javascript_driver = :better_cuprite_endiff --git a/spec/support/edit_fields/date_edit_field.rb b/spec/support/edit_fields/date_edit_field.rbindex 1d9e61be50a..23eb391cd10 100644--- a/spec/support/edit_fields/date_edit_field.rb+++ b/spec/support/edit_fields/date_edit_field.rb@@ -1,4 +1,4 @@-require_relative './edit_field'+require_relative 'edit_field'class DateEditField < EditFieldattr_accessor :milestone, :is_table@@ -115,12 +115,12 @@ class DateEditField < EditFielddef expect_inactive!expect(context).to have_selector(display_selector, wait: 10)- expect(page).not_to have_selector("#{modal_selector} #{input_selector}")+ expect(page).to have_no_css("#{modal_selector} #{input_selector}")enddef expect_calendarwithin_modal do- expect(page).to have_selector(".flatpickr-calendar")+ expect(page).to have_css(".flatpickr-calendar")endend@@ -132,7 +132,7 @@ class DateEditField < EditFieldset_value valuesave! if save- expect_state! open: (expect_failure || !save)+ expect_state! open: expect_failure || !saveendend@@ -150,7 +150,7 @@ class DateEditField < EditFieldenddef expect_value(value)- expect(page).to have_selector(".#{property_name} .spot-input", value:)+ expect(page).to have_css(".#{property_name} .spot-input", value:)enddef set_active_date(value)diff --git a/spec/support/edit_fields/edit_field.rb b/spec/support/edit_fields/edit_field.rbindex 2a5e728991e..a1195cd92c7 100644--- a/spec/support/edit_fields/edit_field.rb+++ b/spec/support/edit_fields/edit_field.rb@@ -50,7 +50,7 @@ class EditFieldenddef expect_read_only- expect(context).to have_selector "#{@selector} #{display_selector}.-read-only"+ expect(context).to have_css "#{@selector} #{display_selector}.-read-only"enddef expect_state_text(text)@@ -123,19 +123,19 @@ class EditFielddef expect_inactive!expect(field_container).to have_selector(display_selector, wait: 10)- expect(field_container).not_to have_selector(field_type)+ expect(field_container).to have_no_selector(field_type)enddef expect_enabled!- expect(@context).not_to have_selector "#{@selector} #{input_selector}[disabled]"+ expect(@context).to have_no_css "#{@selector} #{input_selector}[disabled]"enddef expect_invalid- expect(page).to have_selector("#{@selector} #{field_type}:invalid")+ expect(page).to have_css("#{@selector} #{field_type}:invalid")enddef expect_error- expect(page).to have_selector("#{@selector} .-error")+ expect(page).to have_css("#{@selector} .-error")enddef save!diff --git a/spec/support/edit_fields/project_status_field.rb b/spec/support/edit_fields/project_status_field.rbindex e343e8a30be..d2aa17157b1 100644--- a/spec/support/edit_fields/project_status_field.rb+++ b/spec/support/edit_fields/project_status_field.rb@@ -1,5 +1,5 @@require 'support/components/autocompleter/ng_select_autocomplete_helpers'-require_relative './edit_field'+require_relative 'edit_field'class ProjectStatusField < EditFieldinclude ::Components::Autocompleter::NgSelectAutocompleteHelpersdiff --git a/spec/support/edit_fields/select_edit_field.rb b/spec/support/edit_fields/select_edit_field.rbindex efc00d5676f..41ec5f28e69 100644--- a/spec/support/edit_fields/select_edit_field.rb+++ b/spec/support/edit_fields/select_edit_field.rb@@ -1,4 +1,4 @@-require_relative './edit_field'+require_relative 'edit_field'class SelectField < EditFielddef expect_value(value)diff --git a/spec/support/edit_fields/spent_time_edit_field.rb b/spec/support/edit_fields/spent_time_edit_field.rbindex fb0664cd283..99ad4605de7 100644--- a/spec/support/edit_fields/spent_time_edit_field.rb+++ b/spec/support/edit_fields/spent_time_edit_field.rb@@ -1,11 +1,11 @@-require_relative './edit_field'+require_relative 'edit_field'class SpentTimeEditField < EditFielddef time_log_icon_visible(visible)if visible- expect(page).to have_selector("#{@selector} #{display_selector} #{icon}")+ expect(page).to have_css("#{@selector} #{display_selector} #{icon}")else- expect(page).not_to have_selector("#{@selector} #{display_selector} #{icon}")+ expect(page).to have_no_css("#{@selector} #{display_selector} #{icon}")endenddiff --git a/spec/support/edit_fields/text_area_field.rb b/spec/support/edit_fields/text_area_field.rbindex 17b72b301c9..e6ded427446 100644--- a/spec/support/edit_fields/text_area_field.rb+++ b/spec/support/edit_fields/text_area_field.rb@@ -1,4 +1,4 @@-require_relative './edit_field'+require_relative 'edit_field'class TextAreaField < EditFielddef input_selector@@ -7,9 +7,9 @@ class TextAreaField < EditFielddef expect_save_button(enabled: true)if enabled- expect(field_container).not_to have_selector("#{control_link}[disabled]")+ expect(field_container).to have_no_css("#{control_link}[disabled]")else- expect(field_container).to have_selector("#{control_link}[disabled]")+ expect(field_container).to have_css("#{control_link}[disabled]")endenddiff --git a/spec/support/edit_fields/text_editor_field.rb b/spec/support/edit_fields/text_editor_field.rbindex 14572e03870..0917279fc40 100644--- a/spec/support/edit_fields/text_editor_field.rb+++ b/spec/support/edit_fields/text_editor_field.rb@@ -1,4 +1,4 @@-require_relative './edit_field'+require_relative 'edit_field'class TextEditorField < EditFielddef ckeditor@@ -11,9 +11,9 @@ class TextEditorField < EditFielddef expect_save_button(enabled: true)if enabled- expect(field_container).not_to have_selector("#{control_link}[disabled]")+ expect(field_container).to have_no_css("#{control_link}[disabled]")else- expect(field_container).to have_selector("#{control_link}[disabled]")+ expect(field_container).to have_css("#{control_link}[disabled]")endenddiff --git a/spec/support/edit_fields/work_package_status_field.rb b/spec/support/edit_fields/work_package_status_field.rbindex 1615f46725f..d22b552eaf2 100644--- a/spec/support/edit_fields/work_package_status_field.rb+++ b/spec/support/edit_fields/work_package_status_field.rb@@ -1,4 +1,4 @@-require_relative './edit_field'+require_relative 'edit_field'class WorkPackageStatusField < EditFielddef initialize(context)@@ -51,6 +51,6 @@ class WorkPackageStatusField < EditFieldenddef expect_inactive!- expect(page).not_to have_selector(input_selector)+ expect(page).to have_no_selector(input_selector)endenddiff --git a/spec/support/form_fields/editor_form_field.rb b/spec/support/form_fields/editor_form_field.rbindex e9cf8ebedce..d34bddaa6d2 100644--- a/spec/support/form_fields/editor_form_field.rb+++ b/spec/support/form_fields/editor_form_field.rb@@ -1,4 +1,4 @@-require_relative './form_field'+require_relative 'form_field'module FormFieldsclass EditorFormField < FormFielddiff --git a/spec/support/form_fields/form_field.rb b/spec/support/form_fields/form_field.rbindex a5c2d03d933..0166973fd1e 100644--- a/spec/support/form_fields/form_field.rb+++ b/spec/support/form_fields/form_field.rb@@ -17,7 +17,7 @@ module FormFieldsdef expect_requiredexpect(field_container)- .to have_selector '.spot-form-field--label-indicator', text: '*'+ .to have_css '.spot-form-field--label-indicator', text: '*'enddef field_containerdiff --git a/spec/support/form_fields/input_form_field.rb b/spec/support/form_fields/input_form_field.rbindex 6114f950715..632df32d5cb 100644--- a/spec/support/form_fields/input_form_field.rb+++ b/spec/support/form_fields/input_form_field.rb@@ -1,14 +1,14 @@-require_relative './form_field'+require_relative 'form_field'module FormFieldsclass InputFormField < FormFielddef expect_value(value)scroll_to_element(field_container)- expect(field_container).to have_selector('input') { |el| el.value == value }+ expect(field_container).to have_css('input') { |el| el.value == value }enddef expect_visible- expect(field_container).to have_selector('input')+ expect(field_container).to have_css('input')end##@@ -28,8 +28,8 @@ module FormFieldsendend- def send_keys(*args)- input_element.send_keys(*args)+ def send_keys(*)+ input_element.send_keys(*)enddef input_elementdiff --git a/spec/support/form_fields/select_form_field.rb b/spec/support/form_fields/select_form_field.rbindex d59026770ca..030359699f8 100644--- a/spec/support/form_fields/select_form_field.rb+++ b/spec/support/form_fields/select_form_field.rb@@ -1,10 +1,10 @@-require_relative './form_field'+require_relative 'form_field'module FormFieldsclass SelectFormField < FormFielddef expect_selected(*values)values.each do |val|- expect(field_container).to have_selector('.ng-value', text: val)+ expect(field_container).to have_css('.ng-value', text: val)endend@@ -12,11 +12,11 @@ module FormFieldsfield_container.find('.ng-select-container').clickexpect(page)- .not_to have_selector('.ng-option', text: option, visible: :all)+ .to have_no_css('.ng-option', text: option, visible: :all)enddef expect_visible- expect(field_container).to have_selector('ng-select')+ expect(field_container).to have_css('ng-select')enddef select_option(*values)diff --git a/spec/support/local_storage_cleanup.rb b/spec/support/local_storage_cleanup.rbindex 83dbb3c8fc3..25c8802585f 100644--- a/spec/support/local_storage_cleanup.rb+++ b/spec/support/local_storage_cleanup.rb@@ -27,7 +27,7 @@#++RSpec.configure do |config|- config.after(:each, js: true) do+ config.after(:each, :js) doCapybara.current_session.driver.execute_script('window.localStorage.clear()')rescue StandardErrornildiff --git a/spec/support/matchers/has_conditional_selector.rb b/spec/support/matchers/has_conditional_selector.rbindex eb30eeab6be..905cc1775c5 100644--- a/spec/support/matchers/has_conditional_selector.rb+++ b/spec/support/matchers/has_conditional_selector.rb@@ -36,11 +36,11 @@module Capybaramodule Nodemodule Matchers- def has_conditional_selector?(condition, *args, **kw_args)+ def has_conditional_selector?(condition, *, **kw_args)if condition- has_selector? *args, **kw_args+ has_selector?(*, **kw_args)else- has_no_selector? *args, **kw_args+ has_no_selector?(*, **kw_args)endendenddiff --git a/spec/support/onboarding_helper.rb b/spec/support/onboarding_helper.rbindex 00f73f9d1f7..335d3c3b4eb 100644--- a/spec/support/onboarding_helper.rb+++ b/spec/support/onboarding_helper.rb@@ -30,7 +30,7 @@ require 'spec_helper'module OnboardingHelperdef step_through_onboarding_wp_tour(project, wp)- expect(page).not_to have_selector('.op-loading-indicator')+ expect(page).to have_no_css('.op-loading-indicator')expect(page).to have_text sanitize_string(I18n.t('js.onboarding.steps.wp.list')), normalize_ws: truenext_button.click@@ -69,7 +69,7 @@ module OnboardingHelperexpect(page).to have_text sanitize_string(I18n.t('js.onboarding.steps.help_menu')), normalize_ws: truenext_button.click- expect(page).not_to have_selector '.enjoy_hint_label'+ expect(page).to have_no_css '.enjoy_hint_label'enddef sanitize_string(string)diff --git a/spec/support/pages/admin/individual_principals/edit.rb b/spec/support/pages/admin/individual_principals/edit.rbindex 074759908e0..d733655b0b1 100644--- a/spec/support/pages/admin/individual_principals/edit.rb+++ b/spec/support/pages/admin/individual_principals/edit.rb@@ -81,18 +81,18 @@ module Pagesenddef expect_project(project_name)- expect(page).to have_selector('tr', text: project_name, wait: 10)+ expect(page).to have_css('tr', text: project_name, wait: 10)enddef expect_no_membership(project_name)- expect(page).not_to have_selector('tr', text: project_name)+ expect(page).to have_no_css('tr', text: project_name)enddef expect_roles(project_name, roles)row = page.find('tr', text: project_name, wait: 10)roles.each do |role|- expect(row).to have_selector('span', text: role)+ expect(row).to have_css('span', text: role)endenddiff --git a/spec/support/pages/admin/placeholder_users/index.rb b/spec/support/pages/admin/placeholder_users/index.rbindex 8f314cdc694..de7663d002a 100644--- a/spec/support/pages/admin/placeholder_users/index.rb+++ b/spec/support/pages/admin/placeholder_users/index.rb@@ -53,10 +53,10 @@ module Pagesdef expect_non_listedexpect(page)- .not_to have_selector('tr.placeholder-user')+ .to have_no_css('tr.placeholder-user')expect(page)- .to have_selector('tr.generic-table--empty-row', text: 'There is currently nothing to display.')+ .to have_css('tr.generic-table--empty-row', text: 'There is currently nothing to display.')enddef filter_by_name(value)@@ -75,18 +75,18 @@ module Pagesenddef expect_no_delete_button_for_all_rows- expect(page).to have_selector('i.icon-help2')+ expect(page).to have_css('i.icon-help2')enddef expect_no_delete_button(placeholder_user)within_placeholder_user_row(placeholder_user) do- expect(page).to have_selector('i.icon-help2')+ expect(page).to have_css('i.icon-help2')endenddef expect_delete_button(placeholder_user)within_placeholder_user_row(placeholder_user) do- expect(page).to have_selector('i.icon-delete')+ expect(page).to have_css('i.icon-delete')endenddiff --git a/spec/support/pages/admin/users/edit.rb b/spec/support/pages/admin/users/edit.rbindex f510a4d02cc..c48d97c78d6 100644--- a/spec/support/pages/admin/users/edit.rb+++ b/spec/support/pages/admin/users/edit.rb@@ -77,18 +77,18 @@ module Pagesenddef expect_project(project_name)- expect(page).to have_selector('tr', text: project_name, wait: 10)+ expect(page).to have_css('tr', text: project_name, wait: 10)enddef expect_no_membership(project_name)- expect(page).not_to have_selector('tr', text: project_name)+ expect(page).to have_no_css('tr', text: project_name)enddef expect_roles(project_name, roles)row = page.find('tr', text: project_name, wait: 10)roles.each do |role|- expect(row).to have_selector('span', text: role)+ expect(row).to have_css('span', text: role)endenddiff --git a/spec/support/pages/admin/users/index.rb b/spec/support/pages/admin/users/index.rbindex 79928704241..10837724eaf 100644--- a/spec/support/pages/admin/users/index.rb+++ b/spec/support/pages/admin/users/index.rb@@ -48,15 +48,15 @@ module Pagesdef expect_non_listedexpect(page)- .not_to have_selector('tr.user')+ .to have_no_css('tr.user')expect(page)- .to have_selector('tr.generic-table--empty-row', text: 'There is currently nothing to display.')+ .to have_css('tr.generic-table--empty-row', text: 'There is currently nothing to display.')enddef expect_user_locked(user)expect(page)- .to have_selector('tr.user.locked td.username', text: user.login)+ .to have_css('tr.user.locked td.username', text: user.login)enddef filter_by_status(value)diff --git a/spec/support/pages/members.rb b/spec/support/pages/members.rbindex 17b186b195b..227aee8d712 100644--- a/spec/support/pages/members.rb+++ b/spec/support/pages/members.rb@@ -41,7 +41,7 @@ module Pagesdef visit!super- expect(page).to have_selector('h2', text: I18n.t(:label_member_plural))+ expect(page).to have_css('h2', text: I18n.t(:label_member_plural))selfend@@ -219,9 +219,9 @@ module Pagesdef expect_sorted_by(column, desc: false)page.within('.generic-table--sort-header', text: column.upcase) doif desc- expect(page).to have_selector('.sort.desc')+ expect(page).to have_css('.sort.desc')else- expect(page).to have_selector('.sort.asc')+ expect(page).to have_css('.sort.asc')endendenddiff --git a/spec/support/pages/messages/index.rb b/spec/support/pages/messages/index.rbindex 18edf08b9e4..5b6c16d42d5 100644--- a/spec/support/pages/messages/index.rb+++ b/spec/support/pages/messages/index.rb@@ -52,13 +52,13 @@ module Pages::Messagesrow = subject.find(:xpath, '..')within(row) do- expect(page).to have_selector('td.replies', text: replies) if replies- expect(page).to have_selector('td.last_message', text: last_message) if last_message+ expect(page).to have_css('td.replies', text: replies) if replies+ expect(page).to have_css('td.last_message', text: last_message) if last_messageendenddef expect_num_replies(amount)- expect(page).to have_selector('td.replies', text: amount)+ expect(page).to have_css('td.replies', text: amount)endendenddiff --git a/spec/support/pages/messages/show.rb b/spec/support/pages/messages/show.rbindex 1eee294ddf7..708680bbbc7 100644--- a/spec/support/pages/messages/show.rb+++ b/spec/support/pages/messages/show.rb@@ -37,11 +37,11 @@ module Pages::Messagesenddef expect_subject(subject)- expect(page).to have_selector('.title-container', text: subject)+ expect(page).to have_css('.title-container', text: subject)enddef expect_content(content)- expect(page).to have_selector('.forum-message .wiki', text: content)+ expect(page).to have_css('.forum-message .wiki', text: content)enddef expect_no_replies@@ -57,7 +57,7 @@ module Pages::Messagesclick_button 'Submit'- expect(page).to have_selector('.forum-message--comments', text:)+ expect(page).to have_css('.forum-message--comments', text:)Message.lastend@@ -88,7 +88,7 @@ module Pages::Messagessubject_field.native.send_keys(:return)text = (quoted_message || Message.first).content- expect(page).to have_selector('.forum-message--comments blockquote', text:)+ expect(page).to have_css('.forum-message--comments blockquote', text:)Message.lastenddiff --git a/spec/support/pages/my/password_page.rb b/spec/support/pages/my/password_page.rbindex 1ebf28d02f2..0b5a010414f 100644--- a/spec/support/pages/my/password_page.rb+++ b/spec/support/pages/my/password_page.rb@@ -56,7 +56,7 @@ module Pagesdef expect_password_updated_messageexpect(page)- .to have_selector('.op-toast.-info', text: I18n.t(:notice_account_password_updated))+ .to have_css('.op-toast.-info', text: I18n.t(:notice_account_password_updated))endprivatediff --git a/spec/support/pages/notifications/center.rb b/spec/support/pages/notifications/center.rbindex 47c64518ac7..6c0c0d7ac80 100644--- a/spec/support/pages/notifications/center.rb+++ b/spec/support/pages/notifications/center.rb@@ -81,23 +81,23 @@ module Pagesdef expect_no_item(*notifications)notifications.each do |notification|expect(page)- .not_to have_selector("[data-test-selector='op-ian-notification-item-#{notification.id}']")+ .to have_no_css("[data-test-selector='op-ian-notification-item-#{notification.id}']")endenddef expect_read_item(notification)expect(page)- .to have_selector("[data-test-selector='op-ian-notification-item-#{notification.id}'][data-qa-ian-read]")+ .to have_css("[data-test-selector='op-ian-notification-item-#{notification.id}'][data-qa-ian-read]")enddef expect_item_not_read(notification)expect(page)- .not_to have_selector("[data-test-selector='op-ian-notification-item-#{notification.id}'][data-qa-ian-read]")+ .to have_no_css("[data-test-selector='op-ian-notification-item-#{notification.id}'][data-qa-ian-read]")enddef expect_item_selected(notification)expect(page)- .to have_selector("[data-test-selector='op-ian-notification-item-#{notification.id}'][data-qa-ian-selected]")+ .to have_css("[data-test-selector='op-ian-notification-item-#{notification.id}'][data-qa-ian-selected]")enddef expect_work_package_item(*notifications)@@ -111,11 +111,11 @@ module Pagesenddef expect_closed- expect(page).not_to have_selector('op-in-app-notification-center')+ expect(page).to have_no_css('op-in-app-notification-center')enddef expect_open- expect(page).to have_selector('op-in-app-notification-center')+ expect(page).to have_css('op-in-app-notification-center')enddef expect_empty@@ -124,17 +124,17 @@ module Pagesdef expect_number_of_notifications(count)if count == 0- expect(page).not_to have_selector('[data-test-selector^="op-ian-notification-item-"]')+ expect(page).to have_no_css('[data-test-selector^="op-ian-notification-item-"]')else- expect(page).to have_selector('[data-test-selector^="op-ian-notification-item-"]', count:, wait: 10)+ expect(page).to have_css('[data-test-selector^="op-ian-notification-item-"]', count:, wait: 10)endenddef expect_bell_count(count)if count == 0- expect(page).not_to have_selector('[data-test-selector="op-ian-notifications-count"]')+ expect(page).to have_no_css('[data-test-selector="op-ian-notifications-count"]')else- expect(page).to have_selector('[data-test-selector="op-ian-notifications-count"]', text: count, wait: 10)+ expect(page).to have_css('[data-test-selector="op-ian-notifications-count"]', text: count, wait: 10)endend@@ -143,11 +143,11 @@ module Pagesenddef expect_no_toaster- expect(page).not_to have_selector('.op-toast.-info', wait: 10)+ expect(page).to have_no_css('.op-toast.-info', wait: 10)enddef expect_toast- expect(page).to have_selector('.op-toast.-info', wait: 10)+ expect(page).to have_css('.op-toast.-info', wait: 10)enddef update_via_toasterdiff --git a/spec/support/pages/notifications/settings.rb b/spec/support/pages/notifications/settings.rbindex 9db9c84eb95..3cbecb3f8c9 100644--- a/spec/support/pages/notifications/settings.rb+++ b/spec/support/pages/notifications/settings.rb@@ -61,14 +61,14 @@ module Pageswork_package_prioritizedwork_package_scheduled].each do |type|- expect(page).to have_selector("input[type='checkbox'][data-qa-global-notification-type='#{type}']") { |checkbox|+ expect(page).to have_css("input[type='checkbox'][data-qa-global-notification-type='#{type}']") { |checkbox|checkbox.checked? == setting[type]}endenddef expect_project(project)- expect(page).to have_selector('th', text: project.name)+ expect(page).to have_css('th', text: project.name)enddef add_project(project)@@ -99,7 +99,7 @@ module Pagesenddef expect_no_date_alert_setting(label)- expect(page).not_to have_selector(+ expect(page).to have_no_css("select[data-qa-global-notification-type='op-reminder-settings-#{label}-alerts']")end@@ -121,7 +121,7 @@ module Pagesenddef expect_no_project_date_alert_setting(label, project)- expect(page).not_to have_selector(+ expect(page).to have_no_css("select[data-qa-project='#{project}'][data-qa-project-notification-type='op-reminder-settings-#{label}-alerts']")enddiff --git a/spec/support/pages/notifications/split_screen.rb b/spec/support/pages/notifications/split_screen.rbindex f4a691024fd..ff1690bf236 100644--- a/spec/support/pages/notifications/split_screen.rb+++ b/spec/support/pages/notifications/split_screen.rb@@ -35,7 +35,7 @@ module Pagesinclude ::Components::Autocompleter::NgSelectAutocompleteHelpersdef initialize(work_package, project = nil)- super work_package, project+ super(work_package, project)@selector = '.work-packages--details'endenddiff --git a/spec/support/pages/projects/index.rb b/spec/support/pages/projects/index.rbindex 8c5c6c9962b..05f974a9b1f 100644--- a/spec/support/pages/projects/index.rb+++ b/spec/support/pages/projects/index.rb@@ -59,9 +59,9 @@ module Pagesprojects.each do |project|case projectwhen Project- expect(page).not_to have_text(project.name)+ expect(page).to have_no_text(project.name)when String- expect(page).not_to have_text(project)+ expect(page).to have_no_text(project)elseraise ArgumentError, "#{project.inspect} is not a Project or a String"end@@ -89,7 +89,7 @@ module Pagesenddef expect_no_project_create_button- expect(page).not_to have_css('[data-test-selector="project-new-button"]')+ expect(page).to have_no_css('[data-test-selector="project-new-button"]')enddef expect_gantt_button(disabled: false)diff --git a/spec/support/pages/projects/settings.rb b/spec/support/pages/projects/settings.rbindex ee5927f5893..8ddf6e7aac1 100644--- a/spec/support/pages/projects/settings.rb+++ b/spec/support/pages/projects/settings.rb@@ -45,7 +45,7 @@ module Pages# only notice is used as opposed to op-toastdef expect_toast(message:, type: :success)- expect(page).to have_selector(".op-toast.-#{type}", text: message, wait: 10)+ expect(page).to have_css(".op-toast.-#{type}", text: message, wait: 10)enddef expect_type_active(type)diff --git a/spec/support/pages/reminders/settings.rb b/spec/support/pages/reminders/settings.rbindex dca2ff7f375..3e2ff886009 100644--- a/spec/support/pages/reminders/settings.rb+++ b/spec/support/pages/reminders/settings.rb@@ -70,9 +70,9 @@ module Pagesdef expect_immediate_reminder(name, enabled)if enabled- expect(page).to have_selector("input[data-qa-immediate-reminder='#{name}']:checked")+ expect(page).to have_css("input[data-qa-immediate-reminder='#{name}']:checked")else- expect(page).to have_selector("input[data-qa-immediate-reminder='#{name}']:not(:checked)")+ expect(page).to have_css("input[data-qa-immediate-reminder='#{name}']:not(:checked)")endend@@ -112,12 +112,12 @@ module Pagesif pausedexpect(page).to have_checked_field 'Temporarily pause daily email reminders'else- expect(page).not_to have_checked_field 'Temporarily pause daily email reminders'+ expect(page).to have_no_checked_field 'Temporarily pause daily email reminders'endif first && last- expect(page).to have_selector('[data-test-selector="op-basic-range-date-picker"]',- value: "#{first.iso8601} - #{last.iso8601}")+ expect(page).to have_css('[data-test-selector="op-basic-range-date-picker"]',+ value: "#{first.iso8601} - #{last.iso8601}")endenddiff --git a/spec/support/pages/versions/roadmap.rb b/spec/support/pages/versions/roadmap.rbindex fbb1ba2ee6d..3739523dea8 100644--- a/spec/support/pages/versions/roadmap.rb+++ b/spec/support/pages/versions/roadmap.rb@@ -63,7 +63,7 @@ module Pagesdef expect_filter_not_set(filter_name)within '#menu-sidebar' do- expect(page).not_to have_checked_field(filter_name)+ expect(page).to have_no_checked_field(filter_name)endend@@ -78,7 +78,7 @@ module Pagesdef expect_versions_not_listed(*versions)within '#roadmap' doversions.each do |version|- expect(page).not_to have_content version.name+ expect(page).to have_no_content version.nameendendenddiff --git a/spec/support/pages/work_packages/abstract_work_package.rb b/spec/support/pages/work_packages/abstract_work_package.rbindex fe84b3779c3..43a18656f29 100644--- a/spec/support/pages/work_packages/abstract_work_package.rb+++ b/spec/support/pages/work_packages/abstract_work_package.rb@@ -81,7 +81,7 @@ module Pagesdef expect_hidden_field(attribute)page.within(container) do- expect(page).not_to have_selector(".inline-edit--display-field.#{attribute}")+ expect(page).to have_no_css(".inline-edit--display-field.#{attribute}")endend@@ -117,7 +117,7 @@ module Pagesenddef expect_no_group(name)- expect(page).not_to have_css('.attributes-group--header-text', text: name.upcase)+ expect(page).to have_no_css('.attributes-group--header-text', text: name.upcase)enddef expect_attributes(attribute_expectations)@@ -126,13 +126,13 @@ module Pagesif label == 'status'expect(page).to have_css("[data-test-selector='op-wp-status-button'] .button", text: value)else- expect(page).to have_selector(".inline-edit--container.#{label.camelize(:lower)}", text: value)+ expect(page).to have_css(".inline-edit--container.#{label.camelize(:lower)}", text: value)endendenddef expect_no_attribute(label)- expect(page).not_to have_selector(".inline-edit--container.#{label.downcase}")+ expect(page).to have_no_css(".inline-edit--container.#{label.downcase}")endalias :expect_attribute_hidden :expect_no_attribute@@ -140,7 +140,7 @@ module Pagescontainer = '#work-package-activites-container'container += " #activity-#{number}" if number- expect(page).to have_selector("#{container} .op-user-activity--user-line", text: user.name)+ expect(page).to have_css("#{container} .op-user-activity--user-line", text: user.name)enddef expect_activity_message(message)@@ -151,7 +151,7 @@ module Pagesdef expect_no_parentvisit_tab!('relations')- expect(page).not_to have_css('[data-test-selector="op-wp-breadcrumb-parent"]')+ expect(page).to have_no_css('[data-test-selector="op-wp-breadcrumb-parent"]')enddef expect_zen_mode@@ -161,7 +161,7 @@ module Pagesenddef expect_no_zen_mode- expect(page).not_to have_css('.zen-mode')+ expect(page).to have_no_css('.zen-mode')expect(page).to have_css('#main-menu')expect(page).to have_css('.op-app-header')end@@ -178,7 +178,7 @@ module Pagesdef expect_no_custom_action(name)expect(page)- .not_to have_css('.custom-action', text: name)+ .to have_no_css('.custom-action', text: name)enddef expect_custom_action_order(*names)diff --git a/spec/support/pages/work_packages/abstract_work_package_create.rb b/spec/support/pages/work_packages/abstract_work_package_create.rbindex 74ac5a029b0..d96bbf22595 100644--- a/spec/support/pages/work_packages/abstract_work_package_create.rb+++ b/spec/support/pages/work_packages/abstract_work_package_create.rb@@ -59,7 +59,7 @@ module Pagesdef expect_fully_loadedexpect_angular_frontend_initialized- expect(page).to have_selector '#wp-new-inline-edit--field-subject', wait: 20+ expect(page).to have_css '#wp-new-inline-edit--field-subject', wait: 20enddef save!diff --git a/spec/support/pages/work_packages/concerns/work_package_by_button_creator.rb b/spec/support/pages/work_packages/concerns/work_package_by_button_creator.rbindex 3709f881862..b615acf41db 100644--- a/spec/support/pages/work_packages/concerns/work_package_by_button_creator.rb+++ b/spec/support/pages/work_packages/concerns/work_package_by_button_creator.rb@@ -44,26 +44,26 @@ module Pagesdef expect_wp_create_buttonexpect(page)- .to have_selector('.add-work-package:not([disabled])', text: 'Create')+ .to have_css('.add-work-package:not([disabled])', text: 'Create')enddef expect_wp_create_button_disabledexpect(page)- .to have_selector('.add-work-package[disabled]', text: 'Create')+ .to have_css('.add-work-package[disabled]', text: 'Create')enddef expect_type_available_for_create(type)click_wp_create_buttonexpect(page)- .to have_selector('#types-context-menu .menu-item', text: type.name.upcase)+ .to have_css('#types-context-menu .menu-item', text: type.name.upcase)enddef expect_type_not_available_for_create(type)click_wp_create_buttonexpect(page)- .not_to have_selector('#types-context-menu .menu-item', text: type.name.upcase)+ .to have_no_css('#types-context-menu .menu-item', text: type.name.upcase)endprivatediff --git a/spec/support/pages/work_packages/split_work_package.rb b/spec/support/pages/work_packages/split_work_package.rbindex 6065c1704b7..b26b4e8d8a9 100644--- a/spec/support/pages/work_packages/split_work_package.rb+++ b/spec/support/pages/work_packages/split_work_package.rb@@ -34,7 +34,7 @@ module Pagesattr_reader :selectordef initialize(work_package, project = nil)- super work_package, project+ super(work_package, project)@selector = '.work-packages--details'end@@ -44,7 +44,7 @@ module Pagesenddef expect_closed- expect(page).not_to have_selector(@selector)+ expect(page).to have_no_selector(@selector)enddef expect_opendiff --git a/spec/support/pages/work_packages/work_package_card.rb b/spec/support/pages/work_packages/work_package_card.rbindex 54611c7bb6b..326ca58fff8 100644--- a/spec/support/pages/work_packages/work_package_card.rb+++ b/spec/support/pages/work_packages/work_package_card.rb@@ -51,13 +51,13 @@ module Pagesdef expect_type(name)page.within(card_element) do- expect(page).to have_selector('[data-test-selector="op-wp-single-card--content-type"]', text: name.upcase)+ expect(page).to have_css('[data-test-selector="op-wp-single-card--content-type"]', text: name.upcase)endenddef expect_subject(subject)page.within(card_element) do- expect(page).to have_selector('[data-test-selector="op-wp-single-card--content-subject"]', text: subject)+ expect(page).to have_css('[data-test-selector="op-wp-single-card--content-subject"]', text: subject)endenddiff --git a/spec/support/pages/work_packages/work_package_cards.rb b/spec/support/pages/work_packages/work_package_cards.rbindex ab25e5692e6..298993fd047 100644--- a/spec/support/pages/work_packages/work_package_cards.rb+++ b/spec/support/pages/work_packages/work_package_cards.rb@@ -37,18 +37,18 @@ module Pagesenddef expect_work_package_count(count)- expect(page).to have_selector('wp-single-card', count:, wait: 20)+ expect(page).to have_css('wp-single-card', count:, wait: 20)enddef expect_work_package_listed(*work_packages)work_packages.each do |wp|- expect(page).to have_selector("wp-single-card[data-work-package-id='#{wp.id}']", wait: 10)+ expect(page).to have_css("wp-single-card[data-work-package-id='#{wp.id}']", wait: 10)endenddef expect_work_package_not_listed(*work_packages)work_packages.each do |wp|- expect(page).not_to have_selector("wp-single-card[data-work-package-id='#{wp.id}']")+ expect(page).to have_no_css("wp-single-card[data-work-package-id='#{wp.id}']")endend@@ -122,12 +122,12 @@ module Pagesdef select_all_work_packagesfind('body').send_keys [:control, 'a']- expect(page).not_to have_selector '#work-package-context-menu'+ expect(page).to have_no_css '#work-package-context-menu'enddef deselect_all_work_packagesfind('body').send_keys [:control, 'd']- expect(page).not_to have_selector '#work-package-context-menu'+ expect(page).to have_no_css '#work-package-context-menu'enddef card(work_package)diff --git a/spec/support/pages/work_packages/work_packages_table.rb b/spec/support/pages/work_packages/work_packages_table.rbindex fc68a9d418f..7106f4b40cb 100644--- a/spec/support/pages/work_packages/work_packages_table.rb+++ b/spec/support/pages/work_packages/work_packages_table.rb@@ -51,9 +51,9 @@ module Pagesdef expect_work_package_listed(*work_packages)within(table_container) dowork_packages.each do |wp|- expect(page).to have_selector(".wp-row-#{wp.id} td.subject",- text: wp.subject,- wait: 20)+ expect(page).to have_css(".wp-row-#{wp.id} td.subject",+ text: wp.subject,+ wait: 20)endendend@@ -61,7 +61,7 @@ module Pagesdef expect_work_package_with_attributes(work_package, attr_value_hash)within(table_container) doattr_value_hash.each do |column, value|- expect(page).to have_selector(+ expect(page).to have_css(".wp-row-#{work_package.id} td.#{column}", text: value.to_s, wait: 20)end@@ -71,7 +71,7 @@ module Pagesdef expect_sums_row_with_attributes(attr_value_hash)within(table_container) doattr_value_hash.each do |column, value|- expect(page).to have_selector(+ expect(page).to have_css(".wp-table--sums-row div.#{column}", text: value.to_s, wait: 10)end@@ -80,15 +80,15 @@ module Pagesdef expect_work_package_subject(subject)within(table_container) do- expect(page).to have_selector("td.subject",- text: subject,- wait: 20)+ expect(page).to have_css("td.subject",+ text: subject,+ wait: 20)endenddef expect_work_package_count(count)within(table_container) do- expect(page).to have_selector(".wp--row", count:, wait: 20)+ expect(page).to have_css(".wp--row", count:, wait: 20)endend@@ -107,7 +107,7 @@ module Pagesretry_block(args: { tries: 3, base_interval: 5 }) dowithin(table_container) dowork_packages.each do |wp|- expect(page).not_to have_selector(".wp-row-#{wp.id} td.subject", text: wp.subject)+ expect(page).to have_no_css(".wp-row-#{wp.id} td.subject", text: wp.subject)endendend@@ -134,7 +134,7 @@ module Pagesexpect(page).to have_field('editable-toolbar-title', with: name, wait: 10)elseexpect(page)- .to have_selector('.toolbar-container', text: name, wait: 10)+ .to have_css('.toolbar-container', text: name, wait: 10)endend@@ -142,7 +142,7 @@ module Pagespage.find('.title-container').clickpage.within('#viewSelect') do- expect(page).to have_selector('.op-sidemenu--item-action', text: name)+ expect(page).to have_css('.op-sidemenu--item-action', text: name)endend@@ -153,7 +153,7 @@ module Pagessleep 3container.find('[data-test-selector="op-wp-inline-create"]').click- expect(container).to have_selector('.wp-inline-create-row', wait: 10)+ expect(container).to have_css('.wp-inline-create-row', wait: 10)enddef open_split_view(work_package)diff --git a/spec/support/pages/work_packages/work_packages_timeline.rb b/spec/support/pages/work_packages/work_packages_timeline.rbindex b5012fc2ae3..ef851ea56a7 100644--- a/spec/support/pages/work_packages/work_packages_timeline.rb+++ b/spec/support/pages/work_packages/work_packages_timeline.rb@@ -45,7 +45,7 @@ module Pagesdef expect_row_count(num)within(timeline_container) do- expect(page).to have_selector('.wp-timeline-cell', count: num)+ expect(page).to have_css('.wp-timeline-cell', count: num)endend@@ -55,7 +55,7 @@ module Pagesif page.has_selector?('#wp-view-toggle-button', text: 'Gantt')within(timeline_container) dowork_packages.each do |wp|- expect(page).to have_selector(".wp-row-#{wp.id}-timeline", visible: true)+ expect(page).to have_css(".wp-row-#{wp.id}-timeline", visible: true)endendend@@ -67,7 +67,7 @@ module Pagesif page.has_selector?('#wp-view-toggle-button', text: 'Gantt')within(timeline_container) dowork_packages.each do |wp|- expect(page).not_to have_selector(".wp-row-#{wp.id}-timeline", visible: true)+ expect(page).to have_no_css(".wp-row-#{wp.id}-timeline", visible: true)endendend@@ -85,11 +85,11 @@ module Pagesdef expect_timeline!(open: true)if open- expect(page).to have_selector('#wp-view-toggle-button', text: 'Gantt')- expect(page).to have_selector('.wp-table-timeline--container .wp-timeline-cell')+ expect(page).to have_css('#wp-view-toggle-button', text: 'Gantt')+ expect(page).to have_css('.wp-table-timeline--container .wp-timeline-cell')else- expect(page).not_to have_selector('#wp-view-toggle-button', text: 'Gantt')- expect(page).not_to have_selector('.wp-table-timeline--container .wp-timeline-cell', visible: true)+ expect(page).to have_no_css('#wp-view-toggle-button', text: 'Gantt')+ expect(page).to have_no_css('.wp-table-timeline--container .wp-timeline-cell', visible: true)endend@@ -122,34 +122,34 @@ module Pagesraise ArgumentError, "Invalid value"end- expect(page).to have_selector(".wp-table-timeline--header-inner[data-current-zoom-level='#{value}']")+ expect(page).to have_css(".wp-table-timeline--header-inner[data-current-zoom-level='#{value}']")enddef expect_timeline_element(work_package)type = work_package.milestone? ? :milestone : :bar- expect(page).to have_selector(".wp-row-#{work_package.id}-timeline .timeline-element.#{type}")+ expect(page).to have_css(".wp-row-#{work_package.id}-timeline .timeline-element.#{type}")enddef expect_timeline_relation(from, to)within(timeline_container) do- expect(page).to have_selector(".relation-line.__tl-relation-#{from.id}.__tl-relation-#{to.id}", minimum: 1)+ expect(page).to have_css(".relation-line.__tl-relation-#{from.id}.__tl-relation-#{to.id}", minimum: 1)endenddef expect_no_timeline_relation(from, to)within(timeline_container) do- expect(page).not_to have_selector(".relation-line.__tl-relation-#{from.id}.__tl-relation-#{to.id}")+ expect(page).to have_no_css(".relation-line.__tl-relation-#{from.id}.__tl-relation-#{to.id}")endenddef expect_no_relationswithin(timeline_container) do- expect(page).not_to have_selector(".relation-line")+ expect(page).to have_no_css(".relation-line")endenddef expect_hidden_row(work_package)- expect(page).to have_selector(".wp-row-#{work_package.id}-timeline", visible: :hidden)+ expect(page).to have_css(".wp-row-#{work_package.id}-timeline", visible: :hidden)endendenddiff --git a/spec/support/puffing_billy_proxy.rb b/spec/support/puffing_billy_proxy.rbindex 9450b14aa22..ccee3840aea 100644--- a/spec/support/puffing_billy_proxy.rb+++ b/spec/support/puffing_billy_proxy.rb@@ -45,7 +45,7 @@ require 'table_print' # Add this dependency to your gemfile# https://github.com/oesmith/puffing-billy/issues/253module BillyProxyPatchdef stop- return unless EM.reactor_running?+ nil unless EM.reactor_running?rescue Errno::ECONNRESET => ewarn "Got error while shutting down Billy proxy"enddiff --git a/spec/support/queries/filters/shared_filter_examples.rb b/spec/support/queries/filters/shared_filter_examples.rbindex f4e96083526..660bd975475 100644--- a/spec/support/queries/filters/shared_filter_examples.rb+++ b/spec/support/queries/filters/shared_filter_examples.rb@@ -391,8 +391,8 @@ RSpec.shared_examples_for 'boolean query filter' do |scope: true|describe '#allowed_values' doit 'is list for a bool' doexpect(instance.allowed_values)- .to match_array [[I18n.t(:general_text_yes), OpenProject::Database::DB_VALUE_TRUE],- [I18n.t(:general_text_no), OpenProject::Database::DB_VALUE_FALSE]]+ .to contain_exactly([I18n.t(:general_text_yes), OpenProject::Database::DB_VALUE_TRUE],+ [I18n.t(:general_text_no), OpenProject::Database::DB_VALUE_FALSE])endend@@ -554,7 +554,7 @@ RSpec.shared_examples_for 'filter by work package id' do.and_return([visible_wp])expect(instance.value_objects)- .to match_array [visible_wp]+ .to contain_exactly(visible_wp)endend@@ -583,7 +583,7 @@ RSpec.shared_examples_for 'filter by work package id' doinstance.valid_values!expect(instance.values)- .to match_array [visible_wp.id.to_s]+ .to contain_exactly(visible_wp.id.to_s)endend@@ -603,7 +603,7 @@ RSpec.shared_examples_for 'filter by work package id' doinstance.valid_values!expect(instance.values)- .to match_array [visible_wp.id.to_s]+ .to contain_exactly(visible_wp.id.to_s)endendend@@ -683,7 +683,7 @@ RSpec.shared_examples_for 'operators for relation filters' doit 'returns the related work packages' doexpect(WorkPackage.where(instance.where))- .to match_array [related_wp]+ .to contain_exactly(related_wp)endend@@ -694,7 +694,7 @@ RSpec.shared_examples_for 'operators for relation filters' doit 'returns the unrelated work packages' doexpect(WorkPackage.where(instance.where))- .to match_array [filter_value_wp, unrelated_wp]+ .to contain_exactly(filter_value_wp, unrelated_wp)endendenddiff --git a/spec/support/repository_helpers.rb b/spec/support/repository_helpers.rbindex fc245f5a694..de2c6f12f9b 100644--- a/spec/support/repository_helpers.rb+++ b/spec/support/repository_helpers.rb@@ -33,7 +33,7 @@# due to performance.# As we do not write to the repository, we don't need this kind# of isolation.-def with_filesystem_repository(vendor, command = nil, &block)+def with_filesystem_repository(vendor, command = nil)repo_dir = Dir.mktmpdir("#{vendor}_repository")fixture = Rails.root.join("spec/fixtures/repositories/#{vendor}_repository.tar.gz")@@ -47,7 +47,7 @@ def with_filesystem_repository(vendor, command = nil, &block)skip_if_command_unavailable('tar')system "tar -xzf #{fixture} -C #{repo_dir}"- block.call(repo_dir)+ yield(repo_dir)enddef with_subversion_repository(&)@@ -64,12 +64,12 @@ end# no actual filesystem access occurred.# Instead, we wrap these repository specs in a virtual# subversion repository which does not exist on disk.-def with_virtual_subversion_repository(&block)+def with_virtual_subversion_repositorylet(:repository) { create(:repository_subversion) }before doallow(Setting).to receive(:enabled_scm).and_return(['subversion'])end- block.call+ yieldenddiff --git a/spec/support/rspec_retry.rb b/spec/support/rspec_retry.rbindex 51ade929fa8..bca85359e63 100644--- a/spec/support/rspec_retry.rb+++ b/spec/support/rspec_retry.rb@@ -37,7 +37,7 @@ end# failuresdef retry_block(args: {}, screenshot: false, &block)if ENV["RSPEC_RETRY_RETRY_COUNT"] == "0"- block.call+ yieldreturnenddiff --git a/spec/support/scm/countable_repository.rb b/spec/support/scm/countable_repository.rbindex 596d594b19f..e7e42d2f6ad 100644--- a/spec/support/scm/countable_repository.rb+++ b/spec/support/scm/countable_repository.rb@@ -19,17 +19,17 @@ RSpec.shared_examples_for 'is a countable repository' doendit 'has has not been counted initially' do- expect(repository.required_storage_bytes).to be == 0+ expect(repository.required_storage_bytes).to eq 0expect(repository.storage_updated_at).to be_nilendit 'counts the repository storage automatically' do- expect(repository.required_storage_bytes).to be == 0+ expect(repository.required_storage_bytes).to eq 0expect(repository.update_required_storage).to be trueperform_enqueued_jobs- expect(repository.required_storage_bytes).to be == count+ expect(repository.required_storage_bytes).to eq countexpect(repository.update_required_storage).to be falseexpect(repository.storage_updated_at).to be >= 1.minute.agoend@@ -40,19 +40,19 @@ RSpec.shared_examples_for 'is a countable repository' doendit 'sucessfuly updates the count to what the adapter returns' do- expect(repository.required_storage_bytes).to be == 0+ expect(repository.required_storage_bytes).to eq 0expect(repository.update_required_storage).to be trueperform_enqueued_jobs- expect(repository.required_storage_bytes).to be == count+ expect(repository.required_storage_bytes).to eq countendendendcontext 'with real counter' doit 'counts the repository storage automatically' do- expect(repository.required_storage_bytes).to be == 0+ expect(repository.required_storage_bytes).to eq 0expect(repository.update_required_storage).to be trueperform_enqueued_jobsdiff --git a/spec/support/scm/relocate_repository.rb b/spec/support/scm/relocate_repository.rbindex eb16bf42f4d..998047269b1 100644--- a/spec/support/scm/relocate_repository.rb+++ b/spec/support/scm/relocate_repository.rb@@ -4,7 +4,7 @@ RSpec.shared_examples_for 'repository can be relocated' do |vendor|endlet(:project) { build(:project) }let(:repository) do- repo = build("repository_#{vendor}".to_sym,+ repo = build(:"repository_#{vendor}",project:,scm_type: :managed)@@ -45,7 +45,7 @@ RSpec.shared_examples_for 'repository can be relocated' do |vendor|endend- context 'with managed remote config', webmock: true do+ context 'with managed remote config', :webmock dolet(:url) { 'http://myreposerver.example.com/api/' }let(:config) { { manages: url } }@@ -53,7 +53,7 @@ RSpec.shared_examples_for 'repository can be relocated' do |vendor|stub_request(:post, url).to_return(status: 200,body: { success: true, url: 'file:///foo/bar', path: '/tmp/foo/bar' }.to_json)- create("repository_#{vendor}".to_sym,+ create(:"repository_#{vendor}",project:,scm_type: :managed)enddiff --git a/spec/support/shared/expect_page_reload.rb b/spec/support/shared/expect_page_reload.rbindex 5b7b5a140ff..e4f2c68ff0c 100644--- a/spec/support/shared/expect_page_reload.rb+++ b/spec/support/shared/expect_page_reload.rb@@ -34,7 +34,7 @@ def expect_page_reloadyield- expect(page).to have_selector('body') { |body|+ expect(page).to have_css('body') { |body|Time.parse(body['data-rendered-at']) > current_render}enddiff --git a/spec/support/shared/forms_html.rb b/spec/support/shared/forms_html.rbindex 460e9224c8c..99c199f7a4e 100644--- a/spec/support/shared/forms_html.rb+++ b/spec/support/shared/forms_html.rb@@ -28,13 +28,13 @@RSpec.shared_examples_for 'labelled' doit 'has a label with title' do- expect(subject).to have_selector 'label.form--label[title]'+ expect(subject).to have_css 'label.form--label[title]'endendRSpec.shared_examples_for 'not labelled' doit 'does not have a label with title' do- expect(subject).not_to have_selector 'label.form--label[title]'+ expect(subject).to have_no_css 'label.form--label[title]'endend@@ -51,7 +51,7 @@ RSpec.shared_examples_for 'labelled by default' doendRSpec.shared_examples_for 'wrapped in container' do |container = 'field-container'|- it { is_expected.to have_selector "span.form--#{container}", count: 1 }+ it { is_expected.to have_css "span.form--#{container}", count: 1 }context 'with additional class provided' dolet(:css_class) { 'my-additional-class' }@@ -62,13 +62,13 @@ RSpec.shared_examples_for 'wrapped in container' do |container = 'field-containeendit 'has the class' do- expect(subject).to have_selector "span.#{css_class}", count: expected_container_count+ expect(subject).to have_css "span.#{css_class}", count: expected_container_countendendendRSpec.shared_examples_for 'not wrapped in container' do |container = 'field-container'|- it { is_expected.not_to have_selector "span.form--#{container}" }+ it { is_expected.to have_no_css "span.form--#{container}" }endRSpec.shared_examples_for 'wrapped in field-container by default' dodiff --git a/spec/support/shared/loading_indicator_saveguard.rb b/spec/support/shared/loading_indicator_saveguard.rbindex 37d58898fc4..83543680500 100644--- a/spec/support/shared/loading_indicator_saveguard.rb+++ b/spec/support/shared/loading_indicator_saveguard.rb@@ -34,5 +34,5 @@#def loading_indicator_saveguard- expect(page).not_to have_selector('.op-loading-indicator')+ expect(page).to have_no_css('.op-loading-indicator')enddiff --git a/spec/support/shared/with_config.rb b/spec/support/shared/with_config.rbindex 7e75024a698..19a8669bed9 100644--- a/spec/support/shared/with_config.rb+++ b/spec/support/shared/with_config.rb@@ -35,9 +35,9 @@ class WithConfig### We need this so calls to rspec mocks (allow, expect etc.) will work here as expected.- def method_missing(method, *args, &)+ def method_missing(method, *, &)if context.respond_to?(method)- context.send(method, *args, &)+ context.send(method, *, &)elsesuperenddiff --git a/spec/support/shared/with_direct_uploads.rb b/spec/support/shared/with_direct_uploads.rbindex 070fc36d882..ba2da109028 100644--- a/spec/support/shared/with_direct_uploads.rb+++ b/spec/support/shared/with_direct_uploads.rb@@ -35,9 +35,9 @@ class WithDirectUploads### We need this so calls to rspec mocks (allow, expect etc.) will work here as expected.- def method_missing(method, *args, &)+ def method_missing(method, *, &)if context.respond_to?(method)- context.send(method, *args, &)+ context.send(method, *, &)elsesuperenddiff --git a/spec/support/toasts/expectations.rb b/spec/support/toasts/expectations.rbindex 9eae3a9a901..ecadb2d9bf4 100644--- a/spec/support/toasts/expectations.rb+++ b/spec/support/toasts/expectations.rb@@ -2,11 +2,11 @@ module Toastsmodule Expectationsdef expect_toast(message:, type: :success)if toast_type == :angular- expect(page).to have_selector(".op-toast.-#{type}", text: message, wait: 20)+ expect(page).to have_css(".op-toast.-#{type}", text: message, wait: 20)elsif type == :error- expect(page).to have_selector(".errorExplanation", text: message)+ expect(page).to have_css(".errorExplanation", text: message)elsif type == :success- expect(page).to have_selector(".op-toast.-success", text: message)+ expect(page).to have_css(".op-toast.-success", text: message)elseraise NotImplementedErrorend@@ -24,9 +24,9 @@ module Toastsdef expect_no_toaster(type: :success, message: nil)if type.nil?- expect(page).not_to have_selector(".op-toast")+ expect(page).to have_no_css(".op-toast")else- expect(page).not_to have_selector(".op-toast.-#{type}", text: message)+ expect(page).to have_no_css(".op-toast.-#{type}", text: message)endenddiff --git a/spec/support/wait/target.rb b/spec/support/wait/target.rbindex 3c034d568d3..fe44e962961 100644--- a/spec/support/wait/target.rb+++ b/spec/support/wait/target.rb@@ -14,17 +14,17 @@ module RSpecend# From: https://github.com/rspec/rspec-expectations/blob/v3.12.3/lib/rspec/expectations/expectation_target.rb#L36-L47- def self.for(value, block, **options)+ def self.for(value, block, **)if UndefinedValue.equal?(value)unless blockraise ArgumentError, "You must pass either an argument or a block to `wait_for`."end- new(block, **options)+ new(block, **)elsif blockraise ArgumentError, "You cannot pass both an argument and a block to `wait_for`."else- new(value, **options)+ new(value, **)endenddiff --git a/spec/support/webmock.rb b/spec/support/webmock.rbindex d0b04383160..f9f8dad897c 100644--- a/spec/support/webmock.rb+++ b/spec/support/webmock.rb@@ -35,7 +35,7 @@ RSpec.configure do |config|WebMock.disable!end- config.around(:example, webmock: true) do |example|+ config.around(:example, :webmock) do |example|# When we enable webmock, no connections other than stubbed ones are allowed.# We will exempt:# * local connections, since selenium etc. uses localhost to communicate with the browser.diff --git a/spec/views/admin/settings/authentication/show.html.erb_spec.rb b/spec/views/admin/settings/authentication/show.html.erb_spec.rbindex e61555eeb75..5df4b871fd1 100644--- a/spec/views/admin/settings/authentication/show.html.erb_spec.rb+++ b/spec/views/admin/settings/authentication/show.html.erb_spec.rb@@ -51,11 +51,11 @@ RSpec.describe 'admin/settings/authentication_settings/show' doendit 'does not show password settings' do- expect(rendered).not_to have_text I18n.t('label_password_lost')+ expect(rendered).to have_no_text I18n.t('label_password_lost')endit 'does not show automated user blocking options' do- expect(rendered).not_to have_text I18n.t('settings.brute_force_prevention')+ expect(rendered).to have_no_text I18n.t('settings.brute_force_prevention')endendenddiff --git a/spec/views/layouts/admin.html.erb_spec.rb b/spec/views/layouts/admin.html.erb_spec.rbindex 01ef6c2b981..3253d581f8e 100644--- a/spec/views/layouts/admin.html.erb_spec.rb+++ b/spec/views/layouts/admin.html.erb_spec.rb@@ -59,7 +59,7 @@ RSpec.describe 'layouts/admin' doendit 'is shown' do- expect(rendered).to have_selector('a', text: I18n.t(:label_ldap_auth_source_plural))+ expect(rendered).to have_css('a', text: I18n.t(:label_ldap_auth_source_plural))endend@@ -70,7 +70,7 @@ RSpec.describe 'layouts/admin' doendit 'is hidden' do- expect(rendered).not_to have_selector('a', text: I18n.t(:label_ldap_auth_source_plural))+ expect(rendered).to have_no_css('a', text: I18n.t(:label_ldap_auth_source_plural))endendenddiff --git a/spec/views/layouts/base.html.erb_spec.rb b/spec/views/layouts/base.html.erb_spec.rbindex b13be5ee0ad..179de56fabe 100644--- a/spec/views/layouts/base.html.erb_spec.rb+++ b/spec/views/layouts/base.html.erb_spec.rb@@ -60,15 +60,15 @@ RSpec.describe 'layouts/base' docontext 'with omni_auth_direct_login disabled' doit 'shows the login drop down menu' do- expect(rendered).to have_selector('div#nav-login-content', visible: false)+ expect(rendered).to have_css('div#nav-login-content', visible: false)endendcontext 'with omni_auth_direct_login enabled',with_config: { omniauth_direct_login_provider: 'some_provider' } doit 'shows just a sign-in link, no menu' do- expect(rendered).to have_selector "a[href='/login']"- expect(rendered).not_to have_selector 'div#nav-login-content'+ expect(rendered).to have_css "a[href='/login']"+ expect(rendered).to have_no_css 'div#nav-login-content'endendend@@ -108,14 +108,14 @@ RSpec.describe 'layouts/base' doendit 'renders main favicon' do- expect(rendered).to have_selector(+ expect(rendered).to have_css("link[type='image/x-icon'][href*='#{OpenProject::CustomStyles::Design.favicon_asset_path}']",visible: false)endit 'renders apple icons' do- expect(rendered).to have_selector(+ expect(rendered).to have_css("link[type='image/png'][href*='/assets/apple-touch-icon-120x120.png']",visible: false)@@ -146,7 +146,7 @@ RSpec.describe 'layouts/base' dorenderend- it "will be referenced without the asset host" do+ it "is referenced without the asset host" doexpect(rendered).to include('href="http://foo.bar.com/assets/')expect(rendered).to include('href="/highlighting/styles/')end@@ -229,7 +229,7 @@ RSpec.describe 'layouts/base' dolet(:current_user) { user }it 'has a current_user metatag' do- expect(rendered).to have_selector("meta[name=current_user]", visible: false)+ expect(rendered).to have_css("meta[name=current_user]", visible: false)endend@@ -237,7 +237,7 @@ RSpec.describe 'layouts/base' dolet(:current_user) { anonymous }it 'has no current_user metatag' do- expect(rendered).not_to have_selector('meta[name=current_user]', visible: false)+ expect(rendered).to have_no_css('meta[name=current_user]', visible: false)endendenddiff --git a/spec/views/projects/settings/general/show.html.erb_spec.rb b/spec/views/projects/settings/general/show.html.erb_spec.rbindex b127afdd8f0..0d87d8d033b 100644--- a/spec/views/projects/settings/general/show.html.erb_spec.rb+++ b/spec/views/projects/settings/general/show.html.erb_spec.rb@@ -44,7 +44,7 @@ RSpec.describe 'projects/settings/general/show' doendit 'the copy link should be visible' do- expect(rendered).to have_selector 'a.copy'+ expect(rendered).to have_css 'a.copy'endend@@ -55,7 +55,7 @@ RSpec.describe 'projects/settings/general/show' doendit 'the copy link should not be visible' do- expect(rendered).not_to have_selector 'a.copy'+ expect(rendered).to have_no_css 'a.copy'endendend@@ -72,8 +72,8 @@ RSpec.describe 'projects/settings/general/show' doendit 'show delete and archive buttons' do- expect(rendered).to have_selector('li.toolbar-item span.button--text', text: 'Archive')- expect(rendered).to have_selector('li.toolbar-item span.button--text', text: 'Delete')+ expect(rendered).to have_css('li.toolbar-item span.button--text', text: 'Archive')+ expect(rendered).to have_css('li.toolbar-item span.button--text', text: 'Delete')endend@@ -89,8 +89,8 @@ RSpec.describe 'projects/settings/general/show' doendit 'hide delete and archive buttons' do- expect(rendered).not_to have_selector('li.toolbar-item span.button--text', text: 'Archive project')- expect(rendered).not_to have_selector('li.toolbar-item span.button--text', text: 'Delete project')+ expect(rendered).to have_no_css('li.toolbar-item span.button--text', text: 'Archive project')+ expect(rendered).to have_no_css('li.toolbar-item span.button--text', text: 'Delete project')endendenddiff --git a/spec/views/users/edit.html.erb_spec.rb b/spec/views/users/edit.html.erb_spec.rbindex 387a49634ce..9f24b17fd55 100644--- a/spec/views/users/edit.html.erb_spec.rb+++ b/spec/views/users/edit.html.erb_spec.rb@@ -145,7 +145,7 @@ RSpec.describe 'users/edit' doit 'does not show the auth source selection' dorender- expect(rendered).not_to have_selector('#user_auth_source_id')+ expect(rendered).to have_no_css('#user_auth_source_id')endendend@@ -171,7 +171,7 @@ RSpec.describe 'users/edit' doit 'shows the auth source selection' dorender- expect(rendered).to have_selector('#user_ldap_auth_source_id')+ expect(rendered).to have_css('#user_ldap_auth_source_id')endend@@ -201,8 +201,8 @@ RSpec.describe 'users/edit' dorenderwithin '#password_fields' do- expect(rendered).not_to have_text('Password')- expect(rendered).not_to have_text('Password confirmation')+ expect(rendered).to have_no_text('Password')+ expect(rendered).to have_no_text('Password confirmation')endendenddiff --git a/spec/views/users/index.html.erb_spec.rb b/spec/views/users/index.html.erb_spec.rbindex 03535b80a4c..44216c12419 100644--- a/spec/views/users/index.html.erb_spec.rb+++ b/spec/views/users/index.html.erb_spec.rb@@ -70,7 +70,7 @@ RSpec.describe 'users/index' doit "does not show the current number of active and allowed users" dorender- expect(subject).not_to have_text("booked active users")+ expect(subject).to have_no_text("booked active users")endendenddiff --git a/spec/views/users/show.html.erb_spec.rb b/spec/views/users/show.html.erb_spec.rbindex 99945fce2bd..b61a124c7c9 100644--- a/spec/views/users/show.html.erb_spec.rb+++ b/spec/views/users/show.html.erb_spec.rb@@ -51,6 +51,6 @@ RSpec.describe 'users/show' doit 'renders the visible custom values' dorender- expect(rendered).to have_selector('li', text: 'TextUserCustomField')+ expect(rendered).to have_css('li', text: 'TextUserCustomField')endenddiff --git a/spec/views/work_package/auto_complete/index_spec.rb b/spec/views/work_package/auto_complete/index_spec.rbindex 2d4e55aeb7b..aac2862f87e 100644--- a/spec/views/work_package/auto_complete/index_spec.rb+++ b/spec/views/work_package/auto_complete/index_spec.rb@@ -38,9 +38,9 @@ RSpec.describe 'work_packages/auto_completes/index.html.erb' doassign :work_packages, [work_package]render# there are items- expect(rendered).to have_selector 'li'+ expect(rendered).to have_css 'li'# but there is not script tag- expect(rendered).not_to have_selector 'script'+ expect(rendered).to have_no_css 'script'# normal text should be includedexpect(rendered).to include 'do not alert this'enddiff --git a/spec/workers/attachments/cleanup_uncontainered_job_integration_spec.rb b/spec/workers/attachments/cleanup_uncontainered_job_integration_spec.rbindex 8c3fb7a04e2..bc94bf8a6e4 100644--- a/spec/workers/attachments/cleanup_uncontainered_job_integration_spec.rb+++ b/spec/workers/attachments/cleanup_uncontainered_job_integration_spec.rb@@ -61,6 +61,6 @@ RSpec.describe Attachments::CleanupUncontaineredJob, type: :job dojob.performexpect(Attachment.all)- .to match_array([containered_attachment, new_uncontainered_attachment, finished_upload, new_pending_upload])+ .to contain_exactly(containered_attachment, new_uncontainered_attachment, finished_upload, new_pending_upload)endenddiff --git a/spec/workers/mails/shared/member_job.rb b/spec/workers/mails/shared/member_job.rbindex e32c1b8a9a8..fabc031015a 100644--- a/spec/workers/mails/shared/member_job.rb+++ b/spec/workers/mails/shared/member_job.rb@@ -97,7 +97,7 @@ RSpec.shared_examples 'member job' do%i[added_project updated_global updated_project].each do |mails|allow(MemberMailer).to receive(mails)- .and_return(double('mail', deliver_now: nil)) # rubocop:disable RSpec/VerifiedDoubles+ .and_return(double('mail', deliver_now: nil)) # rubocop:disable RSpec/VerifiedDoublesendenddiff --git a/spec/workers/notifications/schedule_reminder_mails_job_spec.rb b/spec/workers/notifications/schedule_reminder_mails_job_spec.rbindex 957cfb36946..99538d4f7b8 100644--- a/spec/workers/notifications/schedule_reminder_mails_job_spec.rb+++ b/spec/workers/notifications/schedule_reminder_mails_job_spec.rb@@ -73,10 +73,10 @@ RSpec.describe Notifications::ScheduleReminderMailsJob, type: :job doreminder_jobs = jobs.select { |job| job.job_data['job_class'] == "Mails::ReminderJob" }expect(reminder_jobs[0].job_data['arguments'])- .to match_array([23])+ .to contain_exactly(23)expect(reminder_jobs[1].job_data['arguments'])- .to match_array([42])+ .to contain_exactly(42)endit 'queries with the intended job execution time (which might have been missed due to high load)' do