4 ms·
When asked to write UI tests (playwright), I've seen Claude Code do essentially the following: const elem = document.querySelector(".foo"); // actual element t
by bobbylarrybobby 1y ago
When asked to write UI tests (playwright), I've seen Claude Code do essentially the following:
const elem = document.querySelector(".foo"); // actual element that exists
elem.innerHTML = '<div class="bar"></div>';
const child = elem.locator(".bar"); // child we actually want to test for
expect(child).toExist()
Gee thanks Claude, what a great test...
- vintagedave 1y agoSame. Drives me up the wall. I’m writing my own coding agent now and I’m baking into it prompts against all the anti patterns I’ve see.