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

Research creating a utility for testing components within a shadowRoot #4584

Open
benelan opened this issue May 18, 2022 · 1 comment
Open
Labels
0 - new New issues that need assignment. Calcite (dev) Issues logged by Calcite developers. estimate - 8 Requires input from team, consider smaller steps. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. p - low Issue is non core or affecting less that 10% of people using the library research Issues that require more in-depth research or multiple team members to resolve or make decision. testing Issues related to automated or manual testing.

Comments

@benelan
Copy link
Member

benelan commented May 18, 2022

Test type

New test util and/or commonTest

Which Component(s)

None specifically, but it should be generic enough for all

Unstable Tests

N/A

Test error, if applicable

N/A

PR skipped, if applicable

N/A

Additional Info

Sometimes issues occur that are only reproducible within a shadowRoot, e.g. #4305
In these cases we need to create a custom element in the e2e tests, e.g.

It would be nice to be able to

  • DRY the creation of a custom element into a test util
  • Use the util to create a commonTest (like accessible) that tests some sort of generic workflow (maybe clicking, tabbing, passing in a method, etc). This needs research to see what (if anything) is possible to automate.
  • If there is some way to create a test wrapper that runs the test as is, and then runs it again in a custom element's shadowRoot, that would be very helpful too. But there is more research needed.

Blocked Issues: #7471

@benelan benelan added testing Issues related to automated or manual testing. p - high Issue should be addressed in the current milestone, impacts component or core functionality 0 - new New issues that need assignment. labels May 18, 2022
@benelan benelan changed the title Research creating a commonTest util for testing components within a shadowRoot Research creating a utility for testing components within a shadowRoot May 18, 2022
@benelan benelan added research Issues that require more in-depth research or multiple team members to resolve or make decision. and removed p - high Issue should be addressed in the current milestone, impacts component or core functionality labels May 18, 2022
@driskull
Copy link
Member

If there is some way to create a test wrapper that runs the test as is, and then runs it again in a custom element's shadowRoot, that would be very helpful too. But there is more research needed.

I like this one the best I think. We could have a test function as a constant and run it in Jest it() as well as itShadow()

@benelan benelan added the Calcite (dev) Issues logged by Calcite developers. label Jan 30, 2023
@geospatialem geospatialem added the needs triage Planning workflow - pending design/dev review. label Jan 27, 2025
@jcfranco jcfranco added estimate - 8 Requires input from team, consider smaller steps. p - low Issue is non core or affecting less that 10% of people using the library needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. Calcite (dev) Issues logged by Calcite developers. estimate - 8 Requires input from team, consider smaller steps. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. p - low Issue is non core or affecting less that 10% of people using the library research Issues that require more in-depth research or multiple team members to resolve or make decision. testing Issues related to automated or manual testing.
Projects
None yet
Development

No branches or pull requests

5 participants