test(web): remove AppRoot element order snapshot (#10052)
This commit is contained in:
1 parent
c2aff911c3
commit
a98dad77e1
1 file changed
-26
@@ -1,26 +0,0 @@
|
||||
import { Children, isValidElement, type ReactElement, type ReactNode } from "react";
|
||||
import { RouterProvider } from "@tanstack/react-router";
|
||||
import { describe, expect, it } from "vite-plus/test";
|
||||
|
||||
import { ElectronBrowserHost } from "./browser/ElectronBrowserHost";
|
||||
import { PreviewAutomationHosts } from "./components/preview/PreviewAutomationHosts";
|
||||
import { QuitHoldOverlay } from "./components/QuitHoldOverlay";
|
||||
import { AppAtomRegistryProvider } from "./rpc/atomRegistry";
|
||||
import type { AppRouter } from "./router";
|
||||
import { AppRoot } from "./AppRoot";
|
||||
|
||||
describe("AppRoot", () => {
|
||||
it("shares the application atom registry with routed UI and renderer-wide desktop hosts", () => {
|
||||
const root = AppRoot({ router: {} as AppRouter });
|
||||
|
||||
expect(root.type).toBe(AppAtomRegistryProvider);
|
||||
const children = Children.toArray(
|
||||
(root as ReactElement<{ readonly children: ReactNode }>).props.children,
|
||||
);
|
||||
expect(children).toHaveLength(4);
|
||||
expect(isValidElement(children[0]) && children[0].type).toBe(RouterProvider);
|
||||
expect(isValidElement(children[1]) && children[1].type).toBe(PreviewAutomationHosts);
|
||||
expect(isValidElement(children[2]) && children[2].type).toBe(ElectronBrowserHost);
|
||||
expect(isValidElement(children[3]) && children[3].type).toBe(QuitHoldOverlay);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user