Testing Library's philosophy is right
“The more your tests resemble the way your software is used, the more confidence they can give you.” Testing Library encourages querying by role, label, and text — not by CSS class or test ID. Tests that test behavior, not implementation.