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

Command Log's click displays Object{9} and other nonsense when click({multiple: true}) #88

Closed
jennifer-shehane opened this issue Nov 30, 2015 · 5 comments
Labels
type: unexpected behavior User expected result, but got another

Comments

@jennifer-shehane
Copy link
Member

Whenever you pass options {multiple: true} to cy.click(), each click command in the command log displays nonsense data like Object{9} or {interval: 16}, etc.

Example Code

cy.get("[data-js='remove-form-template']").click({multiple: true})

Command Log Screenshot
screen shot 2015-11-30 at 11 14 08 am

@jennifer-shehane jennifer-shehane added the type: unexpected behavior User expected result, but got another label Nov 30, 2015
@brian-mann
Copy link
Member

Fixed in 0.12.7.

@ntgussoni
Copy link

@jennifer-shehane @brian-mann HI! Im having a similar issue when passing force to .click
this is my code. Could this be happening again?

Cypress.Commands.add('dropdownSelectByText', (selector, text = '', force = false) => {
  cy.get(selector).click({ force: force });
  cy.contains('some-other-selector', text).click({ force: true});
]});

for some reason the second force is logged properly but not the first.

image

@ntgussoni
Copy link

ntgussoni commented Nov 26, 2018

After some digging around, I can say that this happens when you pass { force: false } which is the default. The console message drove me crazy though.
The issue seems to be around here

filterOutOptions: (obj, filter = {}) ->

I dont exactly know what the goal of these methods are, but I could put together a PR if you point me in the right direction.

Cheers!

@jennifer-shehane
Copy link
Member Author

Hey @ntgussoni, can you open up a new issue and reference this comment there? This definitely should not be printing this. It's probably trying to print all default options? Not sure.

@ntgussoni
Copy link

Hey @ntgussoni, can you open up a new issue and reference this comment there? This definitely should not be printing this. It's probably trying to print all default options? Not sure.

@jennifer-shehane Created this #2847
We can discuss it there, and I'll try to get a PR to fix that when we come up with a solution.

@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: unexpected behavior User expected result, but got another
Projects
None yet
Development

No branches or pull requests

3 participants