diff --git a/docs/Queries.md b/docs/Queries.md index e82d786db..5b69027fb 100644 --- a/docs/Queries.md +++ b/docs/Queries.md @@ -187,23 +187,18 @@ const element = getByA11yValue({ min: 40 }); The interface is the same as for other queries, but we won't provide full names so that they're harder to find by search engines. -### `UNSAFE_ByType`, `ByType` +### `UNSAFE_ByType` > Note: added in v1.4 -> This method has been **deprecated** and has been prepended with `UNSAFE_` prefix. In react-native-testing-library 2.x only the prefixed version will work. +> This method has been marked unsafe, since it requires knowledge about implementation details of the component. Use responsibly. A method returning a `ReactTestInstance` with matching a React component type. Throws when no matches. -### `UNSAFE_ByProps`, `ByProps` +### `UNSAFE_ByProps` -> This method has been **deprecated** and has been prepended with `UNSAFE_` prefix. In react-native-testing-library 2.x only the prefixed version will work. +> This method has been marked unsafe, since it requires knowledge about implementation details of the component. Use responsibly. A method returning a `ReactTestInstance` with matching props object -### `ByName` - -> This method has been **deprecated** because using it results in fragile tests that may break between minor React Native versions. **DON'T USE IT**. It will be removed in next major release (v2.0). Use [`getByTestId`](#bytestid) instead. It's listed here only for back-compat purposes for early adopters of the library -A method returning a `ReactTestInstance` with matching a React component type. Throws when no matches. - diff --git a/src/__tests__/__snapshots__/shallow.test.js.snap b/src/__tests__/__snapshots__/shallow.test.js.snap deleted file mode 100644 index ac70b9743..000000000 --- a/src/__tests__/__snapshots__/shallow.test.js.snap +++ /dev/null @@ -1,21 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`shallow rendering React Test Instance 1`] = ` - - Press me - -`; - -exports[`shallow rendering React elements 1`] = ` - - - Press me - - -`; diff --git a/src/__tests__/debug.test.js b/src/__tests__/debug.test.js index 0b49a0d1b..34d54541d 100644 --- a/src/__tests__/debug.test.js +++ b/src/__tests__/debug.test.js @@ -73,11 +73,11 @@ test('debug.deep', () => { test('debug.deep async test', async () => { // $FlowFixMe console.log = jest.fn(); - const { toJSON, getByName } = render( + const { toJSON, getByText } = render(