Skip to content

Commit

Permalink
Remove redundant assert_selector in system test to avoid flakiness
Browse files Browse the repository at this point in the history
I was seeing some flakiness with these selectors asserting the
presence of `h1` and `h2`. I suspect this might be due to the use of
Turbo to replace the page DOM rather than a full page reload. Since
the other assert_text calls confirm that we're on the correct page, I
think I can safely remove these without losing coverage.
  • Loading branch information
chrislo committed Oct 13, 2023
1 parent 03898b0 commit 03124fa
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions test/system/buying_an_album_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ class BuyingAnAlbumTest < ApplicationSystemTestCase
click_link @album.artist.name
click_link @album.title

assert_selector 'h1', text: @album.title
assert_selector 'h2', text: @album.artist.name

assert_text "1. #{@album.tracks.first.title}"

assert_text @album.about.gsub(/^\s+/, '')
assert_text @album.credits.gsub(/^\s+/, '')
end
Expand Down

0 comments on commit 03124fa

Please sign in to comment.