Skip to content
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

Passing two arguments to cy.its() should throw an err to instead use cy.invoke() #147

Closed
jennifer-shehane opened this issue May 19, 2016 · 2 comments
Assignees
Labels
type: enhancement Requested enhancement of existing feature
Milestone

Comments

@jennifer-shehane
Copy link
Member

jennifer-shehane commented May 19, 2016

asserting off of a value on an attr in cy.its() is returns a function a Function instead of the actual value, need to throw error to the user that they really want to use cy.invoke().

Example Code

cy.get("img").its("attr", "src").should("match", /logo/)

Example Error

expected: [Function] to match /logo/

screen shot 2016-05-19 at 12 13 44 pm

Example Code

cy.get("a").its("attr", "data-js").should("eq", "edit-company")

Example Error

expected: [Function] to eq "edit-company"
@jennifer-shehane jennifer-shehane changed the title chaining a value of an attr off of its() is returning a Function instead of actual value Passing two arguments to cy.its() should throw an err to instead use cy.invoke() May 19, 2016
@jennifer-shehane jennifer-shehane added type: enhancement Requested enhancement of existing feature and removed type: bug labels May 19, 2016
@jennifer-shehane
Copy link
Member Author

Fixed in 0.16.1

@jennifer-shehane jennifer-shehane added this to the 0.16.1 milestone May 20, 2016
@jennifer-shehane jennifer-shehane self-assigned this May 20, 2016
@brian-mann
Copy link
Member

Fixed in 0.16.1.

@cypress-io cypress-io locked as resolved and limited conversation to collaborators Dec 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement Requested enhancement of existing feature
Projects
None yet
Development

No branches or pull requests

2 participants