test(reference-feature): give route-entry waits room under host load (10-02)

Each installed route resolves the context route table and a lazy page, and
React holds each Suspense reveal for up to 300ms, so the 1s findBy default
failed on a busy host with a misleading missing-heading message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DongHyeonka
2026-09-26 00:10:22 +09:00
co-authored by Claude Opus 5.5
parent 4d17259037
commit e8b116306c
@@ -4,9 +4,15 @@ import {
QueryClient,
QueryClientProvider,
} from "@tanstack/react-query";
import { render, screen, waitFor } from "@testing-library/react";
import {
configure,
getConfig,
render,
screen,
waitFor,
} from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { describe, expect, it, vi } from "vitest";
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
import { createDemoSessionAdapter } from "../../../src/adapters/auth/external-session-adapter.ts";
import type { AuthSessionPort } from "../../../src/application/ports/auth-session-port.ts";
@@ -122,6 +128,16 @@ function inputWith(
}
describe("reference feature page states", () => {
// Entering an installed route resolves the context route table and then a
// lazy page, and React holds each Suspense reveal for up to 300ms. That
// floor alone uses half of Testing Library's 1s findBy default, so a busy
// host misses it and reports a missing heading instead of a slow route.
// Keep the wider wait scoped to this file; the test timeout still catches
// a real hang.
const defaultAsyncUtilTimeout = getConfig().asyncUtilTimeout;
beforeAll(() => configure({ asyncUtilTimeout: 5_000 }));
afterAll(() => configure({ asyncUtilTimeout: defaultAsyncUtilTimeout }));
it("mounts list and detail keys under the installed governed namespace", async () => {
expect(REFERENCE_RESOURCE_QUERY_NAMESPACE).toEqual({
namespaceId: "reference-resource",