How to test components with ViewEncapsulation.ShadowDom?
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- angular, typescript
调研方向
首先,复现为 Angular Element 启用 ViewEncapsulation.ShadowDom 时的 Angular 组件测试,然后检查 Angular Testing Library 如何查询已渲染的组件。确定是否能够找到 shadow DOM 内的元素,并记录或实现所需行为,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Hi, I'm testing component that used as WebComponent (Angular Element).
And I want to enable shadow DOM encapsulation.
@Component({
// ...
encapsulation: ViewEncapsulation.ShadowDom // <- This!
})
But if shadow DOM encapsulation is enabled, Angular Testing Library seems failed find elements in shadow DOM.
Is there anything I can solve this problem?
Thanks.
- 主要语言
- TypeScript
- 星标
- 792
- 派生
- 95
- 平均合并
- 34 分钟
- 30 天内合并 PR
- 3
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
testing-library/angular-testing-library 的其他 Issue
-
Add skills?未关闭
难度 5/5 一周以上 新手友好度 15/100
-
难度 5/5 一周以上 新手友好度 35/100
testing-library/angular-testing-library#593 · 1 条评论 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 35/100
testing-library/angular-testing-library#576 · 3 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
testing-library/angular-testing-library#383 · 5 条评论 ·
查看 testing-library/angular-testing-library 的全部 Issue
相似的 Issue
-
submodule-pointer-regression
难度 1/5 1 小时以内 新手友好度 72/100
smith-horn/skillsmith#3061 ·
维护者通常 1 天内回复
-
area: ops type: test
难度 2/5 1-3 小时 新手友好度 79/100
accensa/x402-facilitator-stellar#559 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 74/100
cosimochellini/one-piece-zero-spoiler#551 ·
维护者通常 1 天内回复
-
getWatched() omits __proto__ directories when cwd is set可能已有人在做 @maxazure 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 79/100
-
area:web enhancement
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复