~hristoast/mousikofidi

bab0f5776190f578b5d60a4b01e92334eb72d549 — Hristos N. Triantafillou 5 days ago a98961a
That shouldn't be a link

At least, what it is now isnt right.
2 files changed, 19 insertions(+), 22 deletions(-)

M mousikofidi/templates/base.html
M test_mousikofidi.py
M mousikofidi/templates/base.html => mousikofidi/templates/base.html +2 -2
@@ 75,8 75,8 @@
        {% endif %}

        <li id="logo">
          <a id="logo" href="{% if video_player or video_list %}#videoplayer{% elif audio_player or audio_list %}#audio-time-link{% else %}/{% endif %}">
            <img alt="Fidi Logo and {% if video_player or video_list %}video player{% elif audio_player %}player{% else %}home{% endif %} link" src="{{ logo_path }}" title="The MousikóFídi logo, and a link to the {% if video_player or video_list %}video player{% elif audio_list %}player{% else %}main index page{% endif %}.">
          <a id="logo">
            <img alt="The MousikóFídi logo" src="{{ logo_path }}" title="The MousikóFídi logo">
          </a>
        </li>
      </ul>

M test_mousikofidi.py => test_mousikofidi.py +17 -20
@@ 1504,7 1504,7 @@ def test_browse_http_code(client):
    )
    assert (
        bytes(
            '<img alt="Fidi Logo and home link" src="{}" title="The MousikóFídi logo, and a link to the main index page.">'.format(
            '<img alt="The MousikóFídi logo" src="{}" title="The MousikóFídi logo">'.format(
                logo
            ),
            "utf8",


@@ 1593,7 1593,7 @@ def test_dir_detail_found(client):
    app.fidiConfig["theme"] = "dark"

    favicon = select_logo(app.fidiConfig, "favicon_path")
    logo = select_logo(app.fidiConfig, "logo_path")
    # logo = select_logo(app.fidiConfig, "logo_path")

    with app.app_context():
        rv = client.get(url)


@@ 1628,9 1628,6 @@ def test_dir_detail_found(client):
        )
        in rv.data
    )
    for line in rv.data.decode().split("\n"):
        if "goto" in line:
            print(line)
    assert (
        bytes(
            '<h4 class="center mobile-big"><a href="/browse/{0}">{1}</a></h4>'.format(


@@ 1641,15 1638,15 @@ def test_dir_detail_found(client):
        in rv.data
    )
    assert bytes('<link rel="icon" href="{}">'.format(favicon), "utf8") in rv.data
    assert (
        bytes(
            ' link" src="{}" title="The MousikóFídi logo, and a link to the '.format(
                logo
            ),
            "utf8",
        )
        in rv.data
    )

    # for line in rv.data.decode().split("\n"):
    #     if " link" in line:
    #         print(line)
    # assert (
    #     bytes(' link" src="{}" title="The MousikóFídi logo'.format(logo), "utf8")
    #     in rv.data
    # )

    assert (
        b'<link href="/css/water/dark.standalone.css" rel="stylesheet" type="text/css">'
        in rv.data


@@ 1667,7 1664,7 @@ def test_dir_detail_found(client):
    assert bytes('<div class="center" id="player">', "utf8") in rv.data
    assert (
        bytes(
            '<p id="now-playing" title="The status of the current track.  Click the track title to jump to it in the playlist.">Paused: <span class="bold" id="playing-title" title="The title of the current track."></span></p>',
            '<p id="now-playing" title="The status of the current track.  Click the track title to jump to it in the playlist.">Paused: <span class="bold" id="playing-title" title="The title of the current track; click to jump to it"></span></p>',
            "utf8",
        )
        in rv.data


@@ 2393,7 2390,7 @@ def test_playlist_with_audio_and_video(client):
    # assert bytes('<div class="center" id="player">', "utf8") in rv.data
    # assert (
    #     bytes(
    #         '<p id="now-playing" title="The status of the current track.  Click the track title to jump to it in the playlist.">Paused: <span class="bold" id="playing-title" title="The title of the current track."></span></p>',
    #         '<p id="now-playing" title="The status of the current track.  Click the track title to jump to it in the playlist.">Paused: <span class="bold" id="playing-title" title="The title of the current track; click to jump to it"></span></p>',
    #         "utf8",
    #     )
    #     in rv.data


@@ 2717,7 2714,7 @@ def test_playlist_with_audio_no_video(client):
    # assert bytes('<div class="center" id="player">', "utf8") in rv.data
    # assert (
    #     bytes(
    #         '<p id="now-playing" title="The status of the current track.  Click the track title to jump to it in the playlist.">Paused: <span class="bold" id="playing-title" title="The title of the current track."></span></p>',
    #         '<p id="now-playing" title="The status of the current track.  Click the track title to jump to it in the playlist.">Paused: <span class="bold" id="playing-title" title="The title of the current track; click to jump to it"></span></p>',
    #         "utf8",
    #     )
    #     in rv.data


@@ 3044,7 3041,7 @@ def test_playlist_no_audio_with_video(client):
    # assert bytes('<div class="center" id="player">', "utf8") not in rv.data
    # assert (
    #     bytes(
    #         '<p id="now-playing" title="The status of the current track.  Click the track title to jump to it in the playlist.">Paused: <span class="bold" id="playing-title" title="The title of the current track."></span></p>',
    #         '<p id="now-playing" title="The status of the current track.  Click the track title to jump to it in the playlist.">Paused: <span class="bold" id="playing-title" title="The title of the current track; click to jump to it"></span></p>',
    #         "utf8",
    #     )
    #     not in rv.data


@@ 3281,7 3278,7 @@ def test_playlist_detail_real_with_bad(client):
    )
    assert (
        bytes(
            '<p id="now-playing" title="The status of the current track.  Click the track title to jump to it in the playlist.">Paused: <span class="bold" id="playing-title" title="The title of the current track."></span></p>',
            '<p id="now-playing" title="The status of the current track.  Click the track title to jump to it in the playlist.">Paused: <span class="bold" id="playing-title" title="The title of the current track; click to jump to it"></span></p>',
            "utf8",
        )
        in rv.data


@@ 3444,7 3441,7 @@ def test_playlist_detail_real(client):
    )
    assert (
        bytes(
            '<p id="now-playing" title="The status of the current track.  Click the track title to jump to it in the playlist.">Paused: <span class="bold" id="playing-title" title="The title of the current track."></span></p>',
            '<p id="now-playing" title="The status of the current track.  Click the track title to jump to it in the playlist.">Paused: <span class="bold" id="playing-title" title="The title of the current track; click to jump to it"></span></p>',
            "utf8",
        )
        in rv.data