From 58abebd1065c0dd3a9b6b943ebb8151ce8aba151 Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza <8016841+diegosouzapw@users.noreply.github.com> Date: Sun, 5 Jul 2026 07:34:49 -0300 Subject: [PATCH] test(dashboard): realign #6145 onboarding-href guard to the #6166 helper refactor (#6270) Realign the #6145 onboarding-href guard to the #6166 helper refactor (buildProviderDetailsHref). Test-only; unblocks the fast-path unit job across the open PR queue. Base-reds only (dast-smoke #6228, docs version-drift, executor-kiro anys). Integrated into release/v3.8.45. --- .../onboarding-wizard-details-link-6145.test.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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)" ); });