diff --git a/tests/test_youtube_channel_settings_ui.py b/tests/test_youtube_channel_settings_ui.py index 08690501..98808901 100644 --- a/tests/test_youtube_channel_settings_ui.py +++ b/tests/test_youtube_channel_settings_ui.py @@ -12,14 +12,19 @@ _WL = (_ROOT / "webui" / "static" / "video" / "video-watchlist.js").read_text(en _CSS = (_ROOT / "webui" / "static" / "video" / "video-side.css").read_text(encoding="utf-8") -def test_channel_card_has_a_settings_cog(): - assert 'data-vyt-wsettings' in _WL # cog button on the watchlist channel card - assert 'vyt-wcard-cog' in _WL and '.vyt-wcard-cog' in _CSS +def test_channel_and_playlist_cards_both_have_a_settings_cog(): + assert 'data-vyt-wsettings' in _WL # cog button on the watchlist cards + assert _WL.count('vyt-wcard-cog') >= 2 # channel + playlist cards + assert '.vyt-wcard-cog' in _CSS + assert 'data-kind="channel"' in _WL and 'data-kind="playlist"' in _WL -def test_cog_click_opens_the_settings_modal(): +def test_cog_click_opens_the_settings_modal_with_kind(): assert 'VideoYoutube.openChannelSettings(' in _WL assert "cog.getAttribute('data-vyt-wsettings')" in _WL + assert "cog.getAttribute('data-kind')" in _WL # kind passed through + # the modal reads the kind to label channel vs playlist + assert "kind === 'playlist' ? 'Playlist' : 'Channel'" in _YT def test_modal_is_exposed_and_built(): diff --git a/webui/static/video/video-watchlist.js b/webui/static/video/video-watchlist.js index 25fc9f12..c720d36f 100644 --- a/webui/static/video/video-watchlist.js +++ b/webui/static/video/video-watchlist.js @@ -25,7 +25,7 @@ return '
$channel folder/show name when this channel’s videos download. Blank = use the channel’s real name.$channel folder/show name when this ' + noun +
+ '’s videos download. Blank = use the ' + noun + '’s real name.