Closed catbreathx closed 2 years ago
Hi -
In this specific scenario, Webstorm is giving a warning of an unresolved alias:
it('can click and navigate to external game page', () => { cy.visit('/'); cy.window().then((window) => { cy.stub(window, 'open', url => { expect(url).to.contain(CHEAPSHARK_REDIRECTION_URL) }).as("gameNewWindow") }) cy.get(elements.dataRows).should( 'have.length.at.least', 5); cy.get(`${elements.dataRows}:first-child()`).click(); cy.get('@gameNewWindow').should("be.called") })
The line is question is cy.get('@gameNewWindow').should("be.called").
cy.get('@gameNewWindow').should("be.called")
It's previously been defined on the cy.stub statement. Removing the cy.window().then command doesn't resolve the issue, either.
cy.stub
cy.window().then
The test executes and passes as expected.
Thanks.
fixed in 3.2 version
I use Cypress Support Pro Version 3.6 and have the same issue.
@frm-037 please provide the code snippet
Hi -
In this specific scenario, Webstorm is giving a warning of an unresolved alias:
The line is question is
cy.get('@gameNewWindow').should("be.called")
.It's previously been defined on the
cy.stub
statement. Removing thecy.window().then
command doesn't resolve the issue, either.The test executes and passes as expected.
Thanks.