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

chore(test): update piercing docs #1383

Merged
merged 2 commits into from
Mar 27, 2024
Merged

chore(test): update piercing docs #1383

merged 2 commits into from
Mar 27, 2024

Conversation

christian-bromann
Copy link
Member

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.

@christian-bromann christian-bromann requested a review from a team as a code owner March 27, 2024 02:05
@christian-bromann christian-bromann requested review from rwaskiewicz and alicewriteswrongs and removed request for a team March 27, 2024 02:05
Copy link

vercel bot commented Mar 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stencil-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2024 7:21pm

@@ -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.:
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes 🙈

@christian-bromann
Copy link
Member Author

@rwaskiewicz I removed the changes in older versions of the docs which remain suggesting using Puppeteer primitives.

@christian-bromann christian-bromann merged commit 396f4fe into main Mar 27, 2024
5 checks passed
@christian-bromann christian-bromann deleted the cb/piercing-note branch March 27, 2024 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants