Localization shouldn't be involved in logic checking for specific tools.
This pattern is just ridiculous looking:
select_tool(get_tool_by_name(localize("Select")));
Fixes https://github.com/1j01/jspaint/issues/114 and makes opening the color dialog work with Eye Gaze Mode dwell clicks and Speech Recognition as well (which can't trigger a "user gesture" as far as the browser's security model is concerned).
These changes don't exceed the thresholds I set, so I had to delete the snapshots to regenerate them.
(I'm doing this, in a rebase, because I noticed changes when other changes made it exceed the threshold.)
Shaves a few seconds off. Kinda disappointing, I was expecting it to be more of an improvement.
Is it worth the complexity? Well, I can always go back to doing visit() before each test, if resetting the state gets more complicated.
(As long as I don't introduce actual dependency on the state from earlier tests.)
- Ditch Casper.js / PhantomCSS
- Set up Cypress and cypress-image-snapshot
- Implement visual tests covering most of the same ground as what I had before (and more), but with some caveats
- Some tests are flaky right now due to resource loading, and some have areas blotched out in order to not depend on resource loading
- TODO: set up continuous integration, add more tests, etc.