Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Say which index column is sorted
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0101-index.sh | 13 |
1 file changed, 13 insertions, 0 deletions
diff --git a/tests/t0101-index.sh b/tests/t0101-index.sh index fcf873b..be947af 100755 --- a/tests/t0101-index.sh +++ b/tests/t0101-index.sh @@ -77,6 +77,19 @@ test_expect_success 'the index sorts by a column on request' ' done ' +# Only the heading of the column the index is sorted by tells a screen reader +# so. Idle lists the latest change first, so it is ascending like the rest. +test_expect_success 'the sorted column heading says which way it runs' ' + for s in name desc owner idle + do + cgit_query "s=$s" >tmp && + grep "<th class=.left col-$s. scope=.col. aria-sort=.ascending.>" tmp && + test $(grep -o "aria-sort" tmp | wc -l) = 1 || return 1 + done && + cgit_url "" >tmp && + ! grep "aria-sort" tmp +' + # A scan has no cgitrc order for the index to keep, so it lists what it finds # by path whatever order the directory hands back, comparing names the way # case-sensitive-sort tells the index to. |
