fix: stabilize competition results flow

This commit is contained in:
dahyeon committed 2026-07-13 13:55:08 +00:00
1 parent 3bd3120eb1
commit a88562b208
20 files changed
+411 -65

No files matched your search

@@ -10,8 +10,9 @@ import type {
TeamId,
} from "@lolympus/contracts";
import {
DOUBLE_ELIMINATION_BRACKET_VIEWPORT_CLASS,
MATCH_PAGE_MAX_WIDTH_CLASS,
createCompetitionBracketLayout,
matchPageMaxWidthClass,
} from "../src/components/competition/competition-display-layout.ts";
import {
createDoubleEliminationBracketLayout,
@@ -83,10 +84,13 @@ test("places the canonical four-team DAG in shared time columns", () => {
assert.equal(nodeFor(layout, ids.GF).lane, "final");
});
test("selects the wide page grid only for double-elimination matches", () => {
assert.equal(matchPageMaxWidthClass("double-elimination"), "max-w-[1600px]");
assert.equal(matchPageMaxWidthClass("pair"), "max-w-5xl");
assert.equal(matchPageMaxWidthClass("round-robin"), "max-w-5xl");
test("keeps the match page narrow and gives only the desktop bracket a wide viewport", () => {
assert.equal(MATCH_PAGE_MAX_WIDTH_CLASS, "max-w-5xl");
assert.match(DOUBLE_ELIMINATION_BRACKET_VIEWPORT_CLASS, /max-w-\[1600px\]/);
assert.match(
DOUBLE_ELIMINATION_BRACKET_VIEWPORT_CLASS,
/w-\[calc\(100vw-3rem\)\]/,
);
});
test("selects the bracket only for a coherent double-elimination snapshot", () => {