Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,18 @@ beforeEach(() => {
});

vi.mock("@/i18n/routing", () => ({
Link: ({ href, children }: { href: string; children: ReactNode }) => (
<a href={href}>{children}</a>
Link: ({
href,
children,
prefetch,
}: {
href: string;
children: ReactNode;
prefetch?: boolean;
}) => (
<a href={href} data-prefetch={String(prefetch)}>
{children}
</a>
),
}));

Expand Down Expand Up @@ -497,6 +507,11 @@ describe("error-details-dialog layout", () => {
expect(container.querySelector('a[href*="sessionId=pfx%3Ascope%3Aroot"]')).toBeTruthy();
expect(container.querySelector('a[href*="sessionId=physical-a"]')).toBeTruthy();
expect(container.querySelector('a[href*="requestId=203"]')).toBeTruthy();
expect(
container
.querySelector('a[href*="/dashboard/sessions/pfx%3Ascope%3Aroot/messages"]')
?.getAttribute("data-prefetch")
).toBe("false");
expect(container.textContent).toContain("Canonical Session ID: pfx:scope:root");
expect(container.textContent).toContain("Client Session ID: physical-a");
unmount();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ export function SummaryTab({
</div>
</div>
{identity.value === sessionId && hasMessages && !checkingMessages && (
<Link href={sessionMessagesHref}>
<Link href={sessionMessagesHref} prefetch={false}>
<Button variant="outline" size="sm">
<ExternalLink className="h-4 w-4 mr-2" />
{t("viewDetails")}
Expand Down
Loading