You first need to undestand the concept of frontend tests.
You should not test the implementation but the behavior
You test like the end user
For instance, imagine a login screen with email and password inputs and a submit button
The test should input the email and the password, then click in the submit button.