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

bump capybara

ulfertsa3317eb74852
diff --git a/Gemfile b/Gemfile
index d1b64e50c3d..afa23f1b6d7 100644
--- a/Gemfile
+++ b/Gemfile
@@ -215,7 +215,7 @@ group :test do
# brings back testing for 'assigns' and 'assert_template' extracted in rails 5
gem 'rails-controller-testing', '~> 1.0.2'
- gem 'capybara', '~> 3.13.0'
+ gem 'capybara', '~> 3.29.0'
gem 'capybara-screenshot', '~> 1.0.17'
gem 'capybara-select2', git: 'https://github.com/goodwill/capybara-select2', ref: '585192e'
gem 'webdrivers', '~> 4.1.2', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index 51252c47916..649f8dbb000 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -338,13 +338,13 @@ GEM
browser (2.6.1)
builder (3.2.3)
byebug (11.0.1)
- capybara (3.13.2)
+ capybara (3.29.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
- regexp_parser (~> 1.2)
+ regexp_parser (~> 1.5)
xpath (~> 3.2)
capybara-screenshot (1.0.22)
capybara (>= 1.0, < 4)
@@ -590,7 +590,7 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2018.0812)
mimemagic (0.3.3)
- mini_mime (1.0.1)
+ mini_mime (1.0.2)
mini_portile2 (2.4.0)
minisyntax (0.2.5)
minitest (5.11.3)
@@ -744,7 +744,7 @@ GEM
reform-rails (0.1.7)
activemodel (>= 3.2)
reform (>= 2.2.0)
- regexp_parser (1.3.0)
+ regexp_parser (1.6.0)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
@@ -942,7 +942,7 @@ DEPENDENCIES
bourbon (~> 6.0.0)
brakeman (~> 4.6.1)
browser (~> 2.6.1)
- capybara (~> 3.13.0)
+ capybara (~> 3.29.0)
capybara-screenshot (~> 1.0.17)
capybara-select2!
carrierwave (~> 1.3.1)
diff --git a/spec/features/projects/destroy_spec.rb b/spec/features/projects/destroy_spec.rb
index ffc8584dfd8..7fedb91aa94 100644
--- a/spec/features/projects/destroy_spec.rb
+++ b/spec/features/projects/destroy_spec.rb
@@ -52,7 +52,7 @@ describe 'Projects#destroy',
it 'can destroy the project' do
# Confirm the deletion
danger_zone.confirm_with(project.identifier)
- expect(danger_zone.disabled?).to be false
+ expect(danger_zone).not_to be_disabled
danger_zone.danger_button.click
expect(page).to have_selector '.flash.notice', text: I18n.t('projects.delete.scheduled')
diff --git a/spec/features/repositories/create_repository_spec.rb b/spec/features/repositories/create_repository_spec.rb
index 42e6a71b68f..a86830abec5 100644
--- a/spec/features/repositories/create_repository_spec.rb
+++ b/spec/features/repositories/create_repository_spec.rb
@@ -108,7 +108,7 @@ describe 'Create repository', type: :feature, js: true, selenium: true do
it 'should display a collapsed type' do
expect(selector).not_to be_nil
expect(selector[:selected]).to be_falsey
- expect(selector[:disabled]).to be_falsey
+ expect(selector).not_to be_disabled
content = find("##{vendor}-#{type}", visible: false)
expect(content).not_to be_nil
@@ -124,7 +124,7 @@ describe 'Create repository', type: :feature, js: true, selenium: true do
find("input[name='scm_type'][value='#{type}']").set(true)
content = find("#attributes-group--content-#{type}")
expect(content).not_to be_nil
- expect(content[:hidden]).to be_falsey
+ expect(content[:hidden]).to eql 'false'
content = find("##{vendor}-#{type}", visible: false)
expect(content).not_to be_nil
expect(content[:style]).not_to match("display: none")
@@ -132,7 +132,7 @@ describe 'Create repository', type: :feature, js: true, selenium: true do
find('input[type="radio"][value="managed"]').set(true)
content = find('#attributes-group--content-managed')
expect(content).not_to be_nil
- expect(content[:hidden]).to be_falsey
+ expect(content[:hidden]).to eql 'false'
content = find("##{vendor}-managed", visible: false)
expect(content).not_to be_nil
expect(content[:style]).not_to match("display: none")
diff --git a/spec/features/support/components/danger_zone.rb b/spec/features/support/components/danger_zone.rb
index 1b2d2bfea17..57068ab5f92 100644
--- a/spec/features/support/components/danger_zone.rb
+++ b/spec/features/support/components/danger_zone.rb
@@ -65,6 +65,6 @@ class DangerZone
##
def disabled?
- !!danger_button[:disabled]
+ danger_button.disabled?
end
end
diff --git a/spec/features/users/my_spec.rb b/spec/features/users/my_spec.rb
index ebb9ab75a45..9fd7a5b03b0 100644
--- a/spec/features/users/my_spec.rb
+++ b/spec/features/users/my_spec.rb
@@ -35,10 +35,10 @@ describe 'my',
let(:user_password) { 'bob' * 4 }
let(:user) do
FactoryBot.create(:user,
- login: 'bob',
- password: user_password,
- password_confirmation: user_password)
+ login: 'bob',
+ password: user_password,
+ password_confirmation: user_password)
end
##
@@ -98,11 +98,11 @@ describe 'my',
end
context 'as admin' do
- let(:user) {
+ let(:user) do
FactoryBot.create :admin,
- password: user_password,
- password_confirmation: user_password
- }
+ password: user_password,
+ password_confirmation: user_password
+ end
it 'requires the password' do
dialog.confirm_flow_with(user_password)
diff --git a/spec/features/work_packages/details/milestones_spec.rb b/spec/features/work_packages/details/milestones_spec.rb
index 3830ed587a2..5addbd1ccdc 100644
--- a/spec/features/work_packages/details/milestones_spec.rb
+++ b/spec/features/work_packages/details/milestones_spec.rb
@@ -1,15 +1,14 @@
require 'spec_helper'
describe 'Milestones full screen v iew', js: true do
-
let(:type) { FactoryBot.create :type, is_milestone: true }
let(:project) { FactoryBot.create(:project, types: [type]) }
- let!(:work_package) {
+ let!(:work_package) do
FactoryBot.create(:work_package,
project: project,
type: type,
subject: 'Foobar')
- }
+ end
let(:wp_page) { ::Pages::FullWorkPackage.new(work_package, project) }
let(:button) { find('.add-work-package', wait: 5) }
@@ -29,7 +28,7 @@ describe 'Milestones full screen v iew', js: true do
end
it 'shows the button as enabled' do
- expect(button['disabled']).to be_falsey
+ expect(button).not_to be_disabled
button.click
expect(page).to have_selector('.menu-item', text: type.name.upcase)
diff --git a/spec/support/components/password_confirmation_dialog.rb b/spec/support/components/password_confirmation_dialog.rb
index 650c34c1218..f53c04d5772 100644
--- a/spec/support/components/password_confirmation_dialog.rb
+++ b/spec/support/components/password_confirmation_dialog.rb
@@ -36,10 +36,10 @@ module Components
def confirm_flow_with(password, should_fail: false)
expect_open
- expect(submit_button[:disabled]).to be_truthy
+ expect(submit_button).to be_disabled
fill_in 'request_for_confirmation_password', with: password
- expect(submit_button[:disabled]).to be_falsey
+ expect(submit_button).not_to be_disabled
submit(should_fail)
end