merge: 최신 main을 profile 버전 안내에 통합한다

This commit is contained in:
2026-08-22 05:12:10 +00:00
21 changed files with 918 additions and 797 deletions
@@ -39,6 +39,8 @@ void describe('shared Lumen button family', () => {
for (const label of ['토너먼트', '베팅장', '창 닫기']) {
assert.match(tournamentHeader, new RegExp(`legacy-button[\\s\\S]{0,260}${label}`, 'u'));
}
assert.match(tournamentHeader, /const closeWindow = \(\): void => window\.close\(\)/u);
assert.doesNotMatch(tournamentHeader, /custom to="\/"/u);
assert.match(reservedEditor, /legacy-button legacy-button--info legacy-button--fixed-height select-command/u);
assert.match(reservedEditor, / /u);
});
@@ -0,0 +1,32 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { resolveTournamentMainPresentation } from '../src/utils/tournamentNavigation.ts';
void test('routes every active tournament stage except betting to its type-specific tournament button', () => {
const expectedLabels = ['전력전', '통솔전', '일기토', '설전'];
for (const [type, expectedLabel] of expectedLabels.entries()) {
for (const stage of [1, 2, 3, 4, 5, 7, 8, 9, 10, 0]) {
const presentation = resolveTournamentMainPresentation(stage, type);
assert.equal(presentation.compactLabel, expectedLabel);
assert.equal(presentation.to, '/tournament');
assert.equal(presentation.active, true);
}
}
});
void test('routes the betting stage to the betting hall regardless of tournament type', () => {
for (const type of [0, 1, 2, 3]) {
const presentation = resolveTournamentMainPresentation(6, type);
assert.equal(presentation.compactLabel, '베팅장');
assert.equal(presentation.to, '/betting');
assert.equal(presentation.active, true);
}
});
void test('keeps the generic tournament button when no tournament state exists', () => {
const presentation = resolveTournamentMainPresentation(0, null);
assert.equal(presentation.compactLabel, '토너먼트');
assert.equal(presentation.to, '/tournament');
assert.equal(presentation.active, false);
});