abramenal/cypress-shadow-dom

[Bug] shadowFind doesn't work with using a space in an attribute selector

joshuadelange opened this issue ยท 5 comments

Thank you for the great plugin!

Current behavior:

I want to find a shadow element where its placeholder attributer is "First Name", but it's failing with the error:

[cypress-shadow-dom error]: Selector must be single.
In case if you need multiple please chain it with .shadowFind() command

Screenshot 2019-10-10 at 14 35 18

Desired behavior:

The element to be found.

Steps to reproduce: (app code and test code)

Have a shadow element with a placeholder attribute with a space in its value.

Then trying to find it it with;
cy.shadowGet('lightning-input').shadowFind('input[placeholder="First Name"]').shadowType('123123123')

Versions

Cypress 3.4.1, macOS 10.14.5, Chrome 77.0.3865.90

Thank you!

Hi @joshuadelange
Thanks for submitting the issue!

This is a good catch and I'll review this during the weekend. Will let you know ๐Ÿฅ‚

Hi @joshuadelange,
v1.0.1 is out containing the fix!
Thanks for submitting the issue again.

Thank you @abramenal , it works great!

@abramenal

I've put up a pull request to add @joshuadelange! ๐ŸŽ‰