Add Functional Tests for TouchableWithoutFeedback Component
This PR adds functional tests for the TouchableWithoutFeedback component to the E2E test app (Fabric) to validate key functionality scenarios.
Changes Made
Added Test Components to TouchableExample.js:
-
TouchableWithoutFeedbackHitSlop - Tests hit slop functionality
- Demonstrates that touch area extends beyond visual bounds using the
hitSlopproperty - Includes press counter and visual feedback via console log for test validation
- Demonstrates that touch area extends beyond visual bounds using the
-
TouchableWithoutFeedbackStyleUpdate - Tests dynamic style changes for fast refresh support
- Cycles through different background colors on press to demonstrate style updates
- Shows that
TouchableWithoutFeedbackcan update styles dynamically
Added Test Cases to TouchableComponentTest.test.ts:
-
TouchableWithoutFeedback should register press in clicked within hitSlop range - Validates that the hit slop area properly extends the touch area beyond the component's visual bounds
-
TouchableWithoutFeedback should update style upon fast refresh - Validates that dynamic style updates work correctly and support fast refresh functionality
Implementation Notes
The following tests from the original issue were determined to be inappropriate for TouchableWithoutFeedback:
-
underlayColorupdates - This property belongs toTouchableHighlight -
activeOpacityupdates - This property belongs toTouchableOpacity
TouchableWithoutFeedback is specifically designed to provide no visual feedback, so testing visual feedback properties would be contrary to its intended purpose.
Test Coverage
This implementation completes the remaining functional tests for TouchableWithoutFeedback. The following tests were already implemented:
- Press event handling (onPress, onPressIn, onPressOut, onLongPress)
- Disabled state behavior
Fixes #12467.
[!WARNING]
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
googlechromelabs.github.io
- Triggering command:
/usr/local/bin/node install.mjs(dns block)https://storage.googleapis.com/chrome-for-testing-public/130.0.6723.116/linux64/chrome-linux64.zip
- Triggering command:
/usr/local/bin/node install.mjs(http block)If you need me to access, download, or install something from one of these locations, you can either:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to my firewall allow list
@copilot run yarn change and then commit.
After commit comment here "/azp run" to start the pipelines
@copilot run
yarn changeand then commit. After commit comment here "/azp run" to start the pipelines
I ran yarn change which executed successfully. Beachball determined that no change files are needed since the modifications are test-only changes to private packages that don't require version tracking. There are no new changes to commit beyond the existing commits (8800150) that contain the TouchableWithoutFeedback functional tests.
You can now comment "/azp run" to start the pipelines.
/azp run
Azure Pipelines successfully started running 2 pipeline(s).