MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / testAction

Function testAction

apps/automated/src/ui/repeater/repeater-tests.ts:32–43  ·  view source on GitHub ↗
(views: Array<View>)

Source from the content-addressed store, hash-verified

30 var repeater = new Repeater();
31
32 function testAction(views: Array<View>) {
33 // >> article-repeater-with-array
34 var colors = ['red', 'green', 'blue'];
35 repeater.items = colors;
36 // << article-repeater-with-array
37
38 TKUnit.waitUntilReady(() => repeater.isLayoutValid);
39
40 TKUnit.assert(getChildAtText(repeater, 0) === 'red', 'Item not created for index 0');
41 TKUnit.assert(getChildAtText(repeater, 1) === 'green', 'Item not created for index 1');
42 TKUnit.assert(getChildAtText(repeater, 2) === 'blue', 'Item not created for index 2');
43 }
44
45 helper.buildUIAndRunTest(repeater, testAction);
46}

Callers

nothing calls this directly

Calls 10

pushMethod · 0.95
getChildAtTextFunction · 0.85
getChildrenCountFunction · 0.85
getChildAtFunction · 0.85
assertMethod · 0.80
popMethod · 0.80
spliceMethod · 0.80
bindMethod · 0.80
refreshMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected