fix(access): hide unresolved identity queue from viewers

This commit is contained in:
lingniu
2026-07-16 08:10:05 +08:00
parent 7346cd0891
commit 6049d8c22b
2 changed files with 6 additions and 4 deletions

View File

@@ -87,11 +87,13 @@ test('does not request or render admin-only thresholds for a read-only session',
render(<QueryClientProvider client={client}><MemoryRouter future={ROUTER_FUTURE} initialEntries={['/access']}><AccessPage /></MemoryRouter></QueryClientProvider>);
expect(await screen.findByText('粤A00001')).toBeInTheDocument();
expect(mocks.accessUnresolvedIdentities).not.toHaveBeenCalled();
expect(mocks.accessThresholds).not.toHaveBeenCalled();
expect(screen.queryByText(/在线判定阈值/)).not.toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: /刷新/ }));
await waitFor(() => expect(mocks.accessSummary).toHaveBeenCalledTimes(2));
expect(mocks.accessUnresolvedIdentities).not.toHaveBeenCalled();
expect(mocks.accessThresholds).not.toHaveBeenCalled();
expect(screen.queryByRole('alert')).not.toBeInTheDocument();
});