From 48b6f2dcc93f28801338fc79dff8b527b15d5f92 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 5 Mar 2026 18:12:08 -0800 Subject: [PATCH] Add E2E tests for Image visual examples (#55964) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/55964 Add screenshot E2E tests for 7 Image examples that previously lacked E2E coverage: static-image, tint-color, opacity, nesting-content, nesting-image-background, blur-radius, and base64-image. - Added `name` and `testID` to each example in ImageExample.js - 6 tests are cross-platform (excludedPlatforms: ['mac']) - 1 test is iOS-only (base64-image) - animated-gif test was removed due to persistent infra failure preventing screenshot capture; name and testID were still added to the source Reviewed By: cortinico Differential Revision: D95371702 fbshipit-source-id: c839e26425914f9b18722f313d19c20b50d7fe84 --- .../js/examples/Image/ImageExample.js | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/packages/rn-tester/js/examples/Image/ImageExample.js b/packages/rn-tester/js/examples/Image/ImageExample.js index d403a35dbed..3d54cbd1cca 100644 --- a/packages/rn-tester/js/examples/Image/ImageExample.js +++ b/packages/rn-tester/js/examples/Image/ImageExample.js @@ -959,12 +959,13 @@ exports.examples = [ }, { title: 'Plain Static Image', + name: 'static-image', description: ('Static assets should be placed in the source code tree, and ' + 'required in the same way as JavaScript modules.': string), render: function (): React.Node { return ( - + + @@ -1188,9 +1190,10 @@ exports.examples = [ }, { title: 'Nesting content inside component', + name: 'nesting-content', render: function (): React.Node { return ( - + React @@ -1199,9 +1202,11 @@ exports.examples = [ }, { title: 'Nesting content inside component', + name: 'nesting-image-background', render: function (): React.Node { return ( React @@ -1211,11 +1216,12 @@ exports.examples = [ }, { title: 'Tint Color', + name: 'tint-color', description: ('The `tintColor` prop changes all the non-alpha ' + 'pixels to the tint color.': string), render: function (): React.Node { return ( - + @@ -1526,9 +1534,14 @@ exports.examples = [ }, { title: 'Base64 image', + name: 'base64-image', render: function (): React.Node { return ( - + ); }, platform: 'ios', @@ -1599,9 +1612,10 @@ exports.examples = [ }, { title: 'Blur Radius', + name: 'blur-radius', render: function (): React.Node { return ( - +