fix: AppHeader usa <Link> para navegación SPA (no full reload); mock en tests de ReportPage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 00:35:05 -03:00
parent de0209d834
commit f913fc26e2
3 changed files with 11 additions and 5 deletions

View File

@@ -1,3 +1,5 @@
import { Link } from '@tanstack/react-router'
export function AppHeader() {
return (
<header
@@ -12,15 +14,15 @@ export function AppHeader() {
flexShrink: 0,
}}
>
<a href="/" style={{ display: 'flex', alignItems: 'center' }}>
<Link to="/" style={{ display: 'flex', alignItems: 'center' }}>
<img
src="/inquality-logo-white.png"
alt="InQuality"
style={{ height: 24, objectFit: 'contain', cursor: 'pointer' }}
/>
</a>
<a
href="/"
</Link>
<Link
to="/"
style={{
color: 'white',
fontSize: 13,
@@ -31,7 +33,7 @@ export function AppHeader() {
}}
>
InQ ROI
</a>
</Link>
</header>
)
}

View File

@@ -9,6 +9,8 @@ import React from 'react'
// ─── Mocks de dependencias del browser ───────────────────────────────────────
vi.mock('@/components/AppHeader', () => ({ AppHeader: () => null }))
vi.mock('bpmn-js/lib/Viewer', () => ({
default: class MockViewer {
importXML = vi.fn().mockResolvedValue({ warnings: [] })

View File

@@ -12,6 +12,8 @@ import React from 'react'
// ─── Mocks de dependencias del browser ───────────────────────────────────────
vi.mock('@/components/AppHeader', () => ({ AppHeader: () => null }))
vi.mock('bpmn-js/lib/Viewer', () => ({
default: class MockViewer {
importXML = vi.fn().mockResolvedValue({ warnings: [] })