I am trying to run cypress script, which is login the user, now after login, app navigates from one URL to another, while URL is navigated successfully, but Test runner is continuously in 'New URL' state.
I am using following code:
describe('Login', function(){
it('Login Successfully', function(){
const urlRedirects = [];
cy.visit('https://vep-staging.auth.us-east-1.amazoncognito.com/login?client_id=2bu8f0pfkqaasa8jjatgd8d40g&redirect_uri=https%3A%2F%2Fapp.staging.showcare.io%2Fproduct-showcase&response_type=code&scope=openid&state=254805b5dfbc4f68acbdb28add5536a4&code_challenge=NvfTn44X98LyNBBCJoAdDPHADnHLbiuy0gj2Xcg6Mow&code_challenge_method=S256&response_mode=query')
cy.get('.modal-dialog')
cy.get('#signInFormUsername', { timeout: 10000 }).eq(0).type('email_address', { force: true })
cy.get('#signInFormPassword').eq(0).type('password', { force: true })
cy.get('[name="signInSubmitButton"]').eq(0).click({ force: true }).wait(1000)
.then(() => {
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/product-showcase')
}).wait(4000)
cy.reload();
cy.get('a').eq(0).trigger('mouseover').click({ force: true })
})
})
})