mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 15:15:24 +00:00
feat: rebuild desktop sync as linked server accounts, fix packaged plugin bundles and UI scaling
This commit is contained in:
1 parent
7c02daccf4
commit
6cd9a2846d
242 files changed
+39127
-8558
No files matched your search
@@ -103,8 +103,8 @@ describe("HostAuthOverrideModal", () => {
|
||||
fireEvent.click(screen.getByText("common.save"));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(api.getHostAuthOverride).toHaveBeenCalledWith(42, "ssh");
|
||||
expect(api.setHostAuthOverride).toHaveBeenCalledWith(42, "ssh", 8);
|
||||
expect(api.getHostAuthOverride).toHaveBeenCalledWith(42, "ssh", null);
|
||||
expect(api.setHostAuthOverride).toHaveBeenCalledWith(42, "ssh", 8, null);
|
||||
expect(onOpenChange).toHaveBeenCalledWith(false);
|
||||
});
|
||||
});
|
||||
@@ -128,7 +128,12 @@ describe("HostAuthOverrideModal", () => {
|
||||
fireEvent.click(screen.getByText("common.save"));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(api.setHostAuthOverride).toHaveBeenCalledWith(42, "ssh", null);
|
||||
expect(api.setHostAuthOverride).toHaveBeenCalledWith(
|
||||
42,
|
||||
"ssh",
|
||||
null,
|
||||
null,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -160,7 +165,7 @@ describe("HostAuthOverrideModal", () => {
|
||||
).toBeTruthy();
|
||||
});
|
||||
|
||||
it("loads credentials and overrides from the remote server for remote-only shared hosts", async () => {
|
||||
it("loads credentials and overrides from the server for a synced shared copy", async () => {
|
||||
remote.get.mockResolvedValue({
|
||||
data: [
|
||||
{
|
||||
@@ -177,7 +182,7 @@ describe("HostAuthOverrideModal", () => {
|
||||
<HostAuthOverrideModal
|
||||
open
|
||||
onOpenChange={() => {}}
|
||||
host={{ ...host, id: "-42" }}
|
||||
host={{ ...host, sharedCopy: true, syncId: "host-sync-42" } as Host}
|
||||
protocol="ssh"
|
||||
/>,
|
||||
);
|
||||
@@ -188,7 +193,11 @@ describe("HostAuthOverrideModal", () => {
|
||||
expect((select as HTMLSelectElement).value).toBe("19");
|
||||
expect(remote.get).toHaveBeenCalledWith("/credentials");
|
||||
expect(api.getCredentials).not.toHaveBeenCalled();
|
||||
expect(api.getHostAuthOverride).toHaveBeenCalledWith(-42, "ssh", true);
|
||||
expect(api.getHostAuthOverride).toHaveBeenCalledWith(
|
||||
42,
|
||||
"ssh",
|
||||
"host-sync-42",
|
||||
);
|
||||
});
|
||||
|
||||
it("renders empty and load-error states", async () => {
|
||||
|
||||
@@ -22,8 +22,8 @@ vi.mock("react-i18next", () => ({
|
||||
|
||||
// Panel-level dependencies that are irrelevant to AccordionSection but would
|
||||
// otherwise be pulled in by importing the module.
|
||||
vi.mock("@/settings/RemoteSyncPanel.tsx", () => ({
|
||||
RemoteSyncPanel: () => null,
|
||||
vi.mock("@/plugin-host/shell-bridge", () => ({
|
||||
shell: { openRailView: vi.fn() },
|
||||
}));
|
||||
vi.mock("@/i18n/i18n", () => ({
|
||||
changeAppLanguage: vi.fn(),
|
||||
|
||||
@@ -61,6 +61,7 @@ describe("RAIL_ITEMS", () => {
|
||||
"ssh-tools",
|
||||
"macros",
|
||||
"split-screen",
|
||||
"sync",
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user