Narrow mobile settings layout fix

This commit is contained in:
vorotamoroz
2026-08-26 04:30:44 +00:00
parent 4ff5b4dfe8
commit 8644af6128
7 changed files with 12 additions and 34 deletions
@@ -2,6 +2,7 @@ import { afterEach, describe, expect, it, vi } from "vitest";
const runtime = vi.hoisted(() => ({
panels: [] as Array<{ destroy: ReturnType<typeof vi.fn> }>,
settingClasses: [] as string[],
}));
vi.mock("@vrtmrz/livesync-commonlib/compat/common/types", () => ({
@@ -30,7 +31,8 @@ vi.mock("./LiveSyncSetting.ts", () => ({
return this;
}
setClass() {
setClass(value: string) {
runtime.settingClasses.push(value);
return this;
}
@@ -90,6 +92,7 @@ function createPanelElement(): HTMLElement {
afterEach(() => {
runtime.panels.length = 0;
runtime.settingClasses.length = 0;
vi.clearAllMocks();
});
@@ -109,6 +112,7 @@ describe("paneRemoteConfig", () => {
paneRemoteConfig.call(host as never, {} as HTMLElement, { addPanel } as never);
await vi.waitFor(() => expect(runtime.panels).toHaveLength(1));
expect(runtime.settingClasses).toContain("sls-setting-subsequent-buttons");
lifetimeComponent.unload();