# cli-e2e Shell-first end-to-end tests for logseq CLI. ## Test cli-e2e itself - Run internal cli-e2e harness unit tests: `bb unit-test` ## cleanup first - Execute cleanup: terminate stale db-worker-node processes and remove cli-e2e temp graph directories: `bb cleanup` - Preview cleanup actions only (no kill/delete): `bb cleanup --dry-run` ## Run non-sync suite - List declared non-sync case ids: `bb list-cases` - Run non-sync cases with build preflight unless `--skip-build` is provided: `bb test` - `bb test --help` for options ## Run sync suite - List declared sync case ids: `bb list-sync-cases` - Run sync cases with build preflight unless `--skip-build` is provided: `bb test-sync` - `bb test-sync --help` for options - Configure sync E2EE password: `--e2ee-password ` (default: `11111`) - Run only sync MVP case: `bb test-sync --skip-build --case sync-upload-download-mvp` ### Sync suite prerequisites - CLI auth file must exist at `~/logseq/auth.json` (generated by `logseq login`). - Sync suite starts/stops a local db-sync server inside the test case. - Required build artifact for local db-sync server: - `deps/db-sync/worker/dist/node-adapter.js` - If artifact is missing, build it before running sync suite: - `yarn --cwd deps/db-sync build:node-adapter`