/** @vitest-environment jsdom */ import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'; import { QueryClientProvider } from '@tanstack/react-query'; import { createMemoryHistory, createRootRoute, createRoute, createRouter, Outlet, RouterProvider, useLocation, } from '@tanstack/react-router'; import { useState } from 'react'; import { afterEach, beforeEach, expect, it, vi } from 'vitest'; import type { AxiosAdapter } from 'axios'; import type { ViewOverride, ViewProps } from '@/views/registry'; import type * as Registry from '@/extensions/registry'; import type * as Testing from '@/sdk/testing'; import type * as QueryClientModule from '@/api/queryClient'; import type * as Http from '@/api/http'; import type * as ServerQueries from '@/api/server/queries'; import type * as Views from '@/views/View'; import type FileEditorFrame from '@/components/server/files/fileEditorSession'; import { readNewFileDraft } from '@/lib/fileDrafts'; const serverUuid = '11111111-1111-4111-8111-111111111111'; vi.mock('@/components/elements/LazyCodemirrorEditor', () => ({ default: (props: { initialContent?: string; onContentChanged?: (content: string) => void }) => (