Alias names containing a dot in the req.alias (like get.url) cause the cy.wait() to timeout.
This does not occur when setting the alias name within an .as() command (.as('get.url')).
Test code to reproduce
it('alias without dot',()=>{cy.intercept('/users',(req)=>{req.alias='getUrl'req.reply('foo')})cy.visit('https://example.com')cy.window().then((win)=>{constxhr=newwin.XMLHttpRequest()xhr.open('GET','/users')xhr.send()})// ✅ passescy.wait('@getUrl')})it('alias with dot',()=>{cy.intercept('/users',(req)=>{req.alias='get.url'req.reply('foo')})cy.visit('https://example.com')cy.window().then((win)=>{constxhr=newwin.XMLHttpRequest()xhr.open('GET','/users')xhr.send()})// ❗️ fails, cy.wait() times outcy.wait('@get.url')})
Versions
Cypress 6.2.1
The text was updated successfully, but these errors were encountered:
The code for this is done in cypress-io/cypress#14621, but has yet to be released.
We'll update this issue and reference the changelog when it's released.
Current behavior
This was first mentioned here: #3512 (comment)
Alias names containing a dot in the
req.alias
(likeget.url
) cause thecy.wait()
to timeout.This does not occur when setting the alias name within an
.as()
command (.as('get.url')
).Test code to reproduce
Versions
Cypress 6.2.1
The text was updated successfully, but these errors were encountered: