mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 03:38:39 +00:00
@@ -29,7 +29,7 @@ screenshotter: &screenshotter
|
||||
|
||||
- run:
|
||||
name: Verify screenshots and generate diffs and new screenshots
|
||||
command: node dockers/Screenshotter/screenshotter.js --selenium-ip localhost -b $CIRCLE_JOB --verify --diff --new
|
||||
command: node dockers/screenshotter/screenshotter.js --selenium-ip localhost -b $CIRCLE_JOB --verify --diff --new
|
||||
|
||||
- store_artifacts:
|
||||
path: test/screenshotter/new
|
||||
|
@@ -97,7 +97,7 @@ You can view the report in `coverage/lcov-report/index.html`.
|
||||
|
||||
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).
|
||||
[screenshotter docker](https://github.com/Khan/KaTeX/tree/master/dockers/screenshotter).
|
||||
|
||||
The screenshot tests should be run if you add anything more significant than
|
||||
individual symbols. These tests are not automatically run, so please remember!
|
||||
|
@@ -21,7 +21,7 @@ are encouraged to reproduce the steps from `screenshotter.sh`
|
||||
manually. Example run for Firefox:
|
||||
|
||||
container=$(docker run -d -P selenium/standalone-firefox:2.46.0)
|
||||
node dockers/Screenshotter/screenshotter.js -b firefox -c ${container}
|
||||
node dockers/screenshotter/screenshotter.js -b firefox -c ${container}
|
||||
# possibly repeat the above command as often as you need, then eventually
|
||||
docker stop ${container}
|
||||
docker rm ${container}
|
||||
@@ -33,7 +33,7 @@ For Chrome, simply replace both occurrences of `firefox` with `chrome`.
|
||||
It is possible to run `screenshotter.js` without the use of Docker:
|
||||
|
||||
yarn add selenium-webdriver
|
||||
node dockers/Screenshotter/screenshotter.js
|
||||
node dockers/screenshotter/screenshotter.js
|
||||
|
||||
This will generate screenshots using the Firefox installed on your system.
|
||||
Browsers other than Firefox can be targeted using the `--browser` option.
|
||||
@@ -62,8 +62,8 @@ to specify a list of cases which are not being processed.
|
||||
|
||||
Examples:
|
||||
|
||||
node dockers/Screenshotter/screenshotter.js -i Sqrt,SqrtRoot
|
||||
dockers/Screenshotter/screenshotter.sh --exclude=GreekLetters
|
||||
node dockers/screenshotter/screenshotter.js -i Sqrt,SqrtRoot
|
||||
dockers/screenshotter/screenshotter.sh --exclude=GreekLetters
|
||||
|
||||
# How to run screenshotter tests
|
||||
|
@@ -72,7 +72,7 @@
|
||||
"test:jest:update": "jest --updateSnapshot",
|
||||
"test:jest:coverage": "jest --coverage",
|
||||
"test:screenshots": "yarn test:screenshots:update --verify",
|
||||
"test:screenshots:update": "yarn prestart && dockers/Screenshotter/screenshotter.sh",
|
||||
"test:screenshots:update": "yarn prestart && dockers/screenshotter/screenshotter.sh",
|
||||
"test:perf": "yarn prestart && NODE_ENV=test node test/perf-test.js",
|
||||
"clean": "rm -rf dist/ node_modules/",
|
||||
"clean-install": "yarn clean && yarn",
|
||||
|
Reference in New Issue
Block a user