What's a locator strategy that actually stays stable across UI refactors?
Devs refactor our React app roughly monthly. Every refactor breaks 20–30 tests because someone renamed a class or restructured a component. We've tried: - CSS selectors → break on class rename - XPath → break on structure change - `data-testid` → devs strip them "because they're clutter" What's actually held up long-term? I need to make a case to engineering leadership.
