mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-09-18 23:52:26 +02:00
refactor: cleanup
This commit is contained in:
+16
-8
@@ -13,12 +13,14 @@ Install Donut dependencies with `pnpm install`. The runner installs the driver i
|
||||
`cargo install`, so a working Rust toolchain is the only extra requirement. The browser suite also
|
||||
needs
|
||||
`WAYFERN_TEST_TOKEN`. The runner reads it from the environment or Donut's ignored `.env` without
|
||||
printing it. When a local browser fixture is configured, the runner copies it into the test data
|
||||
root (using an isolated APFS clone on macOS); otherwise the browser suite downloads the current
|
||||
published build into that root.
|
||||
printing it. The browser suites always run the newest published Wayfern build. The download is
|
||||
saved as an ignored cache fixture under `.cache/e2e-wayfern-fixture`, which the runner copies into
|
||||
the test data root (using an isolated APFS clone on macOS) on later runs; a cached fixture holding
|
||||
any other version is replaced before the suite uses it, so the cache can never keep an old browser
|
||||
under test.
|
||||
|
||||
Set `DONUT_E2E_WAYFERN_PATH` to use a local browser fixture. Without it, the runner uses an ignored
|
||||
cache fixture when present and otherwise downloads the published test build.
|
||||
Set `DONUT_E2E_WAYFERN_PATH` to pin an explicit local bundle instead, for example a browser built
|
||||
from source. A pinned bundle is used as given, without the published-version check.
|
||||
|
||||
The real-network suite additionally requires Docker plus
|
||||
`RESIDENTIAL_PROXY_URL_ONE_HTTP` and `RESIDENTIAL_PROXY_URL_ONE_SOCKS`. It creates its own
|
||||
@@ -39,10 +41,15 @@ pnpm e2e:browser
|
||||
|
||||
Run everything with `pnpm e2e`. A normal run builds the Next frontend, `donut-proxy`, and the
|
||||
harness in `e2e/app`, then installs the `tauri-wd` CLI into the ignored `e2e/.driver` root when the
|
||||
version pinned by `e2e/app/Cargo.lock` is not already there. The harness enables Donut's `e2e`
|
||||
version pinned by `e2e/app/Cargo.toml` is not already there. The harness enables Donut's `e2e`
|
||||
feature and injects the WebDriver plugin so the production crate never depends on it. Both the
|
||||
plugin and the CLI come from the same pinned crates.io release, so they cannot drift apart. Bump
|
||||
the pin in `e2e/app/Cargo.toml` to move to a newer driver. Add `--no-build` to
|
||||
the pin in `e2e/app/Cargo.toml` to move to a newer driver. Every suite runs the Donut window
|
||||
headless (on macOS the window is transparent, click-through and never focused; elsewhere it is
|
||||
hidden), so a run never pops a window or steals focus. Set `DONUT_E2E_HEADED=1` to watch the
|
||||
window while debugging a failure; Wayfern browsers launched by a test are separate processes and
|
||||
show their own windows unless the test asks for a headless launch.
|
||||
Add `--no-build` to
|
||||
`node e2e/run.mjs --suite=<name>` only when all four outputs are current.
|
||||
`DONUT_E2E_KEEP_ARTIFACTS=1` retains successful local runs; failed runs are always retained and
|
||||
their location is printed. Raw screenshots, captured HTML, logs, and isolated app state stay local.
|
||||
@@ -74,7 +81,8 @@ runner redirects:
|
||||
- each sync test to a new MinIO bucket and random token.
|
||||
|
||||
The E2E feature suppresses automatic updater/download traffic, but explicit browser tests still
|
||||
exercise published Wayfern downloads when no local fixture exists. Entitlement fallback from
|
||||
exercise published Wayfern downloads whenever the cache fixture is missing or holds a different
|
||||
version than the published build. Entitlement fallback from
|
||||
`WAYFERN_TEST_TOKEN` exists only in the feature-gated test binary. Production builds never include
|
||||
the WebDriver plugin or this fallback.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user