mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 14:45:24 +00:00
fix: toolbar files button opens at the shell directory again
This commit is contained in:
1 parent
20f19ff13b
commit
9ce63d65d3
3 files changed
+38
-8
No files matched your search
@@ -149,6 +149,28 @@ afterEach(() => {
|
||||
vi.unstubAllGlobals();
|
||||
});
|
||||
|
||||
describe("toolbar host links", () => {
|
||||
it("opens the file manager at the shell directory instead of a plain tab", () => {
|
||||
const run = vi.fn();
|
||||
slots.hostActions = [
|
||||
{
|
||||
id: "files",
|
||||
kind: "open",
|
||||
tabType: "files",
|
||||
titleKey: "Files",
|
||||
icon: () => null,
|
||||
when: () => true,
|
||||
run,
|
||||
},
|
||||
];
|
||||
const onOpenFiles = vi.fn();
|
||||
renderToolbar({ onOpenFiles });
|
||||
fireEvent.click(screen.getAllByRole("button", { name: "Files" })[0]);
|
||||
expect(onOpenFiles).toHaveBeenCalledOnce();
|
||||
expect(run).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe("responsive toolbar density", () => {
|
||||
it("enters below 110 percent and restores at 115 percent", () => {
|
||||
expect(getResponsiveToolbarDensity("labeled", "labeled", 1099, 1000)).toBe(
|
||||
|
||||
Reference in new issue
Block a user