My tests always try to "clear cookies" and relog to the auth0. after I went through the code of the "login" command carefully it seems to me pretty clear why:
It seems that the cachedUsername variable is never being set to some value and left undefined through the whole life-cycle of the code. therefore the code will always execute the clear cookies + relog flow no matter what.
My tests always try to "clear cookies" and relog to the auth0. after I went through the code of the "login" command carefully it seems to me pretty clear why:
It seems that the
cachedUsername
variable is never being set to some value and left undefined through the whole life-cycle of the code. therefore the code will always execute the clear cookies + relog flow no matter what.I'm talking about the code here: https://github.com/sir-dunxalot/cypress-nextjs-auth0/blob/master/src/commands/login.js