MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / testFunc

Function testFunc

apps/automated/src/ui/repeater/repeater-tests.ts:455–472  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

453
454export var test_RepeaterItemsGestureBindings = function () {
455 var testFunc = function (page: Page) {
456 var repeater = <Repeater>page.getViewById('repeater');
457 var hasObservers = false;
458 var eachChildCallback = function (childItem: View) {
459 if (childItem instanceof Label) {
460 var gestureObservers = childItem.getGestureObservers(GestureTypes.tap);
461 hasObservers = gestureObservers ? gestureObservers.length > 0 : false;
462 } else if (childItem instanceof LayoutBase) {
463 childItem.eachChildView(eachChildCallback);
464 }
465
466 return true;
467 };
468
469 repeater.eachChildView(eachChildCallback);
470
471 TKUnit.assertEqual(hasObservers, true, 'Every item should have tap observer!');
472 };
473
474 helper.navigateToModuleAndRunTest('ui/repeater/repeaterItems-bindingToGestures-page', null, testFunc);
475};

Callers

nothing calls this directly

Calls 1

eachChildViewMethod · 0.45

Tested by

no test coverage detected