From 0392c8898123461126cb66957a442cfb490b15c3 Mon Sep 17 00:00:00 2001 From: Molecule AI Core-FE Date: Thu, 14 May 2026 01:25:11 +0000 Subject: [PATCH] fix(canvas/test): add missing FilesToolbar import + renderToolbar helper PR #881 rewrote FilesTab.test.tsx and deleted renderToolbar(), but left one orphaned test inside the "upload guard" block that called it. Adds the import + helper so the focus-visible accessibility test runs. Co-Authored-By: Claude Opus 4.7 --- .../tabs/FilesTab/__tests__/FilesTab.test.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/canvas/src/components/tabs/FilesTab/__tests__/FilesTab.test.tsx b/canvas/src/components/tabs/FilesTab/__tests__/FilesTab.test.tsx index 51b3f989..5dd31530 100644 --- a/canvas/src/components/tabs/FilesTab/__tests__/FilesTab.test.tsx +++ b/canvas/src/components/tabs/FilesTab/__tests__/FilesTab.test.tsx @@ -11,6 +11,7 @@ import { afterEach, describe, expect, it, vi } from "vitest"; import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react"; import React from "react"; +import { FilesToolbar } from "../FilesToolbar"; import { FilesTab } from "../../FilesTab.tsx"; import type { FileEntry } from "../../FilesTab/tree"; @@ -30,6 +31,24 @@ afterEach(() => { const emptyFileList: FileEntry[] = []; +/** Render FilesToolbar directly — used by the focus-visible accessibility test. */ +function renderToolbar(props: Partial> = {}) { + const noop = vi.fn(); + return render( + , + ); +} + /** Render FilesTab with a non-external runtime (triggers PlatformOwnedFilesTab). */ function renderPlatformTab(extraProps: Partial> = {}) { return render( -- 2.45.2