style(web): close control-system gaps found in the deep sweep
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// @vitest-environment jsdom
|
||||
import { cleanup, render, screen, within } from '@testing-library/react';
|
||||
import { cleanup, render, screen, waitFor, within } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
@@ -28,6 +28,11 @@ async function mount(overrides: Partial<SystemMaintenanceDataSource> = {}) {
|
||||
const data = source(overrides);
|
||||
const view = render(<ConnectionSettingsPanel dataSource={data} />);
|
||||
const region = await screen.findByRole('region', { name: '连接设置' });
|
||||
if (!overrides.connection) {
|
||||
await waitFor(() => {
|
||||
expect(within(region).getByLabelText('心跳间隔(秒)').value).toBe('30');
|
||||
});
|
||||
}
|
||||
return { ...view, data, region };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user