diff --git a/Gemfile.lock b/Gemfile.lock index 3ffb2c04..26b92817 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -196,7 +196,7 @@ GEM nokogiri (1.15.4-x86_64-linux) racc (~> 1.4) parallel (1.23.0) - parser (3.2.2.3) + parser (3.2.2.4) ast (~> 2.4.1) racc pg (1.5.4) @@ -253,16 +253,16 @@ GEM redis-client (>= 0.9.0) redis-client (0.17.0) connection_pool - regexp_parser (2.8.1) + regexp_parser (2.8.2) reline (0.3.7) io-console (~> 0.5) rexml (3.2.6) - rubocop (1.56.4) + rubocop (1.57.1) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.3) + parser (>= 3.2.2.4) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) @@ -271,7 +271,7 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.29.0) parser (>= 3.2.1.0) - rubocop-capybara (2.18.0) + rubocop-capybara (2.19.0) rubocop (~> 1.41) rubocop-factory_bot (2.23.1) rubocop (~> 1.33) diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index d658ffde..ffa60e95 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -17,7 +17,7 @@ def sign_in_as(user) visit sign_in_url fill_in :email, with: user.email fill_in :password, with: 'Secret1*3*5*' - click_on 'Sign in' + click_button 'Sign in' assert_current_path home_url user end diff --git a/test/system/artists_test.rb b/test/system/artists_test.rb index 7b3c49fe..b3ea0709 100644 --- a/test/system/artists_test.rb +++ b/test/system/artists_test.rb @@ -10,12 +10,12 @@ class ArtistsTest < ApplicationSystemTestCase test 'adding a new artist' do visit artists_url - click_on 'New artist' + click_link '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_on 'Save' + click_button 'Save' assert_selector 'h2', text: @artist.name end end diff --git a/test/system/buying_an_album_test.rb b/test/system/buying_an_album_test.rb index 42acd1df..6e051f62 100644 --- a/test/system/buying_an_album_test.rb +++ b/test/system/buying_an_album_test.rb @@ -10,8 +10,8 @@ class BuyingAnAlbumTest < ApplicationSystemTestCase test 'viewing the album' do visit artists_url - click_on @album.artist.name - click_on @album.title + click_link @album.artist.name + click_link @album.title assert_selector 'h1', text: @album.title assert_selector 'h2', text: @album.artist.name diff --git a/test/system/identity/emails_test.rb b/test/system/identity/emails_test.rb index 7a52c590..873681a6 100644 --- a/test/system/identity/emails_test.rb +++ b/test/system/identity/emails_test.rb @@ -9,11 +9,11 @@ class EmailsTest < ApplicationSystemTestCase end test 'updating the email' do - click_on 'Change email address' + click_link 'Change email address' fill_in 'New email', with: 'new_email@hey.com' fill_in 'Current password', with: 'Secret1*3*5*' - click_on 'Save changes' + click_button 'Save changes' assert_text 'Your email has been changed' end @@ -21,8 +21,8 @@ class EmailsTest < ApplicationSystemTestCase test 'sending a verification email' do @user.update! verified: false - click_on 'Change email address' - click_on 'Re-send verification email' + click_link 'Change email address' + click_button '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 229ae4b8..cbea0c73 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 sign_in_url - click_on 'Forgot your password?' + click_link 'Forgot your password?' fill_in 'Email', with: @user.email - click_on 'Send password reset email' + click_button '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_on 'Save changes' + click_button 'Save changes' assert_text 'Your password was reset successfully. Please sign in' end diff --git a/test/system/interests_test.rb b/test/system/interests_test.rb index 882023c9..ae165ee9 100644 --- a/test/system/interests_test.rb +++ b/test/system/interests_test.rb @@ -18,7 +18,7 @@ class InterestsTest < ApplicationSystemTestCase fill_in 'Email', with: @interest.email assert_emails 1 do - click_on 'Submit' + click_button 'Submit' end assert_text "We've sent you an email" diff --git a/test/system/passwords_test.rb b/test/system/passwords_test.rb index 78e3d04b..fd4ea660 100644 --- a/test/system/passwords_test.rb +++ b/test/system/passwords_test.rb @@ -8,12 +8,12 @@ class PasswordsTest < ApplicationSystemTestCase end test 'updating the password' do - click_on 'Change password' + click_link '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_on 'Save changes' + click_button 'Save changes' assert_text 'Your password has been changed' end diff --git a/test/system/sessions_test.rb b/test/system/sessions_test.rb index dc628d02..e16cd01f 100644 --- a/test/system/sessions_test.rb +++ b/test/system/sessions_test.rb @@ -10,7 +10,7 @@ class SessionsTest < ApplicationSystemTestCase test 'visiting the index' do sign_in_as @user - click_on 'Access log' + click_link 'Access log' assert_selector 'h1', text: 'Sessions' end @@ -18,7 +18,7 @@ class SessionsTest < ApplicationSystemTestCase visit sign_in_url fill_in 'Email', with: @user.email fill_in 'Password', with: 'Secret1*3*5*' - click_on 'Sign in' + click_button 'Sign in' assert_text 'Signed in successfully' end @@ -26,7 +26,7 @@ class SessionsTest < ApplicationSystemTestCase test 'signing out' do sign_in_as @user - click_on 'Log out' + click_button 'Log out' assert_text 'That session has been logged out' end end diff --git a/test/system/tracks_test.rb b/test/system/tracks_test.rb index 4a824432..6aefe975 100644 --- a/test/system/tracks_test.rb +++ b/test/system/tracks_test.rb @@ -10,11 +10,11 @@ class TracksTest < ApplicationSystemTestCase test 'should create track' do visit artist_album_url(@track.artist, @track.album) - click_on 'Add track' + click_link 'Add track' fill_in 'Title', with: @track.title attach_file 'File', Rails.root.join('test/fixtures/files/track.wav') - click_on 'Save' + click_button 'Save' assert_text "2. #{@track.title}" end @@ -23,9 +23,9 @@ class TracksTest < ApplicationSystemTestCase visit artist_album_url(@track.artist, @track.album) assert_text "1. #{@track.title}" - click_on 'Edit' + click_link 'Edit' fill_in 'Title', with: 'New title' - click_on 'Save' + click_button 'Save' assert_text '1. New title' end @@ -35,7 +35,7 @@ class TracksTest < ApplicationSystemTestCase assert_text "1. #{@track.title}" accept_confirm do - click_on 'Delete' + click_link 'Delete' end assert_no_text "1. #{@track.title}"