Skip to content
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

Puppeteer E2E test: Regenerate high-differenсe screenshots and decrease threshold #25403

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file modified examples/screenshots/css3d_periodictable.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/misc_boxselection.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/misc_controls_pointerlock.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/misc_uv_tests.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl2_multisampled_renderbuffers.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl2_ubo.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_animation_skinning_blending.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_buffergeometry_compression.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_buffergeometry_drawrange.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_camera.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_camera_logarithmicdepthbuffer.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_clipping_advanced.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_custom_attributes_lines.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_custom_attributes_points2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_custom_attributes_points3.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_framebuffer_texture.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_geometry_extrude_splines.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_gpgpu_birds_gltf.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_gpgpu_protoplanet.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_helpers.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_interactive_raycasting_points.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_lightningstrike.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_lights_pointlights.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_lights_spotlights.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_loader_collada_kinematics.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_loader_gcode.jpg
Binary file modified examples/screenshots/webgl_loader_gltf_transmission.jpg
Binary file modified examples/screenshots/webgl_loader_ldraw.jpg
Binary file modified examples/screenshots/webgl_loader_md2.jpg
Binary file modified examples/screenshots/webgl_loader_mmd_audio.jpg
Binary file modified examples/screenshots/webgl_loader_mmd_pose.jpg
Binary file modified examples/screenshots/webgl_loader_pcd.jpg
Binary file modified examples/screenshots/webgl_loader_pdb.jpg
Binary file modified examples/screenshots/webgl_loader_svg.jpg
Binary file modified examples/screenshots/webgl_loader_tilt.jpg
Binary file modified examples/screenshots/webgl_lod.jpg
Binary file modified examples/screenshots/webgl_marchingcubes.jpg
Binary file modified examples/screenshots/webgl_materials_blending.jpg
Binary file modified examples/screenshots/webgl_materials_blending_custom.jpg
Binary file modified examples/screenshots/webgl_materials_variations_lambert.jpg
Binary file modified examples/screenshots/webgl_materials_variations_phong.jpg
Binary file modified examples/screenshots/webgl_materials_variations_physical.jpg
Binary file modified examples/screenshots/webgl_materials_variations_standard.jpg
Binary file modified examples/screenshots/webgl_materials_variations_toon.jpg
Binary file modified examples/screenshots/webgl_materials_wireframe.jpg
Binary file modified examples/screenshots/webgl_multiple_canvases_circle.jpg
Binary file modified examples/screenshots/webgl_multiple_elements_text.jpg
Binary file modified examples/screenshots/webgl_nodes_loader_materialx.jpg
Binary file modified examples/screenshots/webgl_nodes_materials_instance_uniform.jpg
Binary file modified examples/screenshots/webgl_nodes_playground.jpg
Binary file modified examples/screenshots/webgl_points_dynamic.jpg
Binary file modified examples/screenshots/webgl_postprocessing_advanced.jpg
Binary file modified examples/screenshots/webgl_postprocessing_fxaa.jpg
Binary file modified examples/screenshots/webgl_postprocessing_pixel.jpg
Binary file modified examples/screenshots/webgl_postprocessing_ssr.jpg
Binary file modified examples/screenshots/webgl_raycaster_bvh.jpg
Binary file modified examples/screenshots/webgl_shaders_tonemapping.jpg
Binary file modified examples/screenshots/webgl_shadowmap_performance.jpg
Binary file modified examples/screenshots/webgpu_nodes_playground.jpg
Binary file modified examples/screenshots/webxr_vr_layers.jpg
Binary file modified examples/screenshots/webxr_vr_sandbox.jpg
Binary file modified examples/screenshots/webxr_vr_video.jpg
29 changes: 22 additions & 7 deletions test/e2e/puppeteer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,38 @@ const exceptionList = [
'css3d_youtube',
'webgl_video_kinect',
'webgl_video_panorama_equirectangular',
'webxr_vr_video',

'webaudio_visualizer', // audio can't be analyzed without proper audio hook

'webgl_effects_ascii', // blink renders text differently in every platform

'webxr_ar_lighting', // webxr

'webgl_worker_offscreencanvas', // in a worker, not robust

// Windows-Linux text rendering differences
// TODO: Fix these by setting a font in Puppeteer -- this can also fix a bunch of 0.1%-0.2% examples
'css3d_periodictable',
'misc_controls_pointerlock',
'misc_uv_tests',
'webgl_camera_logarithmicdepthbuffer',
'webgl_effects_ascii',
'webgl_loader_pdb',
'webgl_multiple_canvases_circle',
'webgl_multiple_elements_text',
'webgl_nodes_playground',
'webgl_shaders_tonemapping',
'webgpu_nodes_playground',

// Unknown
// TODO: most of these can be fixed just by increasing idleTime and parseTime
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with these.

'webgl_clipping_advanced',
'webgl_lensflares',
'webgl_lines_sphere',
'webgl_lights_spotlights',
'webgl_loader_imagebitmap',
'webgl_loader_texture_lottie',
'webgl_loader_texture_pvrtc',
'webgl_materials_blending',
'webgl_morphtargets_face',
'webgl_nodes_materials_standard',
'webgl_postprocessing_crossfade',
Expand All @@ -59,7 +76,7 @@ const chromiumChannel = 'stable'; // stable -> beta -> dev -> canary (Mac and Wi

const port = 1234;
const pixelThreshold = 0.1; // threshold error in one pixel
const maxDifferentPixels = 0.05; // at most 5% different pixels
const maxDifferentPixels = 0.3; // at most 0.3% different pixels

const networkTimeout = 90; // 90 seconds, set to 0 to disable
const renderTimeout = 4.5; // 4.5 seconds, set to 0 to disable
Expand Down Expand Up @@ -464,13 +481,11 @@ async function makeAttempt( page, failedScreenshots, cleanPage, isMakeScreenshot

}

numDifferentPixels /= actual.width * actual.height;

/* Print results */

const differentPixels = 100 * numDifferentPixels;
const differentPixels = numDifferentPixels / ( actual.width * actual.height ) * 100;

if ( numDifferentPixels < maxDifferentPixels ) {
if ( differentPixels < maxDifferentPixels ) {

console.green( `Diff ${ differentPixels.toFixed( 1 ) }% in file: ${ file }` );

Expand Down