NativeScript / NativeScript/nativescript-cli

Add ability to test UI widgets

未關閉
#2,774 1 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

feature unit testing
主要語言
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

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先調查圍繞 builder.parse 和直接建立 widget 的單元測試處理,重點關注報告中提到的 Android _createUI 路徑和 iOS onLoaded 事件。確定應如何在測試中執行 widget 生命週期初始化,並在 UI widget 可以被具現化且其平台特定的初始化可以在兩個平台上進行測試時,視為工作完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript
領域
mobile
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。