-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Major refactor of the image test scripts #656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- init test/image/assets/ - move get_image_request_option to assets/ - move image test folders init to pretest.js - factor out get image path logic in script into asset file - add + centralize glob pattern matching - add --queue option for compare pixel script - run baseline generation in queue (instead of in batch)
var BATCH_SIZE = 5; | ||
|
||
// wait time between each test in test queue | ||
var QUEUE_WAIT = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking about making changing these to:
var QUEUE_WAIT = process.env.PLOTLYJS_IMAGE_TEST_QUEUE_WAIT || 10;
to better handle machine-to-machine differences
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either env variables or a .gitignore
'd config file works for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok great. I'll do this in a future PR.
cc @mdtusz the diff is a little hard to read, I suggest opening the files separately: |
* machine-to-machine; skip over them for now. | ||
* | ||
*/ | ||
function untestableFilter(mockName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be useful/convenient to have these as a config variable array and just check indexOf
over all of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be useful for sure. But ideally, this filter wouldn't be there in the first place. So I'd vote for the solution of least-surface-area i.e. this one ⏫ .
💃 merge away! |
What this PR adds
mapbox
plot type. More info in Introducing plotly.js + Mapbox GL #626. It may also be convenient for devs working on weak hardware.npm run test-image
,npm run basesline
andnpm run test-export
allowing devs to more easily target test mocks.What this PR cleans up
build/test_images/
andbuild_test_images_diff
are now spawn duringnpm run pretest
test-image
,baseline
andtest-export
are now placed intest/image/assets/
.Examples
TODO