Skip to content

Commit

Permalink
Remove some brittle system tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aidewoode committed Oct 1, 2024
1 parent a63b73c commit 4c0da3b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 33 deletions.
10 changes: 0 additions & 10 deletions test/system/player_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ class PlayerSystemTest < ApplicationSystemTestCase
assert_selector(:test_id, "player_song_name", text: Song.first.name)
end

test "pause song" do
find(:test_id, "player_play_button").click
assert_selector(:test_id, "player_play_button", visible: false)
assert_selector(:test_id, "player_pause_button", visible: true)

find(:test_id, "player_pause_button").click
assert_selector(:test_id, "player_play_button", visible: true)
assert_selector(:test_id, "player_pause_button", visible: false)
end

test "play next song" do
find(:test_id, "player_play_button").click
find(:test_id, "player_next_button").click
Expand Down
10 changes: 0 additions & 10 deletions test/system/setting_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@ class SettingSystemTest < ApplicationSystemTestCase
assert_text("Updated successfully")
end

test "update media path" do
Media.syncing = false

visit setting_url

fill_in("setting_media_path", with: Rails.root.join("test/fixtures/files").to_s)
click_on("Sync")

assert_text("Media sync completed")
end

test "update discogs token" do
visit setting_url
Expand Down
13 changes: 0 additions & 13 deletions test/system/songs_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,6 @@ class SongsSystemTest < ApplicationSystemTestCase
end
end

test "add song to the next in current playlist" do
@user.current_playlist.songs << Song.where(name: ["song_test_0", "song_test_1"])
visit songs_url

# Play the first song in current playlist
first(:test_id, "current_playlist_song").click

first(:test_id, "song_menu").click
click_on "Play Next"

assert_equal all(:test_id, "current_playlist_song_name")[1].text, first(:test_id, "song_name").text
end

test "add song to the end in current playlist" do
@user.current_playlist.songs << Song.where(name: ["song_test_0", "song_test_1"])
visit songs_url
Expand Down

0 comments on commit 4c0da3b

Please sign in to comment.