From 4015bbad7601cc2bf889c10959ffb5ad2b24f470 Mon Sep 17 00:00:00 2001
From: Linus Rath <139418639+rathlinus@users.noreply.github.com>
Date: Tue, 3 Nov 2026 19:49:56 +0100
Subject: [PATCH] test: expect the hidden settings row without a plugin, since
the desktop app shows it for the window controls
---
.../settings/__tests__/settings-side-panel.test.tsx | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/components/settings/__tests__/settings-side-panel.test.tsx b/components/settings/__tests__/settings-side-panel.test.tsx
index a01c2ccc6..2e47f7b9f 100644
--- a/components/settings/__tests__/settings-side-panel.test.tsx
+++ b/components/settings/__tests__/settings-side-panel.test.tsx
@@ -77,7 +77,14 @@ const { setActionDispatcher } = await import('@/lib/plugin-sandbox/actions');
describe('Settings side panel', () => {
it('adds no row without a plugin', () => {
render();
- expect(document.querySelector('[data-settings-panel-row]')).toBeNull();
+ // The element stays for the desktop app, which shows it to hold the window
+ // controls. Everywhere else `hidden` and data-window-only keep it out of
+ // the page, and there is no panel button in it.
+ const row = document.querySelector('[data-settings-panel-row]')!;
+ expect(row.hasAttribute('data-window-only')).toBe(true);
+ expect(row.classList.contains('hidden')).toBe(true);
+ expect(row.classList.contains('flex')).toBe(false);
+ expect(row.querySelector('[data-plugin-panel-toggle]')).toBeNull();
});
it('puts the page name and the button in an h-14 row over the page and the panel', () => {
@@ -85,6 +92,8 @@ describe('Settings side panel', () => {
render();
const row = document.querySelector('[data-settings-panel-row]')!;
expect(row.className).toContain('h-14');
+ expect(row.hasAttribute('data-window-only')).toBe(false);
+ expect(row.classList.contains('flex')).toBe(true);
const toggle = row.querySelector('[data-plugin-panel-toggle]')!;
expect(row.lastElementChild).toBe(toggle);
const frame = screen.getByTestId('plugin-frame-app-side-panel');