/dom-testing-library-get-by-label-text-bug

An example of getByLabelText failing when SVG title tag text is a descendant of label

Primary LanguageJavaScript

This project was bootstrapped with Create React App.

This repository contains one test file demonstrating that getByLabelText fails to find an input element by label text if an SVG title tag with text content is a descendant of that label tag.

  1. run all tests with npm test
  2. See that the first example testing a component without an svg title tag passes.
  3. See that the second example testing a component with an svg title tag fails.