You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Fix strict mode violation in notification search test #3307
The test "notification search filters and highlights correctly" attempts to locate and click the notification bell button using page.getByRole("button", { name: /Notifications/ }). However, in responsive dashboard layouts, there are often multiple elements matching this locator in the DOM (e.g., one in the desktop navigation and one in the mobile navigation menu). This causes a Playwright strict mode violation (Error: strict mode violation: locator resolved to multiple elements).
The first test correctly mitigates this by chaining .first() to the locator, but the second test misses this, leading to flakiness or outright failure during execution.
Steps to Reproduce
Run the Playwright test suite against the dashboard.
The first test ("notification bell opens and closes drawer") passes because it specifically targets .first() to select the matched bell button.
The second test ("notification search filters and highlights correctly") attempts to click the button without .first().
Playwright throws a strict mode violation error because it finds multiple "Notifications" buttons in the DOM and doesn't know which one to click.
Activity
github-actions commentedon Jul 31, 2026
✅ Closed as completed!
If DevTrack has been useful, a ⭐ star on the repo helps the project grow and reach more developers.