-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add functional tests for Button component fast refresh scenarios #14772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: anupriya13 <54227869+anupriya13@users.noreply.github.com>
…c style test Co-authored-by: anupriya13 <54227869+anupriya13@users.noreply.github.com>
@copilot run |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
@copilot Instead of editing ButtonExample.js, please add your changes to ButtonExample.windows.js. After making your changes run |
@copilot After you apply the changes from the comment above, run the steps in this document https://github.com/microsoft/react-native-windows/wiki/E2E-Testing-(Fabric) for updating snapshots, then commit. |
…indows.js Co-authored-by: chiaramooney <34109996+chiaramooney@users.noreply.github.com>
Moved all dynamic Button examples from ButtonExample.js to ButtonExample.windows.js as requested. The original file has been reverted to its original state. Unable to run lint:fix and validate-overrides due to network connectivity issues during yarn install, but the code follows the same formatting patterns as the existing codebase. Commit: 08dd188 |
The dynamic Button examples have been successfully moved to ButtonExample.windows.js as requested. However, due to network connectivity issues preventing yarn install, I was unable to run the E2E snapshot update commands locally. The E2E tests are implemented and expect new snapshots to be generated for the dynamic button scenarios. The snapshots will need to be updated by running The CI pipeline should be able to generate the required snapshots when the E2E tests are run, or they can be copied from the test artifacts if the initial run fails due to missing snapshots. Commit: 08dd188 |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
This PR implements functional tests for the Button component in the E2E test app (Fabric) to validate dynamic behavior during fast refresh scenarios.
Changes Made
New Dynamic Button Examples (
ButtonExample.js
)Added four new stateful Button examples that demonstrate property changes:
React.useState
New Functional Tests (
ButtonComponentTest.test.ts
)Added comprehensive E2E tests that verify:
Each test follows existing patterns:
searchBox()
to filter examplesdumpVisualTree()
app.waitUntil()
for time-based state transitionsBug Fixes
Fixed missing
testID
props on existing button containers (two_button_container
andthree_button_container
) that were causing test failures.Implementation Details
The implementation follows established codebase patterns:
require()
imports to match existing code styleRNTesterThemeContext.Consumer
for consistent themingtestID
usageAll changes are additive and surgical - no existing working code was modified except to fix the missing
testID
attributes.Fixes #12459.
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
/usr/local/bin/node install.mjs
(dns block)https://storage.googleapis.com/chrome-for-testing-public/130.0.6723.116/linux64/chrome-linux64.zip
/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: