You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/6.x/docs/guides/migration.md
+15-35Lines changed: 15 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,61 +71,41 @@ You can use the component's color prop where available, or override the correspo
71
71
72
72
### Test IDs
73
73
74
-
Hardcoded default test IDs have been removed for the components listed below. Many of these components also derive test IDs for their internal parts by appending a suffix to the `testID` prop (e.g. `${testID}-container`). Since `testID` is no longer defaulted to a hardcoded value, none of these derived test IDs are set either unless you pass a `testID` explicitly — so all queries by the IDs below will stop matching:
74
+
Hardcoded default test IDs have been removed for the components listed below:
-`icon-button-icon` (and `icon-button-icon-previous` / `icon-button-icon-current` when `animated`)
107
88
-`Menu`: `menu`
108
-
-`menu-view`
109
-
-`menu-surface`
110
89
-`Menu.Item`: `menu-item`
111
-
-`menu-item-title`
112
90
-`Modal`: `modal`
113
-
-`modal-backdrop`
114
-
-`modal-wrapper`
115
-
-`modal-surface`
116
91
-`ProgressBar`: `progress-bar`
117
-
-`progress-bar-fill`
118
92
-`Searchbar`: `search-bar`
119
-
-`search-bar-container`
120
-
-`search-bar-icon`
121
-
-`search-bar-icon-wrapper`
122
-
-`search-bar-clear-icon`
123
-
-`search-bar-trailering-icon`
124
-
-`search-bar-divider`
125
93
-`Surface`: `surface`
126
-
-`surface-outer-layer`
127
94
128
-
You can specify a `testID` explicitly to restore both the component's own test ID and all of its derived test IDs above, using the same suffixes.
95
+
You can specify a `testID` explicitly to restore each component's own test ID.
96
+
97
+
These components used to also derive test IDs for internal, implementation-only elements by appending a suffix to the `testID` prop (e.g. `${testID}-container`, `${testID}-icon`, `${testID}-outline`). They have been removed entirely.
98
+
99
+
If you were relying on internal test IDs, update your tests not to rely on internal implementation details and only interact with elements or assert content your users can reach, e.g.: query by role, label, text etc., or `testID` props accepted by the component.
100
+
101
+
Some components now accept explicit `testID` props for their interactable elements:
102
+
103
+
-`BottomNavigation`: `barTestID` for the internal `BottomNavigation.Bar`, replacing the previous `${testID}-bar` derivation.
104
+
-`Chip`: `closeIconTestID` for the close icon button.
105
+
-`Dialog` and `Modal`: `overlayTestID` for the overlay displayed behind the content.
106
+
-`Menu`: `overlayTestID` for the overlay displayed behind the menu.
107
+
-`Searchbar`: `searchTestID`, `clearTestID`, and `trailingTestID` for the search, clear, and trailing icon buttons.
0 commit comments