mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 11:07:10 +00:00
docs: web platform + clean URLs + dark/light mode (#37)
* chore(docs): replace d2 diagram pipeline with mermaid Remove docs/_diagrams/ and d2 build step from Makefile. The HTML template already initialises mermaid.js; diagrams are now inline code fences rendered client-side. * docs(architecture): add mermaid diagram + web/CDP platform docs Replace SVG img tag with inline mermaid flowchart showing both native (Maestro sidecar + in-app SDK) and web (Chrome CDP) paths. Update Processes, Transports table, and per-step cycle sections. * docs(design-principles): update principles 1-4 for web platform Principles 1, 2, 3, and 4 referenced Maestro and native-only concepts. Add web/CDP context and update driver-is-an-interface to name both sidecar and chrome implementations. * docs(manual): add web prerequisites and folio-web example Update --platform flag to list android, ios, web. Add web prerequisites section (Chrome, no SDK needed) and folio-web quick-start to getting-started. * chore(gitignore): untrack inspect dist/index.html build artifact index.html is regenerated by vite on every build with a new content hash, making it permanently dirty. Only .gitkeep is needed for //go:embed to compile on a fresh checkout. Also remove duplicate dist/* line and stale d2 diagram ignore entries. * feat(docs): click-to-zoom for mermaid diagrams * docs(architecture): change diagram layout from LR to TB * docs(getting-started): link npm and Maven Central package headers * update docs root * docs(spec): rewrite npm package README Update usage example to current API, drop stale version-compatibility and license sections. * build(docs): output pages as pagename/index.html for clean URLs Split DOCS_OUT into INDEX_OUT (index.md files stay as index.html) and PAGE_OUT (all other pages become pagename/index.html). The __ROOT__ depth computation already handles the extra directory level correctly. * chore(docs): update sidebar links to directory-style URLs * docs: update cross-links from .html to directory-style paths * ci(docs): remove d2 install step * feat(docs): dark/light mode toggle Add theme toggle button (top-right, fixed). Persists preference in localStorage; falls back to prefers-color-scheme. Flash-free via inline script in <head> that sets data-theme before first paint. * fix(docs): fix inspect image path broken by directory URL restructure * feat(docs): click-to-fullscreen for all article images * fix(inspect): allow AssetsFS override in ServerOptions; drop unused request param from serveIndex * fix(inspect): use in-memory FS in tests so TestAssets_FallbackToIndexHTML passes without web build
This commit is contained in:
20 files changed
+288
-180
No files matched your search
@@ -8,10 +8,17 @@ Install the CLI, link the SDK into your debug build, run a spec.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- An Android emulator with API level 30 or newer.
|
||||
**Android / iOS:**
|
||||
|
||||
- An Android emulator with API level 30 or newer (or a connected device).
|
||||
- The app under test built as a debug variant with the sanderling Android SDK linked in.
|
||||
- `adb` on your PATH.
|
||||
|
||||
**Web:**
|
||||
|
||||
- Chrome installed. sanderling drives it via CDP; no other setup required.
|
||||
- No in-app SDK needed.
|
||||
|
||||
Run `sanderling doctor` to check the host environment.
|
||||
|
||||
## Install
|
||||
@@ -22,13 +29,13 @@ Run `sanderling doctor` to check the host environment.
|
||||
curl -fsSL https://raw.githubusercontent.com/priyanshujain/sanderling/master/install.sh | bash
|
||||
```
|
||||
|
||||
### Spec package (npm)
|
||||
### Spec package ([npm](https://www.npmjs.com/package/@sanderling/spec))
|
||||
|
||||
```sh
|
||||
npm install --save-dev @sanderling/spec
|
||||
```
|
||||
|
||||
### Android SDK (Maven Central)
|
||||
### Android SDK ([Maven Central](https://central.sonatype.com/artifact/io.github.priyanshujain.sanderling/sdk-android))
|
||||
|
||||
```kotlin
|
||||
dependencies {
|
||||
@@ -38,6 +45,8 @@ dependencies {
|
||||
|
||||
## Your first run
|
||||
|
||||
### Android
|
||||
|
||||
The repo ships a working sample at `examples/folio`, a Kotlin Multiplatform app with a TypeScript spec under `sanderling/spec.ts`. Install `just`, then from `examples/folio`:
|
||||
|
||||
```sh
|
||||
@@ -53,6 +62,18 @@ AVD=Pixel_7 just test
|
||||
|
||||
Persistent settings can live in a `.env` alongside the justfile (`AVD=Pixel_7`, `DURATION=5m`, and so on).
|
||||
|
||||
### Web
|
||||
|
||||
The repo also ships a web sample at `examples/folio-web`, a React/Vite app with the same domain logic. From `examples/folio-web`:
|
||||
|
||||
```sh
|
||||
just test # starts Chrome, runs the spec
|
||||
```
|
||||
|
||||
No emulator or SDK setup needed.
|
||||
|
||||
### Trace output
|
||||
|
||||
When the run ends, the trace lands in `sanderling/runs/<timestamp>/`:
|
||||
|
||||
```
|
||||
@@ -62,6 +83,6 @@ runs/2026-04-18T12-34-56/
|
||||
└── meta.json
|
||||
```
|
||||
|
||||
Browse it with `sanderling inspect` (see [inspect](./inspect.html)), or read `trace.jsonl` step by step.
|
||||
Browse it with `sanderling inspect` (see [inspect](./inspect/)), or read `trace.jsonl` step by step.
|
||||
|
||||
Next: [writing specs](./writing-specs.html).
|
||||
Next: [writing specs](./writing-specs/).
|
||||
Reference in new issue
Block a user