Skip to content

Commit

Permalink
Add test case for set opacity in new arch examples (#47043)
Browse files Browse the repository at this point in the history
Summary:
Part of this: #46757
Solves:
- ME2E0004

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[ Internal ] [ Added ] - Add setOpacity test in new-arch-example

Pull Request resolved: #47043

Test Plan:
```
yarn e2e-test-ios
yarn e2e-test-android
```

Reviewed By: cortinico

Differential Revision: D64457441

Pulled By: cipolleschi

fbshipit-source-id: 310270293f5c7ec8a94c0d38fdd0897e4591ec14
  • Loading branch information
poonamjain96 authored and facebook-github-bot committed Oct 16, 2024
1 parent 17455e1 commit 848471b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/rn-tester/.maestro/new-arch-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ appId: ${APP_ID} # iOS: com.meta.RNTester.localDevelopment | Android: com.facebo
text: "Fire Legacy Style Event"
repeat: 10
- assertVisible: "Legacy Style Event Fired 10 times"
- assertVisible: "Opacity: 1.0"
- tapOn: "Set Opacity"
- assertVisible: "Opacity: 0.8"
3 changes: 3 additions & 0 deletions packages/rn-tester/NativeComponentExample/js/MyNativeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ export default function MyNativeView(props: {}): React.Node {
Constants From Interop Layer:{' '}
{UIManager.getViewManagerConfig('RNTMyLegacyNativeView').Constants.PI}
</Text>
<Text style={{color: 'green', textAlign: 'center'}}>
Opacity: {opacity.toFixed(1)}
</Text>
<Button
title="Change Background"
onPress={() => {
Expand Down

0 comments on commit 848471b

Please sign in to comment.