NativeScript / NativeScript/nativescript-cli
Add ability to test UI widgets
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 204
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 8
描述
From @PeterStaev on April 23, 2016 9:57
From what I see currently it is not possible to test UI widgets. I tried to parse a widget with builder.parse or just create a new object inside the test and set up properties/bindings but both approaches do not initialize the widget fully (i.e. on android the _createUI function is not called, on iOS onLoaded event is never fired). Would be great if we can add tests for UI widgets (especially for people developing UI plugins :))
Copied from original issue: NativeScript/nativescript-unit-test-runner#9
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先调查围绕 builder.parse 和直接创建 widget 的单元测试处理,重点关注报告中提到的 Android _createUI 路径和 iOS onLoaded 事件。确定应如何在测试中执行 widget 生命周期初始化,并在 UI widget 可以被实例化且其平台特定的初始化可以在两个平台上进行测试时,视为工作完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- mobile
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100