-
Notifications
You must be signed in to change notification settings - Fork 420
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
chore(test): update piercing docs #1383
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -85,19 +85,11 @@ Use the "piercing" selector `>>>` to query for an object inside a component's sh | |||
const el = await page.find('foo-component >>> .close-button'); | |||
``` | |||
|
|||
:::caution | |||
Make sure to only use `>>>` once in your query. Puppeteer does not support nested deep selectors. Instead, separate the calls into two queries, e.g.: | |||
By default Stencil will look into all shadow roots to find the element. However if you want to restrict your query by specifying the shadow root of a particular component, you can chain multiple deep selectors within the same query, e.g.: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this change only be in affect for Stencil v4.14 and up? If so, shouldn't we leave the other docs as-is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes 🙈
f0284ab
to
4da1b08
Compare
@rwaskiewicz I removed the changes in older versions of the docs which remain suggesting using Puppeteer primitives. |
Background:
I've discovered a limitation with Stencils deep locator and put up a PR to let users know about this limitation. Now, after working on ionic-team/stencil#5481 this limitation was fixed and we can update the docs again.
Summary:
This patch documents that user can use multiple deep selectors in their queries.