Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump rubocop-capybara from 2.19.0 to 2.20.0 #162

Merged
merged 4 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ GEM
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
jmespath (1.6.2)
json (2.7.1)
json (2.7.2)
language_server-protocol (3.17.0.3)
launchy (2.5.2)
addressable (~> 2.8)
Expand Down Expand Up @@ -215,7 +215,7 @@ GEM
nokogiri (1.16.4-x86_64-linux)
racc (~> 1.4)
parallel (1.24.0)
parser (3.3.0.2)
parser (3.3.1.0)
ast (~> 2.4.1)
racc
pg (1.5.4)
Expand Down Expand Up @@ -295,20 +295,20 @@ GEM
rollbar (3.5.1)
rss (0.3.0)
rexml
rubocop (1.59.0)
rubocop (1.63.3)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.19.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
Expand Down
1 change: 1 addition & 0 deletions config/initializers/content_security_policy.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# Be sure to restart your server when you modify this file.

# Define an application-wide content security policy.
Expand Down
1 change: 1 addition & 0 deletions config/initializers/inflections.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# Be sure to restart your server when you modify this file.

# Add new inflection rules using the following format. Inflections
Expand Down
1 change: 1 addition & 0 deletions config/initializers/new_framework_defaults_7_1.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# Be sure to restart your server when you modify this file.
#
# This file eases your Rails 7.1 framework defaults upgrade.
Expand Down
1 change: 1 addition & 0 deletions config/initializers/permissions_policy.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# Be sure to restart your server when you modify this file.

# Define an application-wide HTTP permissions policy. For further
Expand Down
6 changes: 3 additions & 3 deletions test/application_system_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ def log_in_as(user)
visit log_in_url
fill_in :email, with: user.email
fill_in :password, with: 'Secret1*3*5*'
click_button 'Log in'
click_on 'Log in'
assert_current_path root_url
user
end

def sign_out
click_button 'avatar'
click_button 'Log out'
click_on 'avatar'
click_on 'Log out'
end
end
8 changes: 4 additions & 4 deletions test/system/artists_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ class ArtistsTest < ApplicationSystemTestCase
log_in_as(admin)

visit artists_url
click_link 'New artist'
click_on 'New artist'
fill_in 'Name', with: @artist.name
fill_in 'Location', with: @artist.location
fill_in 'Description', with: @artist.description
attach_file 'Profile picture', Rails.root.join('test/fixtures/files/cover.png')
click_button 'Save'
click_on 'Save'
assert_selector 'h2', text: @artist.name
end

Expand All @@ -28,9 +28,9 @@ class ArtistsTest < ApplicationSystemTestCase

visit artist_url(@artist)
assert_text @artist.name
click_link 'Edit artist'
click_on 'Edit artist'
fill_in 'Name', with: 'New Artist Name'
click_button 'Save'
click_on 'Save'
assert_text 'New Artist Name'
end
end
4 changes: 2 additions & 2 deletions test/system/buying_an_album_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class BuyingAnAlbumTest < ApplicationSystemTestCase

test 'purchasing an album' do
visit artist_album_url(@album.artist, @album)
click_button 'Buy'
click_on 'Buy'
fill_in 'Price', with: @album.price
click_button 'Checkout'
click_on 'Checkout'

# Fake the Stripe checkout redirect to the "success_url"
visit purchase_url(Purchase.last)
Expand Down
16 changes: 8 additions & 8 deletions test/system/collection_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ class CollectionTest < ApplicationSystemTestCase
test 'when a logged in user purchases an album it appears in their collection' do
log_in_as(@user)
visit artist_album_url(@album.artist, @album)
click_button 'Buy'
click_on 'Buy'
fill_in 'Price', with: @album.price
click_button 'Checkout'
click_on 'Checkout'
fake_stripe_webhook_event_completed(@user)
visit collection_url
assert_text @album.title
end

test 'when a logged out user purchases an album it appears in their collection' do
visit artist_album_url(@album.artist, @album)
click_button 'Buy'
click_on 'Buy'
fill_in 'Price', with: @album.price
click_button 'Checkout'
click_on 'Checkout'
fake_stripe_webhook_event_completed(@user)

log_in_as(@user)
Expand All @@ -36,18 +36,18 @@ class CollectionTest < ApplicationSystemTestCase
user = build(:user, email: '[email protected]')

visit artist_album_url(@album.artist, @album)
click_button 'Buy'
click_on 'Buy'
fill_in 'Price', with: @album.price
click_button 'Checkout'
click_on 'Checkout'
fake_stripe_webhook_event_completed(user)

visit root_url
click_link 'sign up'
click_on 'sign up'
fill_in 'Email', with: user.email
fill_in 'Password', with: 'Secret1*3*5*'
fill_in 'Password confirmation', with: 'Secret1*3*5*'
perform_enqueued_jobs do
click_button 'Sign up'
click_on 'Sign up'
end
visit verify_email_url
assert_text 'Thank you for verifying your email address'
Expand Down
12 changes: 6 additions & 6 deletions test/system/creating_an_album_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ class CreatingAnAlbumTest < ApplicationSystemTestCase

test 'creating an album' do
visit artist_url(@artist)
click_link 'Add album'
click_on 'Add album'
fill_in 'Title', with: "A Hard Day's Night"
attach_file 'Cover', Rails.root.join('test/fixtures/files/cover.png')

within('#tracks') do
click_link 'Add track'
click_on 'Add track'
fill_in 'Title', with: 'And I Love Her'
attach_file 'File', Rails.root.join('test/fixtures/files/track.wav')
end

click_button 'Save'
click_on 'Save'

assert_text "A Hard Day's Night (unpublished)"
click_link "A Hard Day's Night (unpublished)"
click_on "A Hard Day's Night (unpublished)"
assert_text '1. And I Love Her'
end

