-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An Its() function cannot access index of zero. #6216
An Its() function cannot access index of zero. #6216
Comments
Yes, this is a bug. Good catch. Being able to use indices for It seems that the The error in logic was added here: https://github.com/cypress-io/cypress/pull/5519/files#diff-5b34517122a03995ae6793f0a8d18797R182 where it does a simple This code below needs to be fixed to address this and a test that uses This actually appears to have also been a bug in 3.7.0 release, as it also does not return the 0 index (although does not error), so there may be some more code necessary to make this work. cc @flotwig Reproducible Codeit('failure', () => {
cy.wrap(['Wai Yan', 'Yu']).its(1).should('eq', 'Yu')
cy.wrap(['Wai Yan', 'Yu']).its(0).should('eq', 'Wai Yan')
}) 3.7.03.8.0 |
I am currently doing this one, the project is a bit overwhelming for me so I might get this wrong so please be patient with me :) (also writing coffeescript on the fly so thats cool). I'm actually done but the pre-commit hook is breaking on me, so, I'm dealing with that |
The code for this is done in cypress-io/cypress#6234, but has yet to be released. |
Released in |
Current behavior:
From the tutorial on the official website (https://docs.cypress.io/api/commands/its.html) when I have used with an array following the example I have found an issue of the function. The function could access indices from indices
one
to last indices of the array. However, when I have used the indiceszero
with the function the compiler have an error.Desired behavior:
The function have been access by indices
zero
to the last indices of the example array.Test code to reproduce
Versions
Cypress version (Installed via npm) : 3.8.2
Os: Windows 10
The text was updated successfully, but these errors were encountered: