From 987f9eab3b4170cfd170285cb3b15fd3c889f709 Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Fri, 4 Feb 2022 18:04:47 -0800 Subject: [PATCH] fix: link to user account in last votes by tu listing Signed-off-by: Kevin Morris --- templates/partials/tu/last_votes.html | 6 +++++- test/test_trusted_user_routes.py | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/partials/tu/last_votes.html b/templates/partials/tu/last_votes.html index a8a80d32..30d620d4 100644 --- a/templates/partials/tu/last_votes.html +++ b/templates/partials/tu/last_votes.html @@ -18,7 +18,11 @@ {% else %} {% for vote in votes %} - {{ vote.Username }} + + + {{ vote.Username }} + + {{ vote.LastVote }} diff --git a/test/test_trusted_user_routes.py b/test/test_trusted_user_routes.py index 0e6ca9ce..0ea44d10 100644 --- a/test/test_trusted_user_routes.py +++ b/test/test_trusted_user_routes.py @@ -251,6 +251,7 @@ def test_tu_index(client, tu_user): # Check to see the rows match up to our user and related vote. username, vote_id = rows[0] + username = username.xpath("./a")[0] vote_id = vote_id.xpath("./a")[0] assert username.text.strip() == tu_user.Username assert int(vote_id.text.strip()) == vote_records[1].ID @@ -464,6 +465,7 @@ def test_tu_index_last_votes(client, tu_user, user): last_vote = rows[0] user, vote_id = last_vote.xpath("./td") + user = user.xpath("./a")[0] vote_id = vote_id.xpath("./a")[0] assert user.text.strip() == tu_user.Username