Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Switch `custom_fields/activate_in_project_spec` to cuprite

Aaron Contreras28deae64c542
diff --git a/spec/features/custom_fields/activate_in_project_spec.rb b/spec/features/custom_fields/activate_in_project_spec.rb
index 196c1f98c03..25cfa4ad2bf 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 do
+RSpec.describe 'custom fields', js: true, with_cuprite: true do
let(:user) { create(:admin) }
let(:cf_page) { Pages::CustomFields.new }
let(:for_all_cf) { create(:list_wp_custom_field, is_for_all: true) }
@@ -37,15 +37,14 @@ RSpec.describe 'custom fields', js: true do
let(:work_package) do
wp = build(:work_package).tap do |wp|
wp.type.custom_fields = [for_all_cf, project_specific_cf]
+ wp.save!
end
- wp.save!
- wp
end
let(:wp_page) { Pages::FullWorkPackage.new(work_package) }
let(:project_settings_page) { Pages::Projects::Settings.new(work_package.project) }
before do
- login_as(user)
+ login_as user
end
it 'is only visible in the project if it has been activated' do
diff --git a/spec/support/pages/work_packages/abstract_work_package.rb b/spec/support/pages/work_packages/abstract_work_package.rb
index 7da079828d5..e2352d1ae7f 100644
--- a/spec/support/pages/work_packages/abstract_work_package.rb
+++ b/spec/support/pages/work_packages/abstract_work_package.rb
@@ -120,9 +120,9 @@ module Pages
attribute_expectations.each do |label_name, value|
label = label_name.to_s
if label == 'status'
- expect(page).to have_selector("[data-qa-selector='op-wp-status-button'] .button", text: value, wait: 10)
+ expect(page).to have_selector("[data-qa-selector='op-wp-status-button'] .button", text: value)
else
- expect(page).to have_selector(".inline-edit--container.#{label.camelize(:lower)}", text: value, wait: 10)
+ expect(page).to have_selector(".inline-edit--container.#{label.camelize(:lower)}", text: value)
end
end
end