feat: dev:all runner for web, electron and docker with plugin hot reload, termix-plugin dev

This commit is contained in:
LukeGus committed 2026-10-06 15:55:00 -05:00
1 parent 49fc241e06
commit ec80a8ef8d
24 files changed
+1848 -44

No files matched your search

+12
View File
@@ -24,6 +24,7 @@ afterEach(() => {
cleanup();
resetRegisteredRailItems();
localStorage.clear();
delete (window as { IS_ELECTRON?: boolean }).IS_ELECTRON;
});
function renderBar(onRailClick = vi.fn()) {
@@ -77,6 +78,17 @@ describe("MobileBar", () => {
expect(screen.getByText("nav.group.objects")).toBeTruthy();
});
it("leaves logout out of More on the desktop", () => {
renderBar();
fireEvent.click(screen.getByLabelText("common.more"));
expect(screen.getByText("common.logout")).toBeTruthy();
cleanup();
(window as { IS_ELECTRON?: boolean }).IS_ELECTRON = true;
renderBar();
fireEvent.click(screen.getByLabelText("common.more"));
expect(screen.queryByText("common.logout")).toBeNull();
});
it("leaves out hidden items", () => {
localStorage.setItem("hiddenRailTabs", JSON.stringify(["hosts"]));
renderBar();
+11 -1
View File
@@ -1,5 +1,5 @@
import { afterEach, describe, expect, it, vi } from "vitest";
import { fireEvent, render, screen } from "@testing-library/react";
import { cleanup, fireEvent, render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { Bell, Boxes } from "lucide-react";
import { AppRail } from "../../sidebar/AppRail";
@@ -25,6 +25,7 @@ vi.mock("@/hooks/use-permissions", () => ({
afterEach(() => {
resetRegisteredRailItems();
localStorage.clear();
delete (window as { IS_ELECTRON?: boolean }).IS_ELECTRON;
});
function renderRail(onRailClick = vi.fn()) {
@@ -44,6 +45,15 @@ function renderRail(onRailClick = vi.fn()) {
}
describe("AppRail", () => {
it("shows logout in the browser but not on the desktop", () => {
renderRail();
expect(screen.getByLabelText("common.logout")).toBeTruthy();
cleanup();
(window as { IS_ELECTRON?: boolean }).IS_ELECTRON = true;
renderRail();
expect(screen.queryByLabelText("common.logout")).toBeNull();
});
it("puts a footer item above the profile with its badge", async () => {
registerRailItem({
id: "inbox",