mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
test for removeChildren added
This commit is contained in:
@ -222,6 +222,20 @@ export function test_removeRows() {
|
|||||||
rows.forEach(r=> rootLayout.addRow(r));
|
rows.forEach(r=> rootLayout.addRow(r));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function test_removeChildren() {
|
||||||
|
var children = [];
|
||||||
|
|
||||||
|
for (let i = 0; i < rootLayout.getChildrenCount(); i++) {
|
||||||
|
children.push(rootLayout.getChildAt(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
rootLayout.removeChildren();
|
||||||
|
|
||||||
|
TKUnit.assertEqual(rootLayout.getChildrenCount(), 0);
|
||||||
|
|
||||||
|
children.forEach(c=> rootLayout.addChild(c));
|
||||||
|
}
|
||||||
|
|
||||||
export function test_getRows_shouldNotReturnNULL() {
|
export function test_getRows_shouldNotReturnNULL() {
|
||||||
var rows = rootLayout.getRows();
|
var rows = rootLayout.getRows();
|
||||||
TKUnit.assert(rows, "getRows should not return null/undefinied");
|
TKUnit.assert(rows, "getRows should not return null/undefinied");
|
||||||
|
Reference in New Issue
Block a user