Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ <h1>Kernel Kittens</h1>
<section class="archive-section" aria-labelledby="competition-results-title">
<h2 id="competition-results-title">Competition results</h2>
<div class="competition-records">
<article class="archive-record">
<p class="path-label">RESULT 2026 / team result</p>
<h3>Kaspersky{CTF} 2026</h3>
<p>Division: North America</p>
<dl class="archive-meta">
<div><dt>Placement</dt><dd>3 / 361</dd></div>
</dl>
</article>
<article class="archive-record">
<p class="path-label">RESULT 2026 / member result with a prior team</p>
<h3>Cyber Apocalypse 2026</h3>
Expand Down
8 changes: 8 additions & 0 deletions site/results/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
<div class="ready-page-shell">
<header class="archive-intro"><p class="path-label">/results</p><h1>Results</h1><p class="archive-lede">Placements we can prove. Prior-team work stays labeled as prior-team work.</p></header>
<div class="archive-body">
<section class="archive-section" aria-labelledby="kaspersky-ctf-title">
<article class="archive-record">
<p class="path-label">RESULT 2026 / team result</p>
<h2 id="kaspersky-ctf-title">Kaspersky{CTF} 2026</h2>
<p>Division: North America</p>
<dl class="archive-meta"><div><dt>Placement</dt><dd>3 / 361</dd></div></dl>
</article>
</section>
<section class="archive-section" aria-labelledby="cyber-apocalypse-title">
<article class="archive-record">
<p class="path-label">RESULT 2026 / member result with a prior team</p>
Expand Down
16 changes: 14 additions & 2 deletions tests/site-contract.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ test("the homepage links to Apply and Discord without loading the application cl
assert.doesNotMatch(home, /<script\b/);
});

test("the homepage removes the redundant path and publishes both verified results", () => {
test("the homepage removes the redundant path and publishes every verified result", () => {
const home = read("index.html");
assert.doesNotMatch(home, /<p class="path-label">\/home<\/p>/);
assert.match(home, /<h2 id="competition-results-title">Competition results<\/h2>/);
Expand All @@ -79,6 +79,10 @@ test("the homepage removes the redundant path and publishes both verified result
assert.match(home, /1 \/ 994/);
assert.match(home, /28 \/ 28/);
assert.match(home, /5,997/);
assert.match(home, /Kaspersky\{CTF\} 2026/);
assert.match(home, /3 \/ 361/);
assert.match(home, /Division: North America/);
assert.equal((home.match(/RESULT 2026 \/ team result/g) ?? []).length, 1);
assert.equal((home.match(/RESULT 2026 \/ member result with a prior team/g) ?? []).length, 2);
assert.doesNotMatch(home, /KK \/ RESULT 2026/);
assert.equal((home.match(/1337_PwnSp4c3/g) ?? []).length, 2);
Expand All @@ -90,7 +94,7 @@ test("the homepage removes the redundant path and publishes both verified result

test("the Results page contains the complete verified competition record", () => {
const results = read("results/index.html");
assert.equal((results.match(/class="archive-record"/g) ?? []).length, 2);
assert.equal((results.match(/class="archive-record"/g) ?? []).length, 3);
assert.match(results, /Cyber Apocalypse 2026/);
assert.match(results, /12 \/ 6,744/);
assert.match(results, /136 \/ 136/);
Expand All @@ -100,6 +104,14 @@ test("the Results page contains the complete verified competition record", () =>
assert.match(results, /28 \/ 28/);
assert.match(results, /5,997/);
assert.match(results, /Open - International/);
assert.match(results, /Kaspersky\{CTF\} 2026/);
assert.match(results, /3 \/ 361/);
assert.match(results, /Division: North America/);
assert.equal((results.match(/RESULT 2026 \/ team result/g) ?? []).length, 1);
assert.ok(
results.indexOf("Kaspersky{CTF} 2026") < results.indexOf("Cyber Apocalypse 2026"),
"the newest result must appear first",
);
assert.equal((results.match(/RESULT 2026 \/ member result with a prior team/g) ?? []).length, 2);
assert.doesNotMatch(results, /KK \/ RESULT 2026/);
assert.equal((results.match(/1337_PwnSp4c3/g) ?? []).length, 2);
Expand Down