import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { render, screen, fireEvent, waitFor } from '@testing-library/react'; import { RebootOTADialog } from './RebootOTADialog.tsx'; import { ReactNode } from "react"; const rebootOtaMock = vi.fn(); let mockConnection: { rebootOta: (delay: number) => void } | undefined = { rebootOta: rebootOtaMock, }; vi.mock('@core/stores/deviceStore.ts', () => ({ useDevice: () => ({ connection: mockConnection, }), })); vi.mock('@components/UI/Button.tsx', async () => { const actual = await vi.importActual('@components/UI/Button.tsx'); return { ...actual, Button: (props: any) =>