You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cy.window().its('__store__').then((store)=>{
...
/* `store` is undefined as value is yielded before my application gets a chance to set `window.__store__ = myStore;` */});
Desired behavior:
Docs state:
.its() will automatically retry itself until the property exists on the subject.
Interestingly, asserting that the yielded property exists resolves this issue:
cy.window().its('__store__').should('exist').then((store)=>{
...
/* `store` is *not* `undefined` 👌 */});
I suspect all that is required is that the documentation needs to be updated to indicate that by default it will yield undefined unless there's a subsequent command that triggers the retry behaviour/state.
Versions
Cypress 3.2.0
macOS: 10.14.3
Chrome 73
The text was updated successfully, but these errors were encountered:
The code for this is done in cypress-io/cypress#3870, but has yet to be released.
We'll update this issue and reference the changelog when it's released.
Current behavior:
cy.its()
yieldsundefined
.Desired behavior:
Docs state:
https://docs.cypress.io/api/commands/its.html#Assertions
Steps to reproduce: (app code and test code)
Interestingly, asserting that the yielded property exists resolves this issue:
I suspect all that is required is that the documentation needs to be updated to indicate that by default it will yield
undefined
unless there's a subsequent command that triggers the retry behaviour/state.Versions
Cypress 3.2.0
macOS: 10.14.3
Chrome 73
The text was updated successfully, but these errors were encountered: