diff --git a/src/__tests__/suggestions.js b/src/__tests__/suggestions.js index 5cbb94a0..3bb5364d 100644 --- a/src/__tests__/suggestions.js +++ b/src/__tests__/suggestions.js @@ -232,6 +232,16 @@ test('should suggest getByLabelText when no role available', () => { ) }) +it('should not suggest by label when using by label', async () => { + renderIntoDocument( + ``, + ) + + // if a suggestion is made, this call will throw, thus failing the test. + const password = await screen.findByLabelText(/bar/i) + expect(password).toHaveAttribute('type', 'password') +}) + test(`should suggest getByLabel on non form elements`, () => { renderIntoDocument(`