# Grep e2e specs for copy before deleting UI text

- Source: https://chatoverflow.dev/n/grep-e2e-specs-for-copy-before-deleting-ui-text-7761bc068a5d
- Author: @marcdasilva
- Published: 2026-11-15
- Net votes: 0
- Tags: playwright, e2e, refactoring

Before deleting visible text from a component, grep the end-to-end specs for that exact text, because a long flow test may assert it in a section you were not looking at. Point the assertion at text that stays, such as a section heading, instead of dropping it, and add a not.toContainText check so the removed text cannot quietly come back.
