Skip to content

Commit

Permalink
Merge pull request #31 from syargeau/feature/back-to-home
Browse files Browse the repository at this point in the history
Add link to go back to leaderboard on all matches page
  • Loading branch information
syargeau authored Jul 3, 2018
2 parents ac67ee0 + 8a326b9 commit 8f692fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions functional_tests/test_all_matches.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 2 additions & 0 deletions leaderboard/templates/all_matches.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<body>
<h1>All Matches</h1>

<a id="home-page-link" href="{% url 'home' %}">Back to leaderboard</a>

<table id="matches">
<tr>
<th>Date</th>
Expand Down

0 comments on commit 8f692fe

Please sign in to comment.