From 848471b69f59094780ace25c6963e480d94ec5c3 Mon Sep 17 00:00:00 2001 From: poonamjain96 Date: Wed, 16 Oct 2024 08:33:37 -0700 Subject: [PATCH] Add test case for set opacity in new arch examples (#47043) Summary: Part of this: https://github.com/facebook/react-native/issues/46757 Solves: - ME2E0004 ## Changelog: [ Internal ] [ Added ] - Add setOpacity test in new-arch-example Pull Request resolved: https://github.com/facebook/react-native/pull/47043 Test Plan: ``` yarn e2e-test-ios yarn e2e-test-android ``` Reviewed By: cortinico Differential Revision: D64457441 Pulled By: cipolleschi fbshipit-source-id: 310270293f5c7ec8a94c0d38fdd0897e4591ec14 --- packages/rn-tester/.maestro/new-arch-examples.yml | 3 +++ packages/rn-tester/NativeComponentExample/js/MyNativeView.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/rn-tester/.maestro/new-arch-examples.yml b/packages/rn-tester/.maestro/new-arch-examples.yml index 478f7a5f7ec956..4126141507acef 100644 --- a/packages/rn-tester/.maestro/new-arch-examples.yml +++ b/packages/rn-tester/.maestro/new-arch-examples.yml @@ -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" diff --git a/packages/rn-tester/NativeComponentExample/js/MyNativeView.js b/packages/rn-tester/NativeComponentExample/js/MyNativeView.js index 00392b725d3ad4..5fe7c46c2dd6ce 100644 --- a/packages/rn-tester/NativeComponentExample/js/MyNativeView.js +++ b/packages/rn-tester/NativeComponentExample/js/MyNativeView.js @@ -166,6 +166,9 @@ export default function MyNativeView(props: {}): React.Node { Constants From Interop Layer:{' '} {UIManager.getViewManagerConfig('RNTMyLegacyNativeView').Constants.PI} + + Opacity: {opacity.toFixed(1)} +