Skip to content

Commit 20e931a

Browse files
authored
Merge pull request #4774 from sanger/depfu/update/rubocop-capybara-2.22.1
[ruby] Update rubocop-capybara 2.21.0 → 2.22.1 (minor)
2 parents e0b8af5 + 5731c39 commit 20e931a

File tree

10 files changed

+21
-17
lines changed

10 files changed

+21
-17
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ require:
55
- test_prof/rubocop
66
- rubocop-performance
77
- rubocop-rails
8-
- rubocop-capybara
98
- rubocop-factory_bot
109
plugins:
10+
- rubocop-capybara
1111
- rubocop-rspec
1212
- rubocop-rspec_rails
1313

Gemfile.lock

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -333,13 +333,14 @@ GEM
333333
racc (~> 1.4)
334334
ostruct (0.6.0)
335335
parallel (1.26.3)
336-
parser (3.3.7.1)
336+
parser (3.3.7.3)
337337
ast (~> 2.4.1)
338338
racc
339339
pp (0.6.2)
340340
prettyprint
341341
prettier_print (1.2.1)
342342
prettyprint (0.2.0)
343+
prism (1.4.0)
343344
pry (0.14.2)
344345
coderay (~> 1.1)
345346
method_source (~> 1.0)
@@ -463,21 +464,23 @@ GEM
463464
rspec-mocks (~> 3.13)
464465
rspec-support (~> 3.13)
465466
rspec-support (3.13.1)
466-
rubocop (1.74.0)
467+
rubocop (1.75.1)
467468
json (~> 2.3)
468469
language_server-protocol (~> 3.17.0.2)
469470
lint_roller (~> 1.1.0)
470471
parallel (~> 1.10)
471472
parser (>= 3.3.0.2)
472473
rainbow (>= 2.2.2, < 4.0)
473474
regexp_parser (>= 2.9.3, < 3.0)
474-
rubocop-ast (>= 1.38.0, < 2.0)
475+
rubocop-ast (>= 1.43.0, < 2.0)
475476
ruby-progressbar (~> 1.7)
476477
unicode-display_width (>= 2.4.0, < 4.0)
477-
rubocop-ast (1.40.0)
478-
parser (>= 3.3.1.0)
479-
rubocop-capybara (2.21.0)
480-
rubocop (~> 1.41)
478+
rubocop-ast (1.43.0)
479+
parser (>= 3.3.7.2)
480+
prism (~> 1.4)
481+
rubocop-capybara (2.22.1)
482+
lint_roller (~> 1.1)
483+
rubocop (~> 1.72, >= 1.72.1)
481484
rubocop-factory_bot (2.26.1)
482485
rubocop (~> 1.61)
483486
rubocop-performance (1.22.1)

app/api/core/endpoint/basic_handler/actions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def check_request_io_class!(request)
5959
raise StandardError, 'Need an I/O class for this request' if request.io.nil?
6060
end
6161

62-
def does_not_require_an_io_class
62+
def not_require_an_io_class?
6363
singleton_class.class_eval('def check_request_io_class!(_) ; end', __FILE__, __LINE__)
6464
end
6565

app/api/core/endpoint/basic_handler/actions/bound.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ def bound_#{name}(name, *args, &block)
1717
end
1818

1919
delegate_to_bound_handler :action_guard
20-
delegate_to_bound_handler :action_does_not_require_an_io_class, :does_not_require_an_io_class
20+
delegate_to_bound_handler :action_not_require_an_io_class?, :not_require_an_io_class?
2121
end

app/api/endpoints/uuids.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class << response
113113
'url' => request.service.api_path(uuid.external_id)
114114
}
115115
end
116-
bound_action_does_not_require_an_io_class(:lookup)
116+
bound_action_not_require_an_io_class?(:lookup)
117117

118118
# Handles trying to find multiple resources
119119
bind_action(:create, to: 'bulk', as: :bulk) do |_, request, response|
@@ -135,6 +135,6 @@ class << response
135135
}
136136
end
137137
end
138-
bound_action_does_not_require_an_io_class(:bulk)
138+
bound_action_not_require_an_io_class?(:bulk)
139139
end
140140
end

app/models/state_changer/standard_plate.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ def update_associated_requests
6666
# Check the request is not in other wells (excuding any in contents or that already have the target state)
6767
def request_in_other_wells(request)
6868
_receptacles.any? do |well|
69-
well.aliquot_requests.try(:map, &:id).to_a.any?(request.id) &&
70-
(contents.present? && contents.exclude?(well.absolute_position_name)) &&
71-
well.state != associated_request_target_state
69+
well.aliquot_requests.try(:map, &:id).to_a.any?(request.id) && contents.present? &&
70+
contents.exclude?(well.absolute_position_name) && well.state != associated_request_target_state
7271
end
7372
end
7473

spec/features/assets/asset_submission_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@
191191
it 'the link is not visible' do
192192
login_user user
193193
visit labware_path(asset)
194+
expect(page).to have_text("Labware #{asset.name}") # confirm page has loaded
194195
expect(page).to have_no_text('Request additional sequencing')
195196
end
196197
end

spec/features/batches/sort_requests_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Suspect this is due to the quite specific locations at which the rows can be dropped.
2424
third_request.drag_to first_request
2525

26-
expect(request_list.all('tr').first).to eq(third_request)
26+
expect(request_list.first('tr')).to eq(third_request)
2727

2828
post_drag = [requests_ids[2], requests_ids[0], requests_ids[1]]
2929
Warren.handler.clear_messages

spec/features/patient_consent_withdrawl_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@
135135
it 'and a user visit the sample show page' do
136136
login_user user
137137
visit sample_path(sample)
138+
expect(page).to have_content sample.name # confirm page has loaded
138139
expect(page).to have_no_content 'Patient consent has been withdrawn for this sample'
139140
end
140141

spec/features/shared_examples/cherrypicking.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114

115115
step 'get the file' do
116116
within('#output_assets table tbody') do
117-
row = page.all('tr', text: /#{destination_barcode}/).first
117+
row = page.first('tr', text: /#{destination_barcode}/)
118118
within(row) { click_link 'Print worksheet' }
119119
end
120120

0 commit comments

Comments
 (0)