mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +00:00
Make our own screenshotting script instead of using huxley
Summary: Create our own screenshotting script which takes screenshots. This improves over huxley for a couple reasons: - It makes the screenshots the correct size (for some reason, huxley struggles with this). - Its configuration matches more with what we want (we don't need multiple screenshots or interaction, we just want a single static shot) - It runs faster I also changed the docs to reflect this change. Test Plan: - Make sure all of the tests that were in the Huxleyfile are now in ss_data.json - Run the screenshotter docker - Make sure all of the images look reasonable and don't change (except sometimes the Lap test, which has some strange pixel-positioning differences...) Reviewers: kevinb Reviewed By: kevinb Differential Revision: https://phabricator.khanacademy.org/D16731
This commit is contained in:
@@ -68,14 +68,13 @@ tests when you submit a pull request, in case you forget.
|
||||
|
||||
If you make any changes to Parser.js, add Jasmine tests to ensure they work.
|
||||
|
||||
#### Huxley tests
|
||||
#### Screenshot tests
|
||||
|
||||
To ensure the final output looks good, we use
|
||||
[Huxley](https://github.com/chenglou/node-huxley) tests, which screenshot
|
||||
different expressions. These tests can be run by using the [Huxley
|
||||
docker](https://github.com/Khan/KaTeX/tree/master/dockers/HuxleyTests).
|
||||
To ensure the final output looks good, we screenshot different expressions.
|
||||
These tests can be run by using the
|
||||
[Screenshotter docker](https://github.com/Khan/KaTeX/tree/master/dockers/Screenshotter).
|
||||
|
||||
The Huxley tests should be run if you add anything more significant than
|
||||
The screenshot tests should be run if you add anything more significant than
|
||||
individual symbols. These tests are not automatically run, so please remember!
|
||||
If the new images are different (meaning they are not byte-by-byte the same as
|
||||
the old ones), inspect them visually. If there are no visible changes, that is
|
||||
@@ -83,8 +82,8 @@ okay. If things change in a way consistent with your additions, explain what
|
||||
changed and why. Otherwise, figure out what is causing the changes and fix it!
|
||||
|
||||
If you add a feature that is dependent on the final output looking the way you
|
||||
created it, add a huxley test. See
|
||||
[Huxleyfile.json](test/huxley/Huxleyfile.json).
|
||||
created it, add a screenshot test. See
|
||||
[ss_data.json](test/screenshotter/ss_data.json).
|
||||
|
||||
#### Testing in other browsers
|
||||
|
||||
|
Reference in New Issue
Block a user