From b914e9a64fe07adc21be6eeed6f8155c0d649b1d Mon Sep 17 00:00:00 2001 From: Vasil Chimev Date: Wed, 12 Sep 2018 16:14:06 +0300 Subject: [PATCH] test(safe-area): add absolute layout tests --- tests/app/ui/layouts/safe-area-tests.ts | 71 +++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/tests/app/ui/layouts/safe-area-tests.ts b/tests/app/ui/layouts/safe-area-tests.ts index 9329aa103..af5c5ff3e 100644 --- a/tests/app/ui/layouts/safe-area-tests.ts +++ b/tests/app/ui/layouts/safe-area-tests.ts @@ -67,6 +67,77 @@ export class SafeAreaTests extends testModule.UITest { equal(b, heightPixels, `${layout}.bottom - actual:${b}; expected: ${heightPixels}`); } + // Absolute + private getAbsoluteViews(template: string) { + let root = parse(template); + return { + root, + child0: root.getViewById("child0") as view.View, + }; + }; + + public test_absolute_in_full_screen() { + const snippet = ` + + `; + + this.executeSnippet( + this.getAbsoluteViews(snippet), + this.noop, + ({ root }) => { this.layout_in_full_screen_test(root); } + ); + } + + + public test_absolute_children_components_in_safe_area() { + const snippet = ` + +