velxio/test/backend
davidmonterocrespo24 2bc492c16f test(e2e): add ESP32 + SPICE photodiode co-simulation test
Follows the same pattern as test_esp32_spice_analog.mjs and
test_esp32_spice_ntc_bridge.mjs: compile an ESP32 sketch on-the-fly via
/api/compile/, boot QEMU through the backend WebSocket, and sweep lux
levels while verifying analogRead() returns what ngspice solved.

The netlist uses the exact photodiode cards emitted by
frontend/.../componentToSpice.ts (D_<id> + I_<id>_ph + DPHOTO model), so
any drift in the frontend SPICE mapper surfaces here.

Validated against the live Docker container — lux=0/1000/2500 produce
raw=4095/2854/992, matching the expected 4095/2854/993 within ±1 LSB
and monotonically decreasing with brightness as expected.

The package-lock.json churn is a pre-existing drift: eecircuit-engine
was in package.json but missing from the lock — npm install re-added it.

Companion workflow change (registering the test in backend-e2e-tests.yml)
lives in a separate commit that requires a PAT with workflow scope to push.
2026-04-24 19:20:02 +02:00
..
e2e test(e2e): add ESP32 + SPICE photodiode co-simulation test 2026-04-24 19:20:02 +02:00
integration Add unit tests for I2C slave devices, MCP tools, and WiFi/BLE status parser 2026-04-10 23:39:51 -03:00
unit test: update BMP280 chip ID assertions and clarify tagName uniqueness in metadata drift test 2026-04-21 17:31:51 -03:00
conftest.py Add unit tests for I2C slave devices, MCP tools, and WiFi/BLE status parser 2026-04-10 23:39:51 -03:00