Uma outra alternativa que também funciona é utilizar dessa maneira: cy.get('input[formcontrolname="email"]').focus();
Alterando o nome do formcontrolname
.
it('Login e Registro de usuarios Alura Pic', () => {
cy.contains('a', 'Register now').click();
cy.get('input[formcontrolname="email"]').focus();
cy.get('input[formcontrolname="fullName"]').focus();
cy.get('input[formcontrolname="fullName"]').focus();
cy.get('input[formcontrolname="userName"]').focus();
cy.get('input[formcontrolname="password"]').focus();
cy.contains('button', 'Register').click();
cy.contains('ap-vmessage', 'Email is required!').should('be.visible');
cy.contains('ap-vmessage', 'Full name is required!').should('be.visible');
cy.contains('ap-vmessage', 'User name is required!').should('be.visible');
cy.contains('ap-vmessage', 'Password is required!').should('be.visible');
})