Implement sorting

Shows the broadcasts with the longest time still to live at the top. At
the moment this will be the same as the newest broadcasts, so we may
want to revisit this sort order when we have broadcasts of variable
duration.

For no-longer-live broadcasts we show the most-recently-finished at the
top, whether it finished naturally or was cancelled.
This commit is contained in:
Chris Hill-Scott
2020-07-10 09:26:47 +01:00
parent b57bbd4642
commit 3136d1a33b
3 changed files with 9 additions and 2 deletions

View File

@@ -83,8 +83,8 @@ def test_broadcast_dashboard(
assert [
normalize_spaces(row.text) for row in page.select('table')[1].select('tbody tr')
] == [
'Example template To England and Scotland Finished yesterday at 8:20pm',
'Example template To England and Scotland Stopped 10 February at 2:20am',
'Example template To England and Scotland Finished yesterday at 8:20pm',
]