// @vitest-environment jsdom
import { render, screen, within } from "@testing-library/react";
import { Suspense } from "react";
import { describe, expect, it, vi } from "vitest";
import { ROUTE_REGISTRY } from "../../src/features/installed-feature-contracts.ts";
import { LocaleProvider } from "../../src/presentation/i18n/index.ts";
import { ApplicationProvider } from "../../src/presentation/providers/application-provider.tsx";
import { PLATFORM_ROUTE_RUNTIME } from "../../src/presentation/routes/route-runtime.tsx";
import { createTestApplication } from "../helpers/create-test-application.ts";
// The feature runtimes never arrive: the route must not wait for them.
vi.mock("../../src/features/installed-feature-runtime-registries.ts", () => ({
loadInstalledFeatureRuntimeRegistries: () => new Promise(() => {}),
}));
/**
* 1103/15-01. The lab gate (FE-GATE-026) times this route from the click to
* its heading. Its route module used to await every installed feature's
* runtime half first, which added a second request round to the click.
*/
describe("platform overview route module", () => {
it("draws the title and the declared routes before the feature runtimes load", async () => {
const Page = PLATFORM_ROUTE_RUNTIME.EXAMPLES_PLATFORM.Component;
render(