Open
Description
We should add some form of e2e with real browser automation that covers the postMessage API.
I think we should try to load just simulator.html (not demo.html) and run JavaScript in the page to interact with it directly. Or perhaps a very simple page that uses an iframe if that's more practical. That way we can read serial output which might be the most practical way to make assertions. We could also write code that can read the LED grid from the DOM but I think that's only worth it for a few display specific tests.
The aim isn't to really test MicroPython itself but it would be great to:
- Cover the postMessage API, catching issues like New program runs over the last one after reset #90
- Lower priority, cover the wiring of each sensor and similar
I'm mostly familiar with Puppeteer in this space but it might be worth looking at Playwright as it holds out the possibility of cross-browser tests.
Metadata
Metadata
Assignees
Labels
No labels