Commit Graph

36 Commits (main)

Author SHA1 Message Date
Isaiah Odhner ee60aedf1c Format tidbits 2024-01-29 01:49:39 -05:00
Isaiah Odhner a0e119ba8e Adapt some existing IIFEs to match 2022-01-19 00:17:32 -05:00
Isaiah Odhner 955df74aec Format code in some comments 2022-01-18 20:16:20 -05:00
Isaiah Odhner 8053b38e58 Auto-format code with VS Code
Format JS and HTML using VS Code extension: https://marketplace.visualstudio.com/items?itemName=jbockle.jbockle-format-files

Dedented some files for now to make the diff intelligible:
- tools.js
- menus.js
- speech-recognition.js
- simulate-random-gestures.js
2022-01-18 19:40:58 -05:00
Isaiah Odhner 60e6dfc69f Rename selected colors global 2021-02-12 10:13:53 -05:00
Isaiah Odhner c21962bf3d Accept visual changes 2021-02-07 22:25:08 -05:00
Isaiah Odhner 4dfb04d6f4 Separate tool name and ID concepts
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")));
2020-12-11 12:20:40 -05:00
Isaiah Odhner dbcd4cba1f WIP localization 2020-12-07 00:35:13 -05:00
Isaiah Odhner db587befdc Add visual tests for Edit Colors dialog 2020-12-03 23:34:54 -05:00
Isaiah Odhner 043a12bf09 Accept visual changes 2020-06-03 06:54:28 -04:00
Isaiah Odhner d62d244777 WIP: implement Edit Colors dialog
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).
2020-06-03 00:32:34 -04:00
Isaiah Odhner 4ef30d7eb0 Accept visual changes not caught by tests
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.)
2020-06-03 00:32:34 -04:00
Isaiah Odhner 0d2cc70fec Accept visual change from using theme color in tool options 2020-05-30 00:51:08 -04:00
Isaiah Odhner 96698d0940 Speed up tool tests
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.)
2020-05-29 00:44:35 -04:00
Isaiah Odhner 44dd6a7edc Test eraser tool 2020-05-29 00:39:10 -04:00
Isaiah Odhner cb1e7169e0 Fix visual test for Pencil tool 2020-05-28 17:47:06 -04:00
Isaiah Odhner 34efb07dc8 Selectively loosen visual test thresholds so they'll pass 2020-05-28 14:56:07 -04:00
Isaiah Odhner 5d29ab4069 Set fixed width on rotate degrees input
This was an inconsistency for cross-platform visual regression tests.
2020-05-28 14:56:07 -04:00
Isaiah Odhner 5dba5b3273 Add a UserScript for viewing image diffs in Cypress Dashboard 2020-05-28 14:56:07 -04:00
Isaiah Odhner 64b43a8c29 Add tests for winter theme and vertical color box 2020-05-28 14:56:07 -04:00
Isaiah Odhner 3d04e068ca Accept visual changes 2020-05-28 14:56:07 -04:00
Isaiah Odhner e142e4c695 Add visual tests for eye gaze mode and modern theme 2020-05-28 14:56:07 -04:00
Isaiah Odhner b32bf803f3 Begrudgingly add example data
It's added when running `npm run cy:open`, so might as well commit it.
2020-05-28 14:56:07 -04:00
Isaiah Odhner b57962af99 Update cypress to 4.5.0 2020-05-28 14:55:36 -04:00
Isaiah Odhner 0bc52ee7bc Accept larger changes 2020-05-27 23:24:19 -04:00
Isaiah Odhner 7c48c88103 Accept slight color changes 2020-05-27 23:24:17 -04:00
Isaiah Odhner b05c6a2497 Fix tests in CI 2020-04-28 16:22:51 -04:00
Isaiah Odhner 2e7b4665c3 Accept visual changes 2020-04-28 15:53:35 -04:00
Isaiah Odhner 2d2ecfad2a Configure visual tests to be useful 2020-04-28 15:53:23 -04:00
Isaiah Odhner 87045f61a5 Add visual tests for some tools 2020-04-28 15:53:23 -04:00
Isaiah Odhner 31edf30064 Unify TODO comments 2020-04-27 20:45:47 -04:00
Isaiah Odhner f83eb71bdf Accept visual test changes 2019-12-21 00:38:47 -05:00
Isaiah Odhner edfefd2b3d Use smaller viewport for capturing screenshots 2019-11-10 10:36:21 -05:00
Isaiah Odhner fb5496d2a4 Add tolerance 2019-11-04 22:39:13 -05:00
Isaiah Odhner d3e38c2556 Prevent test failure cascade (and DRY) 2019-11-04 22:36:09 -05:00
Isaiah Odhner 1685a060af Use cypress for visual testing
- 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.
2019-11-04 20:51:39 -05:00