Restore leaderboard combat and total rounds columns

This commit is contained in:
2026-10-06 19:51:09 -04:00
parent 9d31fc0580
commit 2520735850
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -19,12 +19,12 @@ function scope(search = '') {
function html(data = report()) { return render(Leaderboard, { props: { data: { leaderboard: data, user: null, setupRequired: false } } }).body; }
beforeEach(() => scope());
it('shows prominent totals and five columns, preserving ranks and collapsed identity and evidence', () => {
it('shows prominent totals and restored stat 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);
expect(headers.match(/scope="col"/g)).toHaveLength(9);
expect(headers).toContain('Highest round'); expect(headers).toContain('Total kills'); expect(headers).toContain('Games played');
expect(headers).not.toContain('Headshots');
for (const label of ['Total rounds', 'Headshots', 'Revives', 'Downs']) expect(headers).toContain(label);
expect(body).toMatch(/<span[^>]*>27<\/span>/);
expect(body).toContain('26–26 of 60 players');
const overview = body.slice(body.indexOf('class="overview'), body.indexOf('class="rankings'));
@@ -43,7 +43,7 @@ it('deduplicates the selected metric and preserves scope and pagination on playe
const data = report(); data.metric = 'kills';
const body = html(data);
const headers = body.slice(body.indexOf('<thead'), body.indexOf('</thead>'));
expect(headers.match(/scope="col"/g)).toHaveLength(4);
expect(headers.match(/scope="col"/g)).toHaveLength(8);
expect(body).toContain('offset%3D25'); expect(body).toContain('q%3DCherry');
scope('?game=t5&map=t5%3Atheater&metric=highestRound&q=Cherry&offset=25');
const recordBody = html();