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

Function test

apps/automated/src/ui/view/view-tests-layout-event.ts:6–16  ·  view source on GitHub ↗
(views: Array<View>)

Source from the content-addressed store, hash-verified

4
5export function test_event_LayoutChanged_GetActualSize() {
6 const test = function (views: Array<View>) {
7 let buttonLayoutChanged = false;
8
9 views[1].on(View.layoutChangedEvent, (data) => {
10 buttonLayoutChanged = true;
11 });
12
13 TKUnit.waitUntilReady(() => buttonLayoutChanged, 5);
14 TKUnit.assert(views[1].getActualSize().height > 0);
15 TKUnit.assert(views[1].getActualSize().width > 0);
16 };
17
18 helper.do_PageTest_WithStackLayout_AndButton(test);
19}

Callers

nothing calls this directly

Calls 3

assertMethod · 0.80
onMethod · 0.65
hasListenersMethod · 0.65

Tested by

no test coverage detected