Skip to content

Add E2E tests for Image visual examples#55964

Closed
NickGerleman wants to merge 13 commits intofacebook:mainfrom
NickGerleman:export-D95371702
Closed

Add E2E tests for Image visual examples#55964
NickGerleman wants to merge 13 commits intofacebook:mainfrom
NickGerleman:export-D95371702

Conversation

@NickGerleman
Copy link
Copy Markdown
Contributor

Summary:
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

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 6, 2026
Copy link
Copy Markdown
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 6, 2026

@NickGerleman has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95371702.

Summary:

Add name fields to 5 Button examples in ButtonExample.js and create 5 corresponding E2E screenshot tests covering default-styling, color-red, two-buttons-flexbox, three-buttons-flexbox, and disabled variants. Skipped accessibility-only examples (no visual difference).

Reviewed By: cortinico

Differential Revision: D95311374
Summary:

Add name fields and testID props to 5 cross-platform BoxShadow examples in BoxShadowExample.js and create 5 corresponding E2E screenshot tests. Tests exclude Android and mac platforms since BoxShadow is only registered in the iOS RNTesterList. Skipped Android-only elevation examples.

Reviewed By: cortinico

Differential Revision: D95311371
Summary:

Add name fields and testID props to 10 static Transform examples in TransformExample.js and create 10 corresponding E2E screenshot tests. Skipped 3 animated examples (Perspective/Rotate/Animation, Animate Translate single prop, Transform origin) since continuous animations produce non-deterministic screenshots.

Reviewed By: cortinico

Differential Revision: D95311369
Summary:

Add name fields to 4 Pressable examples in PressableExample.js and create 4 corresponding E2E interaction tests covering content-press, feedback-events, text-press, and hit-slop. Tests verify click interactions and text state changes rather than screenshots.

Reviewed By: cortinico

Differential Revision: D95311372
Summary:

Add name fields to 4 Touchable examples in TouchableExample.js and create 4 corresponding E2E interaction tests covering highlight, without-feedback, feedback-events, and hit-slop. Tests verify click interactions and text state changes.

Reviewed By: cortinico

Differential Revision: D95311373
Summary:

Add name fields to 2 ActivityIndicator examples and 2 Appearance examples, and create 4 corresponding E2E screenshot tests. ActivityIndicator tests cover default and custom-colors variants. Appearance tests cover forced-light and forced-dark theme contexts.

Note: ActivityIndicator animation may cause non-deterministic screenshots — may need threshold adjustment at runtime.

Reviewed By: cortinico

Differential Revision: D95311370
Summary:

Add name fields to 2 Alert examples in AlertExample.js and create 2 corresponding E2E interaction tests covering default-button and three-buttons variants. Tests verify the alert trigger buttons are visible and clickable. Note: native alert dialogs may not be captured by the screenshot mechanism, so these tests focus on verifying the trigger interaction works.

Reviewed By: cortinico

Differential Revision: D95311165
Summary:

Add screenshot E2E tests for 7 static visual filter examples in RNTester:
opacity, contrast, grayscale, saturate, hueRotate, sepia (Android-only),
and invert (Android-only).

- Added testID props to 7 StaticViewAndImageComparison calls in FilterExample.js
- Created 7 new E2E test files with captured screenshots

Reviewed By: cortinico

Differential Revision: D95351554
…d-blur (facebook#55960)

Summary:

Add E2E tests for the remaining 3 Filter examples in RNTester:
- blur-with-overflow: screenshot test using existing testID
- drop-shadow: screenshot test using existing testID
- animated-blur: interaction test (click button, verify view visible)

Added testID props to Button and Animated.View in AnimatedBlurExample.

Reviewed By: cortinico

Differential Revision: D95353198
Summary:

Add E2E tests for 2 uncovered Text examples in RNTester:
- boxShadow: screenshot test using existing testID 'text-box-shadow'
- textWithLinkRole: interaction test that screenshots before and after pressing
  the link (which changes its color from teal to red)

Source changes:
- Added testID="text-with-link-role" to root View in TextWithLinkRoleExample
- Added testID="text-link-role-link" to the first link Text element
- Added useState to toggle link color on press (teal -> red)

Reviewed By: cortinico

Differential Revision: D95359182
Summary:

Add screenshot E2E tests for 10 Text examples that previously lacked E2E coverage:
fontFamily, fontWeight, fontStyle, fontSize, color, textDecoration, nested,
letterSpacing, textShadow, and ellipsizeMode.

- Added `name` and `testID` to each example in TextExample.ios.js
- Added matching `name` and `testID` to each example in TextExample.android.js
- Created 10 E2E test files, one per example

Reviewed By: cortinico

Differential Revision: D95366459
Summary:

Add screenshot E2E tests for 9 Text examples that previously lacked E2E coverage:
wrap, substringEmoji, transparentBackgroundColor, padding, spaces,
backgroundColorAttr, fontVariants, textTransform, and lineHeightIOS.

- Added `name` and `testID` to each example in TextExample.ios.js
- Added matching `name` and `testID` to Android examples (wrap, padding, spaces,
  backgroundColorAttr, fontVariants) in TextExample.android.js
- 4 tests are iOS-only (substringEmoji, transparentBackgroundColor, textTransform,
  lineHeightIOS) as these examples don't exist on Android
- 5 tests are cross-platform (excludedPlatforms: ['mac'])
- lineBreakStrategy 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: D95370389
Summary:

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
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 6, 2026

@NickGerleman has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95371702.

@meta-codesync meta-codesync bot closed this in 48b6f2d Mar 6, 2026
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 6, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 6, 2026

This pull request has been merged in 48b6f2d.

zoontek pushed a commit to zoontek/react-native that referenced this pull request Mar 9, 2026
Summary:
Pull Request resolved: facebook#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants