refine Semi UI track replay workspace

This commit is contained in:
lingniu
2026-07-18 20:29:32 +08:00
parent b5b235e394
commit 9101d26005
4 changed files with 81 additions and 19 deletions

View File

@@ -16,6 +16,7 @@ vi.mock('../hooks/useMobileLayout', () => ({ useMobileLayout: () => layout.mobil
afterEach(() => {
cleanup();
document.querySelectorAll('.semi-portal').forEach((portal) => portal.remove());
layout.mobile = false;
Object.values(mocks).forEach((mock) => mock.mockReset());
});
@@ -310,8 +311,9 @@ test('filters the customer directory by status and exposes the active result sco
fireEvent.click(screen.getByRole('combobox', { name: '访问状态' }));
const attentionOption = await waitFor(() => {
const option = [...document.querySelectorAll<HTMLElement>('.semi-select-option')]
.find((item) => item.textContent?.includes('待完善权限'));
const options = [...document.querySelectorAll<HTMLElement>('.semi-select-option')]
.filter((item) => item.textContent?.includes('待完善权限'));
const option = options[options.length - 1];
expect(option).toBeInTheDocument();
return option!;
});