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
The difference between `byText` and `byTextContent` is that the former doesn't match text inside a nested elements.
@@ -64,6 +65,14 @@ expect(byPlaceholder('Please enter your email address')).toHaveValue('my-value')
64
65
// ... See the Custom Matchers section for a full list of possible matchers
65
66
```
66
67
68
+
Configure `@testing-library/dom` to use `byTestId` with a different `testIdAttribute`
69
+
70
+
```ts
71
+
import { configure } from'@testing-library/dom';
72
+
73
+
configure({ testIdAttribute: 'data-test' });
74
+
```
75
+
67
76
### Parent Selector
68
77
Spectator allows you to query for nested elements within a parent element. This is useful when you have multiple instances of the same component on the page and you want to query for children within a specific one. The parent selector is a string selector that is used to find the parent element. The parent selector is passed as the second parameter to the query methods. For example:
0 commit comments