| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,6 +36,7 @@ e2e/**/test-results.xml | |||
| 36 | 36 | # Webpack configuration files | |
| 37 | 37 | webpack.config.js | |
| 38 | 38 | tsconfig.esm.json | |
| 39 | + tsconfig.tns.json | ||
| 39 | 40 | ||
| 40 | 41 | # Generated files | |
| 41 | 42 | *.map | |
@@ -65,4 +66,4 @@ TestRunResult.txt | |||
| 65 | 66 | ||
| 66 | 67 | tns-core-modules.base.d.ts | |
| 67 | 68 | tns-core-modules.d.ts | |
| 68 | - tns-core-modules.es6.d.ts | ||
| 69 | + tns-core-modules.es6.d.ts | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | <Page> | |
| 2 | 2 | <GridLayout rows="240, *"> | |
| 3 | - <GridLayout width="290" id="test-element" automationText="test-element" /> | ||
| 3 | + <GridLayout automationText="test-element" id="test-element" width="290" iosOverflowSafeArea="false"></GridLayout> | ||
| 4 | 4 | <WrapLayout row="1"> | |
| 5 | 5 | <Button width="40" height="40" text="r" tap="resetTap"/> | |
| 6 | 6 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | <Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page"> | |
| 2 | - <GridLayout columns="auto * auto" rows="auto *" borderWidth="1" borderColor="black"> | ||
| 2 | + <GridLayout columns="auto * auto" rows="auto *" borderWidth="1" borderColor="black" iosOverflowSafeArea="false"> | ||
| 3 | 3 | ||
| 4 | 4 | <StackLayout borderWidth="1" borderColor="black" verticalAlignment="top" width="150"> | |
| 5 | 5 | <Label text="textWrap: false" horizontalAlignment="center"/> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | <Page> | |
| 2 | - <GridLayout columns="*,*" rows="*,*,*,*" automationText="clipPath"> | ||
| 2 | + <GridLayout automationText="clipPath" columns="*,*" rows="*,*,*,*" iosOverflowSafeArea="false"> | ||
| 3 | 3 | <StackLayout col="0" colSpan="2" row="0" width="100" height="100" style.backgroundColor="magenta"> | |
| 4 | 4 | <Button text="no clip-path" width="100" height="100" style="background-image: url('~/ui-tests-app/resources/images/inset-test.png'); background-size: 100% 100%; background-repeat: no-repeat;"/> | |
| 5 | 5 | </StackLayout> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ import { EventData } from "tns-core-modules/data/observable"; | |||
| 4 | 4 | import * as button from "tns-core-modules/ui/button"; | |
| 5 | 5 | ||
| 6 | 6 | const cssPercentage = ` | |
| 7 | - Page { margin: 5% 10% 15% 8%; background-color: orange; font-size: 8; } | ||
| 7 | + Page { background-color: orange; font-size: 8; } | ||
| 8 | 8 | GridLayout { margin: 3%; background-color: lightgreen; font-size: 8; } | |
| 9 | 9 | StackLayout { border-color: red; border-width: 1; } | |
| 10 | 10 | StackLayout * { border-color: blue; border-width: 1; } | |
@@ -16,7 +16,7 @@ const cssPercentage = ` | |||
| 16 | 16 | Button { color: black }`; | |
| 17 | 17 | ||
| 18 | 18 | const cssWithouPercentage = ` | |
| 19 | - Page { margin:15 10 15 30; background-color: orange; font-size: 8; } | ||
| 19 | + Page { background-color: orange; font-size: 8; } | ||
| 20 | 20 | GridLayout { margin:3; background-color: lightgreen; font-size: 8; } | |
| 21 | 21 | StackLayout { border-color: red; border-width: 1; } | |
| 22 | 22 | StackLayout * { border-color: blue; border-width: 1; } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | <Page xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:cC="ui-tests-app/issues/component" id="main-page"> | |
| 2 | - <StackLayout style.borderWidth="1" style.borderColor="black"> | ||
| 2 | + <StackLayout style.borderColor="black" style.borderWidth="1" iosOverflowSafeArea="false"> | ||
| 3 | 3 | <Label class="ui-tests-app-issue-1639-red" text="main-page red from app.css" textWrap="true" /> | |
| 4 | 4 | <Label class="local-red" text="main-page red from issue-1639.css" textWrap="true" /> | |
| 5 | - <cC:customView/> | ||
| 5 | + <cC:customView/> | ||
| 6 | 6 | </StackLayout> | |
| 7 | 7 | </Page> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ | |||
| 6 | 6 | <Label id="Label" backgroundColor="red" class="elementStyle" text="sample label" textWrap="true"/> | |
| 7 | 7 | <TextField id="TextField" backgroundColor="green" class="elementStyle" hint="" text="Sample textfield" /> | |
| 8 | 8 | <TextView id="TextView" class="elementStyle" text="Sample text view" backgroundColor="yellow" editable="true" /> | |
| 9 | - <AbsoluteLayout id="AbsoluteLayout" class="container"/> | ||
| 9 | + <AbsoluteLayout id="AbsoluteLayout" class="container" iosOverflowSafeArea="false"></AbsoluteLayout> | ||
| 10 | 10 | </StackLayout> | |
| 11 | 11 | </ScrollView> | |
| 12 | 12 | </Page> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,7 +46,7 @@ | |||
| 46 | 46 | "typescript": "^2.6.1" | |
| 47 | 47 | }, | |
| 48 | 48 | "scripts": { | |
| 49 | - "setup": "npm run dev-link-tns-platform-declarations && npm run dev-link-tns-core-modules && npm run dev-link-tests && npm run dev-link-apps", | ||
| 49 | + "setup": "npm run dev-link-tns-platform-declarations && npm run dev-link-tns-core-modules && npm run dev-link-tests && npm run dev-link-apps && npm run dev-link-e2e-modal", | ||
| 50 | 50 | "tsc": "node --max_old_space_size=4096 ./node_modules/typescript/bin/tsc", | |
| 51 | 51 | "ci": "tsc && npm run tslint && npm run ci-apps && npm run ci-e2e && npm run ci-tests", | |
| 52 | 52 | "ci-apps": "cd apps && npm i ../tns-core-modules ../tns-platform-declarations --save", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ import * as platform from "tns-core-modules/platform"; | |||
| 11 | 11 | import "./ui-test"; | |
| 12 | 12 | import * as fs from "tns-core-modules/file-system"; | |
| 13 | 13 | import { unsetValue } from "tns-core-modules/ui/core/properties"; | |
| 14 | - import { ad } from "tns-core-modules/utils/utils"; | ||
| 14 | + import { ad, ios } from "tns-core-modules/utils/utils"; | ||
| 15 | 15 | ||
| 16 | 16 | Frame.defaultAnimatedNavigation = false; | |
| 17 | 17 | ||
@@ -135,6 +135,16 @@ allTests["STACKLAYOUT"] = stackLayoutTests; | |||
| 135 | 135 | import * as flexBoxLayoutTests from "./ui/layouts/flexbox-layout-tests"; | |
| 136 | 136 | allTests["FLEXBOXLAYOUT"] = flexBoxLayoutTests; | |
| 137 | 137 | ||
| 138 | + import * as safeAreaLayoutTests from "./ui/layouts/safe-area-tests"; | ||
| 139 | + import * as safeAreaListViewtTests from "./ui/list-view/list-view-safe-area-tests"; | ||
| 140 | + import * as scrollViewSafeAreaTests from "./ui/scroll-view/scroll-view-safe-area-tests"; | ||
| 141 | + | ||
| 142 | + if (platform.isIOS && ios.MajorVersion > 10) { | ||
| 143 | + allTests["SAFEAREALAYOUT"] = safeAreaLayoutTests; | ||
| 144 | + allTests["SAFEAREA-LISTVIEW"] = safeAreaListViewtTests; | ||
| 145 | + allTests["SAFEAREA-SCROLL-VIEW"] = scrollViewSafeAreaTests; | ||
| 146 | + } | ||
| 147 | + | ||
| 138 | 148 | import * as stylePropertiesTests from "./ui/styling/style-properties-tests"; | |
| 139 | 149 | allTests["STYLE-PROPERTIES"] = stylePropertiesTests; | |
| 140 | 150 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,7 @@ | |||
| 1 | 1 | import * as frame from "tns-core-modules/ui/frame"; | |
| 2 | 2 | import { ViewBase, View, unsetValue, isIOS } from "tns-core-modules/ui/core/view"; | |
| 3 | 3 | import { Page } from "tns-core-modules/ui/page"; | |
| 4 | + import { TabView, TabViewItem } from "tns-core-modules/ui/tab-view"; | ||
| 4 | 5 | import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout"; | |
| 5 | 6 | import { Button } from "tns-core-modules/ui/button"; | |
| 6 | 7 | import * as TKUnit from "../TKUnit"; | |
@@ -78,13 +79,55 @@ export function do_PageTest_WithStackLayout_AndButton(test: (views: [Page, Stack | |||
| 78 | 79 | newPage.content = null; | |
| 79 | 80 | } | |
| 80 | 81 | ||
| 81 | - //export function buildUIAndRunTest(controlToTest, testFunction, pageCss?, testDelay?) { | ||
| 82 | - export function buildUIAndRunTest<T extends View>(controlToTest: T, testFunction: (views: [T, Page]) => void, pageCss?) { | ||
| 82 | + export interface PageOptions { | ||
| 83 | + pageCss?: any, | ||
| 84 | + actionBar?: boolean, | ||
| 85 | + actionBarFlat?: boolean, | ||
| 86 | + actionBarHidden?: boolean, | ||
| 87 | + tabBar?: boolean | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + //export function buildUIAndRunTest(controlToTest, testFunction, options) { | ||
| 91 | + export function buildUIAndRunTest<T extends View>(controlToTest: T, testFunction: (views: [T, Page]) => void, options?: PageOptions) { | ||
| 83 | 92 | clearPage(); | |
| 84 | 93 | let newPage = getCurrentPage(); | |
| 85 | 94 | ||
| 86 | - newPage.css = pageCss; | ||
| 87 | - newPage.content = controlToTest; | ||
| 95 | + let testSubject = controlToTest as View; | ||
| 96 | + | ||
| 97 | + if (options) { | ||
| 98 | + if (options.pageCss) { | ||
| 99 | + newPage.css = options.pageCss; | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + newPage.actionBarHidden = true; | ||
| 103 | + newPage.actionBar.flat = false; | ||
| 104 | + | ||
| 105 | + if (options.actionBar) { | ||
| 106 | + newPage.actionBarHidden = false; | ||
| 107 | + newPage.actionBar.title = "Test ActionBar"; | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + if (options.actionBarFlat) { | ||
| 111 | + newPage.actionBarHidden = false; | ||
| 112 | + newPage.actionBar.title = "Test ActionBar Flat"; | ||
| 113 | + newPage.actionBar.flat = true; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + if (options.actionBarHidden) { | ||
| 117 | + newPage.actionBarHidden = true; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + if (options.tabBar) { | ||
| 121 | + const tabView = new TabView(); | ||
| 122 | + const tabEntry = new TabViewItem(); | ||
| 123 | + tabEntry.title = "Test"; | ||
| 124 | + tabEntry.view = controlToTest; | ||
| 125 | + tabView.items = [tabEntry]; | ||
| 126 | + testSubject = tabView; | ||
| 127 | + } | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + newPage.content = testSubject; | ||
| 88 | 131 | ||
| 89 | 132 | testFunction([controlToTest, newPage]); | |
| 90 | 133 | newPage.content = null; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments