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] + +