Restore prominent leaderboard summary stats

This commit is contained in:
2026-10-06 19:30:39 -04:00
parent 711191c388
commit 9d31fc0580
2 changed files with 29 additions and 14 deletions
+7 -3
View File
@@ -19,7 +19,7 @@ function scope(search = '') {
function html(data = report()) { return render(Leaderboard, { props: { data: { leaderboard: data, user: null, setupRequired: false } } }).body; }
beforeEach(() => scope());
it('shows five columns, preserves recorded ranks, and collapses totals, identity and evidence', () => {
it('shows prominent totals and five columns, preserving ranks and collapsed identity and evidence', () => {
const body = html();
const headers = body.slice(body.indexOf('<thead'), body.indexOf('</thead>'));
expect(headers.match(/scope="col"/g)).toHaveLength(5);
@@ -27,7 +27,11 @@ it('shows five columns, preserves recorded ranks, and collapses totals, identity
expect(headers).not.toContain('Headshots');
expect(body).toMatch(/<span[^>]*>27<\/span>/);
expect(body).toContain('26–26 of 60 players');
expect(body).toContain('473 players · 411 completed games · Highest round 49');
const overview = body.slice(body.indexOf('class="overview'), body.indexOf('class="rankings'));
expect(overview).toContain('All-time stats for All games &amp; maps');
for (const value of ['49', '112,899', '7,062', '411', '473']) expect(overview).toMatch(new RegExp(`<strong[^>]*>${value}</strong>`));
expect(overview).toContain('Fleet record');
expect(overview).not.toContain('<details');
expect(body).not.toMatch(/<details[^>]*open/);
expect(body).not.toContain('Copy GUID'); expect(body).not.toContain('Every round counts');
expect(body).toContain('Record details'); expect(body).toContain('First observed at round 8');
@@ -45,7 +49,7 @@ it('deduplicates the selected metric and preserves scope and pagination on playe
const recordBody = html();
expect(recordBody).toContain('/matches/71?returnTo=%2Fleaderboard');
expect(recordBody).toContain('map%3Dt5%253Atheater');
expect(recordBody).toContain('Scope totals'); expect(recordBody).not.toContain('Fleet totals');
expect(recordBody).toContain('Selection record'); expect(recordBody).not.toContain('Fleet record');
});
it('keeps qualification and denominator visible for efficiency rankings and missing values distinct', () => {