Expand All @@ -34,9 +34,9 @@ class CreatingAnAlbumTest < ApplicationSystemTestCase

visit artist_album_url(@artist, album)
assert_text album.title
click_link 'Edit album'
click_on 'Edit album'
fill_in 'Title', with: 'New Title'
click_button 'Save'
click_on 'Save'
assert_text 'New Title'
end
end
6 changes: 3 additions & 3 deletions test/system/creating_an_artist_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ class CreatingAnArtistTest < ApplicationSystemTestCase

test 'creating an artist' do
visit root_url
click_button 'avatar'
click_link 'Add artist'
click_on 'avatar'
click_on 'Add artist'
fill_in 'Name', with: 'The Beatles'
fill_in 'Location', with: 'Liverpool'
fill_in 'Description', with: 'A popular beat combo'
attach_file 'Profile picture', Rails.root.join('test/fixtures/files/cover.png')

click_button 'Save'
click_on 'Save'

assert_text 'The Beatles'
assert_text 'Liverpool'
Expand Down
16 changes: 8 additions & 8 deletions test/system/identity/emails_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ class EmailsTest < ApplicationSystemTestCase
end

test 'updating the email' do
click_button 'avatar'
click_link 'My account'
click_link 'Change email address'
click_on 'avatar'
click_on 'My account'
click_on 'Change email address'

fill_in 'New email', with: '[email protected]'
fill_in 'Current password', with: 'Secret1*3*5*'
click_button 'Save changes'
click_on 'Save changes'

assert_text 'Your email has been changed'
end

test 'sending a verification email' do
@user.update! verified: false

click_button 'avatar'
click_link 'My account'
click_link 'Change email address'
click_button 'Re-send verification email'
click_on 'avatar'
click_on 'My account'
click_on 'Change email address'
click_on 'Re-send verification email'

assert_text 'We sent a verification email to your email address'
end
Expand Down
6 changes: 3 additions & 3 deletions test/system/identity/password_resets_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class PasswordResetsTest < ApplicationSystemTestCase

test 'sending a password reset email' do
visit log_in_url
click_link 'Forgot your password?'
click_on 'Forgot your password?'

fill_in 'Email', with: @user.email
click_button 'Send password reset email'
click_on 'Send password reset email'

assert_text 'Check your email for reset instructions'
end
Expand All @@ -24,7 +24,7 @@ class PasswordResetsTest < ApplicationSystemTestCase

fill_in 'New password', with: 'Secret6*4*2*'
fill_in 'Confirm new password', with: 'Secret6*4*2*'
click_button 'Save changes'
click_on 'Save changes'

assert_text 'Your password was reset successfully. Please sign in'
end
Expand Down
8 changes: 4 additions & 4 deletions test/system/passwords_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ class PasswordsTest < ApplicationSystemTestCase
end

test 'updating the password' do
click_button 'avatar'
click_link 'My account'
click_link 'Change password'
click_on 'avatar'
click_on 'My account'
click_on 'Change password'

fill_in 'Current password', with: 'Secret1*3*5*'
fill_in 'New password', with: 'Secret6*4*2*'
fill_in 'Confirm new password', with: 'Secret6*4*2*'
click_button 'Save changes'
click_on 'Save changes'

assert_text 'Your password has been changed'
end
Expand Down
4 changes: 2 additions & 2 deletions test/system/payout_details_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class PayoutDetailsTest < ApplicationSystemTestCase

test 'adding payout details' do
visit account_url
click_link 'Add payout details'
click_on 'Add payout details'
fill_in 'Name', with: 'John Lennon'
select '🇬🇧 United Kingdom (GBP)', from: 'Country / Region'
click_button 'Save'
click_on 'Save'

assert_equal 'John Lennon', @user.payout_detail.name
assert_equal 'united_kingdom', @user.payout_detail.country
Expand Down
8 changes: 4 additions & 4 deletions test/system/publishing_an_album_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ class PublishingAnAlbumTest < ApplicationSystemTestCase
test 'publishing an album' do
# Artist requests publication
visit artist_url(@album.artist)
click_link "#{@album.title} (unpublished)"
click_button 'Publish'
click_on "#{@album.title} (unpublished)"
click_on 'Publish'
assert_text "Thank you! We'll email you when your album is published."
sign_out

# Admin approves publication
admin = create(:user, admin: true, email: '[email protected]')
log_in_as(admin)
visit link_in_publish_request_email
click_button 'Publish'
click_on 'Publish'
sign_out

# Listener visits published album page
visit artist_url(@album.artist)
click_link @album.title
click_on @album.title
end

private
Expand Down
6 changes: 3 additions & 3 deletions test/system/sessions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ class SessionsTest < ApplicationSystemTestCase
visit log_in_url
fill_in 'Email', with: @user.email
fill_in 'Password', with: 'Secret1*3*5*'
click_button 'Log in'
click_on 'Log in'

assert_text 'Logged in successfully'
end

test 'logging out' do
log_in_as @user

click_button 'avatar'
click_button 'Log out'
click_on 'avatar'
click_on 'Log out'
assert_text 'That session has been logged out'
end
end
4 changes: 2 additions & 2 deletions test/system/signing_up_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
class SigningUpTest < ApplicationSystemTestCase
test 'signing up' do
visit root_url
click_link 'sign up'
click_on 'sign up'
fill_in 'Email', with: '[email protected]'
fill_in 'Password', with: 'Secret1*3*5*'
fill_in 'Password confirmation', with: 'Secret1*3*5*'
perform_enqueued_jobs do
click_button 'Sign up'
click_on 'Sign up'
end

assert_text 'Welcome! You have signed up successfully'
Expand Down