From 7f49ee803a80af982323f1c5d368402dd6de2491 Mon Sep 17 00:00:00 2001 From: Amr Gaber Date: Fri, 29 May 2026 20:26:07 -0500 Subject: [PATCH] feat(home): link The King's Gauntlet above Vagrant Story Add a CRT menu row to https://aoe2.criticalbit.gg/kings-gauntlet, placed above Vagrant Story and styled to match (all-caps label, cursor, dotted leader, [WATCH] tag). Tests cover the link target and row ordering. --- src/pages/home/home-page.test.tsx | 18 ++++++++++++++++++ src/pages/home/home-page.tsx | 13 +++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/pages/home/home-page.test.tsx b/src/pages/home/home-page.test.tsx index cdb9002..3f93287 100644 --- a/src/pages/home/home-page.test.tsx +++ b/src/pages/home/home-page.test.tsx @@ -9,4 +9,22 @@ describe("HomePage", () => { /criticalbit\.gg/i ) }) + + it("links The King's Gauntlet to the aoe2 tournament path", async () => { + await renderWithFileRoutes(<>) + expect( + screen.getByRole("link", { name: /king's gauntlet/i }) + ).toHaveAttribute("href", "https://aoe2.criticalbit.gg/kings-gauntlet") + }) + + it("orders The King's Gauntlet above Vagrant Story in the menu", async () => { + await renderWithFileRoutes(<>) + const gauntlet = screen.getByRole("link", { name: /king's gauntlet/i }) + const vagrant = screen.getByRole("link", { name: /vagrant story/i }) + // bit 4 (DOCUMENT_POSITION_FOLLOWING) set => vagrant comes after gauntlet + expect( + gauntlet.compareDocumentPosition(vagrant) & + Node.DOCUMENT_POSITION_FOLLOWING + ).toBeTruthy() + }) }) diff --git a/src/pages/home/home-page.tsx b/src/pages/home/home-page.tsx index 610dbde..339b77d 100644 --- a/src/pages/home/home-page.tsx +++ b/src/pages/home/home-page.tsx @@ -45,6 +45,19 @@ export function HomePage() { onKeyDown={handleMenuKeyDown} className="crt-menu font-pixel mt-8" > +
  • + + + ▸ + + THE KING'S GAUNTLET + + [WATCH] + +