From 8a326b9b9d6435c1f95721342afe7b5c7300c541 Mon Sep 17 00:00:00 2001 From: Scott Yargeau Date: Mon, 2 Jul 2018 22:38:00 -0400 Subject: [PATCH] Add link to go back to leaderboard on all matches page --- functional_tests/test_all_matches.py | 7 +++++++ leaderboard/templates/all_matches.html | 2 ++ 2 files changed, 9 insertions(+) diff --git a/functional_tests/test_all_matches.py b/functional_tests/test_all_matches.py index 237a3c8..1d25d56 100644 --- a/functional_tests/test_all_matches.py +++ b/functional_tests/test_all_matches.py @@ -100,3 +100,10 @@ def test_all_matches(self): self.browser.find_element_by_id('previous-page-link').click() current_page = self.browser.find_element_by_id('current-page') self.assertEqual(current_page.text, 'Page 2 of 3') + + # Lastly he see a link to go back to the home page, and clicks this + home_page_link = self.browser.find_element_by_id('home-page-link') + self.assertEqual(home_page_link.text, 'Back to leaderboard') + home_page_link.click() + home_url = self.live_server_url + '/' + self.assertEqual(home_url, self.browser.current_url) diff --git a/leaderboard/templates/all_matches.html b/leaderboard/templates/all_matches.html index c99ef4b..1cc80ce 100644 --- a/leaderboard/templates/all_matches.html +++ b/leaderboard/templates/all_matches.html @@ -10,6 +10,8 @@

All Matches

+ Back to leaderboard +
Date