Files
DankMaterialShell/quickshell/tests
Huỳnh Thiện Lộc 8ff7ce2cea feat(island): add system tray slot and overflow menu to compact home (#3780)
* feat(island): add system tray slot and overflow menu to compact home

- Add system tray slot and overflow expander menu in Dynamic Island
- Share tray icon path resolution and DBus context menu fallback in TrayMenuManager
- Support edge-anchored context menu positioning across top, bottom, left, and right
- Lock bottom and edge anchoring in DContextMenu to prevent animation jitter

* fix(island): only instantiate tray menus when tray slot is enabled

* feat(island): expand tray item and caret click area to slot height

* fix(island): use Theme.surfaceTextHover and restore DContextMenu height behavior

* refactor(tray): extract shared TrayMenuContent and TrayOverflowGrid, support tray order and IPC in island

* Revert "refactor(tray): extract shared TrayMenuContent and TrayOverflowGrid, support tray order and IPC in island"

This reverts commit 29888f89cd.

* refactor(tray): use shared TrayMenuManager helpers and TrayItemIcon, support tray order and IPC in island

* refactor(tray): extract shared TrayMenuContent and TrayOverflowGrid

* feat(island): support tray item drag and drop reordering

* fix(island): prevent re-entrant tray drag reordering on model destruction

* fix(tray): remove native submenu anchor hydration to prevent popup stutter

* fix(tray): decouple submenu hydrator from anchor window to avoid stutter

* fix(tray): restore anchor window on submenu hydrator and disable on island

* tray: fix bar overflow surface & reuse max visible items on the island
2026-10-14 16:55:26 -04:00
..

Shell tests

make test-qml runs three suites: logic (the *.test.mjs files here under node --test), qt (qmltestrunner over unit/) and lock (qmltestrunner over lock/ with the mocks in lock/mocks). It needs Python 3, Node.js, Lua, make and the Qt 6 qmltestrunner. The Nix development shell includes them.

The qml-tests pre-commit hook runs the same suites when shell code, tests or their configuration changes. CI runs that hook in the QML tests job.

prek run qml-tests --all-files
python3 quickshell/tests/run-qml.py logic
python3 quickshell/tests/run-qml.py qt
python3 quickshell/tests/run-qml.py lock

Set QMLTESTRUNNER to override the Qt 6 executable.

Writing a test

  • A test exercises a .js module, a function of a Services/ or Common/ singleton, or an IPC handler. Nothing under Modules/, Modals/ or Widgets/ is read, sliced or mocked. Those files change with every UI tweak, and tests over them only ever failed on the tweak.
  • No compositor, display server, running shell, timers or waits. Each suite finishes in well under a second.
  • A test must fail on the broken code. No defaults, no tables asserted against a copy of themselves, no "it instantiates".
  • When a test slices QML source, the mock has to honour the arguments the function passes. A mock that ignores them passes on the old code and fails on an equivalent rewrite.