diff --git a/src/renderStream/__tests__/createRenderStream.test.tsx b/src/renderStream/__tests__/createRenderStream.test.tsx index 3218f5406..c7f0908cf 100644 --- a/src/renderStream/__tests__/createRenderStream.test.tsx +++ b/src/renderStream/__tests__/createRenderStream.test.tsx @@ -49,7 +49,8 @@ describe('snapshotDOM', () => { } { const {withinDOM} = await takeRender() - const input = withinDOM().getByLabelText('Value') + // a one-off to test that `queryBy` works and accepts a type argument + const input = withinDOM().queryByLabelText('Value')! expect(input.value).toBe('1') } { diff --git a/src/renderStream/syncQueries.ts b/src/renderStream/syncQueries.ts index 1d4b2f391..d7e66bf20 100644 --- a/src/renderStream/syncQueries.ts +++ b/src/renderStream/syncQueries.ts @@ -31,84 +31,84 @@ export type BoundSyncFunctions = Q extends typeof syncQueries getAllByLabelText( ...args: Parameters>> ): ReturnType> - findByLabelText( - ...args: Parameters>> - ): ReturnType> - findAllByLabelText( - ...args: Parameters>> - ): ReturnType> + queryByLabelText( + ...args: Parameters>> + ): ReturnType> + queryAllByLabelText( + ...args: Parameters>> + ): ReturnType> getByPlaceholderText( ...args: Parameters>> ): ReturnType> getAllByPlaceholderText( ...args: Parameters>> ): ReturnType> - findByPlaceholderText( - ...args: Parameters>> - ): ReturnType> - findAllByPlaceholderText( - ...args: Parameters>> - ): ReturnType> + queryByPlaceholderText( + ...args: Parameters>> + ): ReturnType> + queryAllByPlaceholderText( + ...args: Parameters>> + ): ReturnType> getByText( ...args: Parameters>> ): ReturnType> getAllByText( ...args: Parameters>> ): ReturnType> - findByText( - ...args: Parameters>> - ): ReturnType> - findAllByText( - ...args: Parameters>> - ): ReturnType> + queryByText( + ...args: Parameters>> + ): ReturnType> + queryAllByText( + ...args: Parameters>> + ): ReturnType> getByAltText( ...args: Parameters>> ): ReturnType> getAllByAltText( ...args: Parameters>> ): ReturnType> - findByAltText( - ...args: Parameters>> - ): ReturnType> - findAllByAltText( - ...args: Parameters>> - ): ReturnType> + queryByAltText( + ...args: Parameters>> + ): ReturnType> + queryAllByAltText( + ...args: Parameters>> + ): ReturnType> getByTitle( ...args: Parameters>> ): ReturnType> getAllByTitle( ...args: Parameters>> ): ReturnType> - findByTitle( - ...args: Parameters>> - ): ReturnType> - findAllByTitle( - ...args: Parameters>> - ): ReturnType> + queryByTitle( + ...args: Parameters>> + ): ReturnType> + queryAllByTitle( + ...args: Parameters>> + ): ReturnType> getByDisplayValue( ...args: Parameters>> ): ReturnType> getAllByDisplayValue( ...args: Parameters>> ): ReturnType> - findByDisplayValue( - ...args: Parameters>> - ): ReturnType> - findAllByDisplayValue( - ...args: Parameters>> - ): ReturnType> + queryByDisplayValue( + ...args: Parameters>> + ): ReturnType> + queryAllByDisplayValue( + ...args: Parameters>> + ): ReturnType> getByRole( ...args: Parameters>> ): ReturnType> getAllByRole( ...args: Parameters>> ): ReturnType> - findByRole( - ...args: Parameters>> - ): ReturnType> - findAllByRole( - ...args: Parameters>> - ): ReturnType> + queryByRole( + ...args: Parameters>> + ): ReturnType> + queryAllByRole( + ...args: Parameters>> + ): ReturnType> getByTestId( ...args: Parameters>> ): ReturnType> @@ -121,12 +121,6 @@ export type BoundSyncFunctions = Q extends typeof syncQueries queryAllByTestId( ...args: Parameters>> ): ReturnType> - findByTestId( - ...args: Parameters>> - ): ReturnType> - findAllByTestId( - ...args: Parameters>> - ): ReturnType> } & { [P in keyof Q]: BoundFunction }