perf(web): pause hidden live polling
This commit is contained in:
@@ -22,6 +22,12 @@ test('reconciles service identities with bound and identity-required vehicles',
|
||||
render(<QueryClientProvider client={client}><OperationsPage /></QueryClientProvider>);
|
||||
|
||||
expect(await screen.findByText('1035 / 234')).toBeInTheDocument();
|
||||
for (const key of [['ops-health-v2'], ['ops-source-readiness-v2']]) {
|
||||
const query = client.getQueryCache().find({ queryKey: key });
|
||||
const liveOptions = query?.options as { refetchIntervalInBackground?: boolean; refetchOnWindowFocus?: boolean };
|
||||
expect(liveOptions.refetchIntervalInBackground).toBe(false);
|
||||
expect(liveOptions.refetchOnWindowFocus).toBe(true);
|
||||
}
|
||||
expect(screen.getByText('服务身份 / 在线')).toBeInTheDocument();
|
||||
expect(screen.getByText('已绑定 1024 · 待绑定 11')).toBeInTheDocument();
|
||||
expect(screen.queryByText('统一车辆视角')).not.toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user