You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(e2e): restore report generation and fix location of received images (#3145)
When an test failure occurred, the report was not generated and the
development server did not stop at the end of the test execution.
This was due to our custom function `toMatchImageSnapshot` becoming
asynchronous in commit bffd25b.
The original function is synchronous, so the custom function must be
too.
In addition to this fix, the logic of the code managing image
attachments has been improved, mainly to better separate
responsibilities.
Storing the expected image copy and calculating the image location are
specific to j-i-s, so there's no need to do this. to j-i-s, and are
therefore performed first.
The function for attaching images to the report only uses the previously
calculated image location and is unaware that j-i-s is being used.
For tests that redefined the location of output images (usually in a
subfolder), the path to the received images was not updated accordingly.
It was stored in the same location for each test, so only one file was
kept and not stored with the diff and the expected image.
Also regenerate the image for the
“subprocess.03.collapsed.with.elements” test.
- Previously, the test failed when run with firefox and this was for
good reasons that were hidden with other browsers due to the threshold
value used.
- The sub-process on the top left is a "collapsed adhoc sub-process", so
2 markers must be displayed with a space between them. Currently, the
adhoc marker is not displayed, but the expand marker is correctly
positioned (not centered, but on the left) as if the adhoc marker were
displayed.
- Commit c0c50aa removed additional spacing between markers, so the
expand marker has moved to the right. But the reference snapshot was not
updated accordingly.
- The test probably accepted a minor visual change like this, but at
some point the new version of Firefox added other changes that are above
the threshold, and the error now appears.
- The problem didn't occur on macOS because the threshold was increased
in commit bfa02fc, but this hid the problem.
// Improve jest-image-snapshot outputs to facilitate debug
116
135
// The 'options' parameter is mandatory for us, and some properties must be set as well
117
136
// All options properties used here are always set in bpmn-visualization tests
118
137
// If the following implementation would be done directly in jest-image-snapshot, this won't be required as it set default values we cannot access here
0 commit comments