From 61f1ecf0b936931386cee6bbd187c3db18c8e84a Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Thu, 27 Aug 2026 17:31:17 -1000 Subject: Remove the language breakdown from the stats page --- tests/t0112-stats.sh | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'tests') diff --git a/tests/t0112-stats.sh b/tests/t0112-stats.sh index bc9c25b..262932c 100755 --- a/tests/t0112-stats.sh +++ b/tests/t0112-stats.sh @@ -1,9 +1,9 @@ #!/bin/sh # Checks the per repository statistics page, which stays off until a config -# turns it on and then reports commits per author beside a breakdown of the -# tree by language. A second config caps the period so that what max-stats -# takes out of the period selector is covered as well. +# turns it on and then reports commits per author. A second config caps the +# period so that what max-stats takes out of the period selector is covered +# as well. test_description='Check the statistics page' . ./setup.sh @@ -18,10 +18,7 @@ test_expect_success 'stats are off by default' ' ' # The authors table counts only recent periods, so the fixture needs a commit -# dated now to sit beside the 2005 dates the shared repositories carry. The -# commit graph is written on purpose, because it sends the language walk down -# the graph lookup path, which once handed back another commit after the -# history walk had released its memory. +# dated now to sit beside the 2005 dates the shared repositories carry. test_expect_success 'set up a stats config' ' mkrepo repos/pulse 2 && ( @@ -55,19 +52,17 @@ test_expect_success 'stats tab appears when enabled' ' grep ">stats" tmp ' -test_expect_success 'stats page renders both sections' ' +test_expect_success 'stats page renders the authors table' ' statq "url=stat/stats/" >tmp && - grep "

Languages" tmp && grep "

Commits per author" tmp ' -test_expect_success 'stat options sit above the content' ' - tr -d "\n" Commits per author.*//" | grep "cgit-panel" +test_expect_success 'no language breakdown is rendered' ' + ! grep -i "language" tmp ' -test_expect_success 'extensionless fixture files fold into Other' ' - grep "LanguageSizeShare" tmp && - grep "class=.left.>Other" tmp +test_expect_success 'stat options sit above the content' ' + tr -d "\n" Commits per author.*//" | grep "cgit-panel" ' test_expect_success 'stats below a path stay a normal page' ' -- cgit v2.8.0