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
13 changes: 10 additions & 3 deletions frontend/src/__tests__/pages/dashboard-dead-ends.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ vi.mock('next/navigation', () => ({
}));

vi.mock('@/lib/auth-context', () => ({
useAuth: () => ({ user: { id: 'user-1', is_sysadmin: false }, isHydrated: true, isAuthenticated: true }),
useAuth: () => ({ user: { is_sysadmin: false }, isHydrated: true, isAuthenticated: true }),
}));

vi.mock('@/lib/tenant-context', () => ({
useTenant: () => ({ tenantId: 'tenant-1', isTenantReady: false }),
useTenant: () => ({ tenantId: null, isTenantReady: false }),
}));

vi.mock('@/hooks/use-api', () => ({
Expand Down Expand Up @@ -44,7 +44,7 @@ describe('disabled dashboard features', () => {
beforeEach(() => vi.stubEnv('NEXT_PUBLIC_ENABLE_EXPERIMENTAL_FEATURES', ''));
afterEach(() => vi.unstubAllEnvs());

it('hides alerts and heartbeat links and replaces the alert count when the feature is off', () => {
it('hides alerts and heartbeat links and marks alerts off when the feature is off', () => {
renderPage(<DashboardPage />);

expect(linksTo('/dashboard/alerts')).toHaveLength(0);
Expand Down Expand Up @@ -75,4 +75,11 @@ describe('disabled dashboard features', () => {
expect(screen.getByRole('button', { name: new RegExp(`${disabledAction} \\(coming soon\\)`, 'i') })).toBeDisabled();
expect(screen.queryByRole('textbox')).not.toBeInTheDocument();
});

it('keeps the manual Internal Drill path available', async () => {
renderPage(<RecallDrillsPage />);

expect(await screen.findByRole('link', { name: 'Requests (Internal Drill)' })).toHaveAttribute('href', '/requests');
expect(screen.getByText(/create an Internal Drill case, and walk it scope → collect → gap analysis → assemble → submit/)).toBeInTheDocument();
});
});
1 change: 1 addition & 0 deletions frontend/src/app/dashboard/recall-drills/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export default function RecallDrillsPage() {
<Link2Off className="mt-0.5 h-4 w-4 shrink-0 text-re-warning" strokeWidth={1.75} aria-hidden="true" />
<div>
<p>Automated drill scheduling is still in development. This workspace cannot start a drill here today.</p>
<p className="mt-2">You can run a full manual drill today: open <Link href="/requests" className="underline">Requests (Internal Drill)</Link>, create an Internal Drill case, and walk it scope → collect → gap analysis → assemble → submit.</p>
<p className="mt-2">To prepare traceability records now, use <Link href="/ingest" className="underline">CSV upload</Link> or the <Link href="/developers" className="underline">JSON events API</Link>.</p>
</div>
</div>
Expand Down
Loading