-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Replace reference screenshots #17597
Replace reference screenshots #17597
Conversation
4a06736
to
008bd9e
Compare
replace screenshot fix debug line fix test-code/replace screenshots
💚 Build Succeeded |
008bd9e
to
44f9e7c
Compare
|
||
tagCloud = new TagCloud(domNode); | ||
tagCloud.setData(baseTest.data); | ||
tagCloud.setOptions(baseTest.options); | ||
|
||
await fromNode(cb => tagCloud.once('renderComplete', cb)); | ||
|
||
const mismatchedPixels = await imageComparator.compareDOMContents(domNode.innerHTML, 512, 512, simpleloadPng, 0.50); | ||
const mismatchedPixels = await imageComparator.compareDOMContents(domNode.innerHTML, 512, 512, simpleloadPng, 0.35); |
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.
tighten down more.
@@ -8,7 +8,7 @@ import basicdrawPng from './basicdraw.png'; | |||
import afterresizePng from './afterresize.png'; | |||
import afterparamChange from './afterparamchange.png'; | |||
|
|||
const THRESHOLD = 0.65; | |||
const THRESHOLD = 0.35; |
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.
tighten down
await tagcloudVisualization.render(dummyTableGroup, { | ||
resize: false, | ||
params: true, | ||
aggs: true, | ||
data: true, | ||
uiState: false | ||
}); | ||
const mismatchedPixels = await imageComparator.compareDOMContents(domNode.innerHTML, 512, 512, basicdrawPng, THRESHOLD); | ||
|
||
const svgNode = domNode.querySelector('svg'); |
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.
this was a bug in the test-code. This PR (#15779) changed the internal DOM, and this unit test did not get updated accordingly. It didn't fail because comparison was too permissive, clouds have a lot of whitespace.
sourceImage.onload = async () => { | ||
sourceContext2d.drawImage(sourceImage, 0, 0); | ||
const mismatch = await this.compareImage(sourceCanvas, expectedImageSourcePng, threshold); | ||
document.body.removeChild(sourceCanvas); | ||
resolve(mismatch); | ||
}; | ||
sourceImage.onerror = (e) => { | ||
reject(e.message); | ||
}; |
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.
make sure tests actually throw when image cannot be loaded.
💚 Build Succeeded |
cc @timroes |
jenkins, test this |
💚 Build Succeeded |
pulls in TimR's changes (elastic#17594) to the hashing algorithm. This also replaces the reference screenshots to match the new rotations.
💚 Build Succeeded |
Applies to Tagcloud. #17597 made them too strict, causing them to fail in CI.
pulls in TimR's changes (elastic#17594) to the hashing algorithm. This also replaces the reference screenshots to match the new rotations.
…ic#17626) Applies to Tagcloud. elastic#17597 made them too strict, causing them to fail in CI.
* Change hashing algo of tagcloud rotations (#17597) pulls in TimR's changes (#17594) to the hashing algorithm. This also replaces the reference screenshots to match the new rotations. * Revert screenshot comparison tests to old threshold parameters (#17626) Applies to Tagcloud. #17597 made them too strict, causing them to fail in CI.
pulls in same changes as #17594