fix(access): hide unresolved identity queue from viewers
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user