Writing good E2E Tests
tip
Your test scenario should resemble as much as possible the user interactions with your application.
For this we recommend this order of priority in your DOM checks :
1. Accessibility-based queries
-
Look for an element using its accessible role and content
-
Look for an element using its content
-
Look for an element using its aria-label attribute
2. Test IDs
-
Look for an element using its data-testid attribute