It helps me a lot to test the firebase project. Thanks.
But, cy.logout() don't run correctly.
In logout command, you use 'firebase.auth().currentUser'.
The official document says currentUser might also be null because the auth object has not finished initializing.
https://firebase.google.com/docs/auth/web/manage-users?hl=en#get_the_currently_signed-in_user
So, it is better to use onAuthStateChanged method, as your login command.