Three follow-ups:
- Accept #shopping as an alias for #einkauf. Either tag now makes
a card show up in the picker; the help blurb in the dialog says
so explicitly.
- Add a proper help-overlay section covering the trigger tags,
how to pick an active list, the phone URL, sync cadence, and
why phone is check-only.
- Add a client-side proxy in public/index.php for /api/shopping
and /api/shopping/check — shopping.js was calling api('api/...')
which went to hyprcrd, but only the relay had handlers. Without
this forwarder, push/pull just 404'd. Proxy mirrors the pattern
used by /api/relay/push.
- New shopping.test.js: asserts the proxy returns a JSON shape
with `ok` (works whether or not a relay is configured), the
hamburger menu toggles as expected, and the picker lists both
#einkauf + #shopping cards while excluding untagged ones.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
63 lines
1.7 KiB
JavaScript
63 lines
1.7 KiB
JavaScript
// ── hyprcrd Test Index ──
|
|
//
|
|
// Loads all test suites via dynamic imports with a shared cache-busting
|
|
// query string. This ensures edits to any test file are picked up without
|
|
// requiring a hard refresh — each module URL becomes unique per page load.
|
|
|
|
const V = '?v=' + Date.now();
|
|
|
|
const FILES = [
|
|
'./shell.test.js',
|
|
'./settings.test.js',
|
|
'./board.test.js',
|
|
'./toolbar.test.js',
|
|
'./buckets.test.js',
|
|
'./bucket-context.test.js',
|
|
'./super-buckets.test.js',
|
|
'./context-menu.test.js',
|
|
'./card-interactions.test.js',
|
|
'./card-join.test.js',
|
|
'./board-find-replace.test.js',
|
|
'./filtering.test.js',
|
|
'./sorting.test.js',
|
|
'./state-functions.test.js',
|
|
'./favorites.test.js',
|
|
'./search.test.js',
|
|
'./search-logic.test.js',
|
|
'./calendar.test.js',
|
|
'./calendar-popup.test.js',
|
|
'./rrule.test.js',
|
|
'./datepicker.test.js',
|
|
'./gallery.test.js',
|
|
'./help.test.js',
|
|
'./multiselect.test.js',
|
|
'./detail.test.js',
|
|
'./detail-interactions.test.js',
|
|
'./editor.test.js',
|
|
'./editor-features.test.js',
|
|
'./editor-save.test.js',
|
|
'./editor-toolbar.test.js',
|
|
'./line-numbers.test.js',
|
|
'./canvas.test.js',
|
|
'./tim.test.js',
|
|
'./snippets.test.js',
|
|
'./image-fullscreen.test.js',
|
|
'./markdown.test.js',
|
|
'./markdown-edge.test.js',
|
|
'./undo.test.js',
|
|
'./api.test.js',
|
|
'./api-edge.test.js',
|
|
'./export.test.js',
|
|
'./relay.test.js',
|
|
'./notifications.test.js',
|
|
'./quick-capture.test.js',
|
|
'./asset-picker.test.js',
|
|
'./terminal.test.js',
|
|
'./theme.test.js',
|
|
'./chat.test.js',
|
|
'./shopping.test.js',
|
|
];
|
|
|
|
// Await all imports so the runner can start in a deterministic state.
|
|
await Promise.all(FILES.map(f => import(f + V)));
|