diff --git a/tests/unit/onboarding-wizard-details-link-6145.test.ts b/tests/unit/onboarding-wizard-details-link-6145.test.ts index 78ff6c67a7..52efbd241b 100644 --- a/tests/unit/onboarding-wizard-details-link-6145.test.ts +++ b/tests/unit/onboarding-wizard-details-link-6145.test.ts @@ -9,6 +9,13 @@ import { dirname, join } from "node:path"; // `/dashboard/providers/[id]` route expects), NOT `connection.provider` (the // provider slug/type). The old code produced `/dashboard/providers/` // which 404s for openai-compatible / anthropic-compatible providers. +// +// #6166 refactored the inline `href={`/dashboard/providers/${connection.id}`}` +// literal into the tested `buildProviderDetailsHref(connection)` helper (its +// id-based routing + null-safety is guarded behaviorally in +// `provider-onboarding-href.test.ts`). This guard now tracks that refactor: the +// wizard must delegate to the helper and must NOT reintroduce a raw +// `connection.provider` URL. const here = dirname(fileURLToPath(import.meta.url)); const repoRoot = join(here, "..", ".."); @@ -20,11 +27,11 @@ const wizard = readFileSync( "utf8" ); -test("#6145: provider-details link routes by connection.id (matches the [id] route)", () => { +test("#6145: provider-details link routes through buildProviderDetailsHref (id-based helper)", () => { assert.match( wizard, - /href=\{`\/dashboard\/providers\/\$\{connection\.id\}`\}/, - "the details link must build the URL from connection.id" + /buildProviderDetailsHref\(connection\)/, + "the details link must be built by the tested buildProviderDetailsHref helper (routes by connection.id)" ); });