vendredi 15 janvier 2021

A certain route is being skipped in my test case in Cypress, causing it to fail

So a while back, I created an enum. In this enum, I stored a variable with a route so that at the start of each test case, the user will be taken to this route.

export enum NavRoutesEnum {
            LOGIN_PAGE = 'login/neighborhood'
        }

At the start of each test case, users need to select the neighborhood they live in first, then log in, then the test case runs.

login/neighborhood => login => test case 

This was working fine, but now it's skipping login/neighborhood and going directly to login, thus causing the test case to fail. This started happening when I upgraded my Cypress version to 5.6.0. Not sure if that has anything to do with it, but has anyone ever experienced something similar to this? How were you able to fix it? I was thinking of hardcoding the route I want it to go to, but I think that may be good practice.

Aucun commentaire:

Enregistrer un commentaire