diff --git a/test/system/artists_test.rb b/test/system/artists_test.rb index 5b07683b..f985ce6d 100644 --- a/test/system/artists_test.rb +++ b/test/system/artists_test.rb @@ -12,7 +12,7 @@ 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 @@ -28,7 +28,7 @@ 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_on 'Save' assert_text 'New Artist Name' diff --git a/test/system/collection_test.rb b/test/system/collection_test.rb index f4c86e30..9049429e 100644 --- a/test/system/collection_test.rb +++ b/test/system/collection_test.rb @@ -42,7 +42,7 @@ class CollectionTest < ApplicationSystemTestCase 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*' diff --git a/test/system/creating_an_album_test.rb b/test/system/creating_an_album_test.rb index f88f4bba..d1bd89ea 100644 --- a/test/system/creating_an_album_test.rb +++ b/test/system/creating_an_album_test.rb @@ -12,12 +12,12 @@ 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 @@ -25,7 +25,7 @@ class CreatingAnAlbumTest < ApplicationSystemTestCase 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,7 +34,7 @@ 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_on 'Save' assert_text 'New Title' diff --git a/test/system/creating_an_artist_test.rb b/test/system/creating_an_artist_test.rb index 21723560..1c904c5f 100644 --- a/test/system/creating_an_artist_test.rb +++ b/test/system/creating_an_artist_test.rb @@ -12,7 +12,7 @@ class CreatingAnArtistTest < ApplicationSystemTestCase test 'creating an artist' do visit root_url click_on 'avatar' - click_link 'Add artist' + click_on 'Add artist' fill_in 'Name', with: 'The Beatles' fill_in 'Location', with: 'Liverpool' fill_in 'Description', with: 'A popular beat combo' diff --git a/test/system/identity/emails_test.rb b/test/system/identity/emails_test.rb index 1f05dc3c..0d1c3073 100644 --- a/test/system/identity/emails_test.rb +++ b/test/system/identity/emails_test.rb @@ -10,8 +10,8 @@ class EmailsTest < ApplicationSystemTestCase test 'updating the email' do click_on 'avatar' - click_link 'My account' - click_link 'Change email address' + 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*' @@ -24,8 +24,8 @@ class EmailsTest < ApplicationSystemTestCase @user.update! verified: false click_on 'avatar' - click_link 'My account' - click_link 'Change email address' + 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' diff --git a/test/system/identity/password_resets_test.rb b/test/system/identity/password_resets_test.rb index ee8ae91f..fe35be10 100644 --- a/test/system/identity/password_resets_test.rb +++ b/test/system/identity/password_resets_test.rb @@ -11,7 +11,7 @@ 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_on 'Send password reset email' diff --git a/test/system/passwords_test.rb b/test/system/passwords_test.rb index 42c11d57..41608de0 100644 --- a/test/system/passwords_test.rb +++ b/test/system/passwords_test.rb @@ -9,8 +9,8 @@ class PasswordsTest < ApplicationSystemTestCase test 'updating the password' do click_on 'avatar' - click_link 'My account' - click_link 'Change password' + click_on 'My account' + click_on 'Change password' fill_in 'Current password', with: 'Secret1*3*5*' fill_in 'New password', with: 'Secret6*4*2*' diff --git a/test/system/payout_details_test.rb b/test/system/payout_details_test.rb index 24dbfea4..9d27b9bc 100644 --- a/test/system/payout_details_test.rb +++ b/test/system/payout_details_test.rb @@ -10,7 +10,7 @@ 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_on 'Save' diff --git a/test/system/publishing_an_album_test.rb b/test/system/publishing_an_album_test.rb index a2147c70..2d97e0a3 100644 --- a/test/system/publishing_an_album_test.rb +++ b/test/system/publishing_an_album_test.rb @@ -13,7 +13,7 @@ class PublishingAnAlbumTest < ApplicationSystemTestCase test 'publishing an album' do # Artist requests publication visit artist_url(@album.artist) - click_link "#{@album.title} (unpublished)" + click_on "#{@album.title} (unpublished)" click_on 'Publish' assert_text "Thank you! We'll email you when your album is published." sign_out @@ -27,7 +27,7 @@ class PublishingAnAlbumTest < ApplicationSystemTestCase # 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/signing_up_test.rb b/test/system/signing_up_test.rb index 9b7cfbf7..3ac0832f 100644 --- a/test/system/signing_up_test.rb +++ b/test/system/signing_up_test.rb @@ -5,7 +5,7 @@ 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*'