Tests and Electron fixtures
Choose checks that exercise the changed behavior. Root commands run from the directory containing the workspace package.json.
Core checks
Section titled “Core checks”pnpm buildpnpm checkpnpm test:architecturepnpm test:docspnpm check runs formatting, lint, TypeScript checks, unit tests, Rust formatting, Clippy, and Rust tests. Run the production build first: Clippy compiles the injector app, which needs the built frontend, runtime and bundled plugins. The acceptance scripts and the documentation examples also use the build output.
Controlled Electron acceptance
Section titled “Controlled Electron acceptance”pnpm test:integrationpnpm test:injector-integrationpnpm test:external-pluginpnpm test:virus-checkpnpm test:badgespnpm test:primitivesOn Linux without a graphical session, prefix each acceptance command with xvfb-run -a as CI does.
| Suite | Evidence |
|---|---|
| integration | Injection, sandbox startup, plugin cleanup and pristine archive restoration |
| injector-integration | Preview/commit agreement, runtime launch, no-op reinjection and stale refusal |
| external-plugin | Starter packaged outside the workspace, ZIP import, both UI modes and restart persistence |
| virus-check | File-context interaction and browser-open behavior using the controlled fixture |
| badges | SheriffBadge on every badge surface, member lookups against a stubbed API, and cleanup |
| primitives | A probe plugin (tests/fixtures/primitives-plugin) using navigation, community data, decorations, menus, the message box, badges.merge, activity, voice and a settings page, and cleanup |
Fixtures generate test installations; automated acceptance must not target a real Fluxer installation, send real messages, or open real third-party reports.
Injector window checks
Section titled “Injector window checks”pnpm test:injector-visualpnpm test:injector-nativeBoth need pnpm build first and a desktop session, so they stay out of CI. Neither touches a Fluxer installation.
- Visual: renders the built injector frontend in Electron against mocked service responses, at 800 and 1240 pixels wide, and checks its layout. Screenshots land in
artifacts/injector-ui. - Native (Windows only): builds the debug injector and runs a copy with an empty catalog and mocked discovery. It checks maximize, restore, header double-click, minimize and close through the real window IPC.
Official Fluxer build
Section titled “Official Fluxer build”pnpm test:real-fluxerThe fixture copies Fluxer’s packaging by hand, so it can’t tell when a Fluxer release changes it. This check downloads the latest official build from pkgs.fluxer.com into a temporary folder, never your own install. It then:
- previews and injects FluxPlugs;
- launches the build and waits for the login screen and for every runtime boot stage in the diagnostics log;
- uninjects and confirms every file matches the download byte for byte.
It needs no account and never logs in. It runs on Windows only for now; tests/real-fluxer/platforms.mjs notes what Linux support needs.
Run it by hand before releases or after a Fluxer update, not in pull-request CI: it needs the network and fails when Fluxer’s servers do.
- Downloads: the build is cached in
tests/.generated/real-fluxerand downloaded again only when Fluxer publishes a new version. Don’t loop the check or run it in parallel jobs; Fluxer allows scripted downloads only at a low rate. - Evidence: the last run’s screenshot (
login.png) and boot details (boot.json) stay intests/.generated/real-fluxer/last-run. SetFLUXPLUGS_REAL_FLUXER_KEEP=1to keep the temporary install as well. - Your own Fluxer: the test copy is portable, with its own profile, so your Fluxer can stay open. If the test copy exits on its own while another Fluxer runs, the check says so; close Fluxer and run it again. Launching Fluxer points
fluxer://links at the test copy, so the check saves your registration first and restores it afterwards. Fluxer’s taskbar jump list may point at the deleted test copy until your own Fluxer next starts.
Documentation
Section titled “Documentation”Install docs dependencies separately, run pnpm –dir docs build, then pnpm –dir docs check:links. The root pnpm test:docs compiles examples and the starter against the public API.
For a version-only change, verify matching package/native/runtime labels, lockfile consistency, builds, and affected tests. Do not change schemaVersion or apiVersion without an actual protocol change.
