diff --git a/Gemfile.lock b/Gemfile.lock index 38f7bb14..aa0dd300 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) @@ -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) diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index af395e46..35ab3fd6 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -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. diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index 6c78420e..9e049dcc 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -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 diff --git a/config/initializers/new_framework_defaults_7_1.rb b/config/initializers/new_framework_defaults_7_1.rb index 974cc2aa..707271fd 100644 --- a/config/initializers/new_framework_defaults_7_1.rb +++ b/config/initializers/new_framework_defaults_7_1.rb @@ -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. diff --git a/config/initializers/permissions_policy.rb b/config/initializers/permissions_policy.rb index b635b527..e8d0b2ae 100644 --- a/config/initializers/permissions_policy.rb +++ b/config/initializers/permissions_policy.rb @@ -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 diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index c8c7e3c7..24bbf61f 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -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 diff --git a/test/system/artists_test.rb b/test/system/artists_test.rb index 79268b17..f985ce6d 100644 --- a/test/system/artists_test.rb +++ b/test/system/artists_test.rb @@ -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 @@ -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 diff --git a/test/system/buying_an_album_test.rb b/test/system/buying_an_album_test.rb index 73bd1d14..d38aecd7 100644 --- a/test/system/buying_an_album_test.rb +++ b/test/system/buying_an_album_test.rb @@ -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) diff --git a/test/system/collection_test.rb b/test/system/collection_test.rb index 65db49c7..9049429e 100644 --- a/test/system/collection_test.rb +++ b/test/system/collection_test.rb @@ -12,9 +12,9 @@ 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 @@ -22,9 +22,9 @@ class CollectionTest < ApplicationSystemTestCase 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) @@ -36,18 +36,18 @@ class CollectionTest < ApplicationSystemTestCase user = build(:user, email: 'someone@example.com') 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' diff --git a/test/system/creating_an_album_test.rb b/test/system/creating_an_album_test.rb index 862d43d8..d1bd89ea 100644 --- a/test/system/creating_an_album_test.rb +++ b/test/system/creating_an_album_test.rb @@ -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 @@ -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 diff --git a/test/system/creating_an_artist_test.rb b/test/system/creating_an_artist_test.rb index a6148755..1c904c5f 100644 --- a/test/system/creating_an_artist_test.rb +++ b/test/system/creating_an_artist_test.rb @@ -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' diff --git a/test/system/identity/emails_test.rb b/test/system/identity/emails_test.rb index 94e38358..0d1c3073 100644 --- a/test/system/identity/emails_test.rb +++ b/test/system/identity/emails_test.rb @@ -9,13 +9,13 @@ 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: 'new_email@hey.com' fill_in 'Current password', with: 'Secret1*3*5*' - click_button 'Save changes' + click_on 'Save changes' assert_text 'Your email has been changed' end @@ -23,10 +23,10 @@ class EmailsTest < ApplicationSystemTestCase 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 diff --git a/test/system/identity/password_resets_test.rb b/test/system/identity/password_resets_test.rb index a15d59af..fe35be10 100644 --- a/test/system/identity/password_resets_test.rb +++ b/test/system/identity/password_resets_test.rb @@ -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 @@ -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 diff --git a/test/system/passwords_test.rb b/test/system/passwords_test.rb index f09be4e6..41608de0 100644 --- a/test/system/passwords_test.rb +++ b/test/system/passwords_test.rb @@ -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 diff --git a/test/system/payout_details_test.rb b/test/system/payout_details_test.rb index dcbe4274..9d27b9bc 100644 --- a/test/system/payout_details_test.rb +++ b/test/system/payout_details_test.rb @@ -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 diff --git a/test/system/publishing_an_album_test.rb b/test/system/publishing_an_album_test.rb index aa296f55..2d97e0a3 100644 --- a/test/system/publishing_an_album_test.rb +++ b/test/system/publishing_an_album_test.rb @@ -13,8 +13,8 @@ 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 @@ -22,12 +22,12 @@ class PublishingAnAlbumTest < ApplicationSystemTestCase admin = create(:user, admin: true, email: 'admin@example.com') 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 diff --git a/test/system/sessions_test.rb b/test/system/sessions_test.rb index e5e4eb98..2cb25184 100644 --- a/test/system/sessions_test.rb +++ b/test/system/sessions_test.rb @@ -11,7 +11,7 @@ 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 @@ -19,8 +19,8 @@ class SessionsTest < ApplicationSystemTestCase 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 diff --git a/test/system/signing_up_test.rb b/test/system/signing_up_test.rb index e3c7d546..3ac0832f 100644 --- a/test/system/signing_up_test.rb +++ b/test/system/signing_up_test.rb @@ -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: 'user@example.com' 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'