mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
style(tests): format all files
This commit is contained in:
@@ -5,4 +5,4 @@
|
||||
<item>
|
||||
<bitmap android:gravity="center" android:src="@drawable/logo" />
|
||||
</item>
|
||||
</layer-list>
|
||||
</layer-list>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ns_accent">#3d5afe</color>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -19,5 +19,5 @@
|
||||
|
||||
<style name="NativeScriptToolbarStyle" parent="NativeScriptToolbarStyleBase">
|
||||
<item name="android:elevation">4dp</item>
|
||||
</style>
|
||||
</resources>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
<color name="ns_primaryDark">#757575</color>
|
||||
<color name="ns_accent">#33B5E5</color>
|
||||
<color name="ns_blue">#272734</color>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<item name="colorAccent">@color/ns_accent</item>
|
||||
|
||||
<item name="android:windowBackground">@drawable/splash_screen</item>
|
||||
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
|
||||
</style>
|
||||
@@ -42,4 +42,4 @@
|
||||
|
||||
<style name="NativeScriptToolbarStyle" parent="NativeScriptToolbarStyleBase">
|
||||
</style>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -1,122 +1,122 @@
|
||||
{
|
||||
"images" : [
|
||||
"images": [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "icon-20@2x.png",
|
||||
"scale" : "2x"
|
||||
"size": "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-20@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "icon-20@3x.png",
|
||||
"scale" : "3x"
|
||||
"size": "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-20@3x.png",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "icon-29.png",
|
||||
"scale" : "1x"
|
||||
"size": "29x29",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-29.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "icon-29@2x.png",
|
||||
"scale" : "2x"
|
||||
"size": "29x29",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-29@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "icon-29@3x.png",
|
||||
"scale" : "3x"
|
||||
"size": "29x29",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-29@3x.png",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "icon-40@2x.png",
|
||||
"scale" : "2x"
|
||||
"size": "40x40",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-40@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "icon-40@3x.png",
|
||||
"scale" : "3x"
|
||||
"size": "40x40",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-40@3x.png",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "icon-60@2x.png",
|
||||
"scale" : "2x"
|
||||
"size": "60x60",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-60@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "icon-60@3x.png",
|
||||
"scale" : "3x"
|
||||
"size": "60x60",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-60@3x.png",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "icon-20.png",
|
||||
"scale" : "1x"
|
||||
"size": "20x20",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-20.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "icon-20@2x.png",
|
||||
"scale" : "2x"
|
||||
"size": "20x20",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-20@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "icon-29.png",
|
||||
"scale" : "1x"
|
||||
"size": "29x29",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-29.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "icon-29@2x.png",
|
||||
"scale" : "2x"
|
||||
"size": "29x29",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-29@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "icon-40.png",
|
||||
"scale" : "1x"
|
||||
"size": "40x40",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-40.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "icon-40@2x.png",
|
||||
"scale" : "2x"
|
||||
"size": "40x40",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-40@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "icon-76.png",
|
||||
"scale" : "1x"
|
||||
"size": "76x76",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-76.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "icon-76@2x.png",
|
||||
"scale" : "2x"
|
||||
"size": "76x76",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-76@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "icon-83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
"size": "83.5x83.5",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-83.5@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "icon-1024.png",
|
||||
"scale" : "1x"
|
||||
"size": "1024x1024",
|
||||
"idiom": "ios-marketing",
|
||||
"filename": "icon-1024.png",
|
||||
"scale": "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,212 +1,212 @@
|
||||
{
|
||||
"images" : [
|
||||
"images": [
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "2688h",
|
||||
"filename" : "Default-Portrait-XS-Max.png",
|
||||
"minimum-system-version" : "12.0",
|
||||
"orientation" : "portrait",
|
||||
"scale" : "3x"
|
||||
"extent": "full-screen",
|
||||
"idiom": "iphone",
|
||||
"subtype": "2688h",
|
||||
"filename": "Default-Portrait-XS-Max.png",
|
||||
"minimum-system-version": "12.0",
|
||||
"orientation": "portrait",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "2688h",
|
||||
"filename" : "Default-Landscape-XS-Max.png",
|
||||
"minimum-system-version" : "12.0",
|
||||
"orientation" : "landscape",
|
||||
"scale" : "3x"
|
||||
"extent": "full-screen",
|
||||
"idiom": "iphone",
|
||||
"subtype": "2688h",
|
||||
"filename": "Default-Landscape-XS-Max.png",
|
||||
"minimum-system-version": "12.0",
|
||||
"orientation": "landscape",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "1792h",
|
||||
"filename" : "Default-Portrait-XR.png",
|
||||
"minimum-system-version" : "12.0",
|
||||
"orientation" : "portrait",
|
||||
"scale" : "2x"
|
||||
"extent": "full-screen",
|
||||
"idiom": "iphone",
|
||||
"subtype": "1792h",
|
||||
"filename": "Default-Portrait-XR.png",
|
||||
"minimum-system-version": "12.0",
|
||||
"orientation": "portrait",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "1792h",
|
||||
"filename" : "Default-Landscape-XR.png",
|
||||
"minimum-system-version" : "12.0",
|
||||
"orientation" : "landscape",
|
||||
"scale" : "2x"
|
||||
"extent": "full-screen",
|
||||
"idiom": "iphone",
|
||||
"subtype": "1792h",
|
||||
"filename": "Default-Landscape-XR.png",
|
||||
"minimum-system-version": "12.0",
|
||||
"orientation": "landscape",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "2436h",
|
||||
"filename" : "Default-1125h.png",
|
||||
"minimum-system-version" : "11.0",
|
||||
"orientation" : "portrait",
|
||||
"scale" : "3x"
|
||||
"extent": "full-screen",
|
||||
"idiom": "iphone",
|
||||
"subtype": "2436h",
|
||||
"filename": "Default-1125h.png",
|
||||
"minimum-system-version": "11.0",
|
||||
"orientation": "portrait",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "2436h",
|
||||
"filename" : "Default-Landscape-X.png",
|
||||
"minimum-system-version" : "11.0",
|
||||
"orientation" : "landscape",
|
||||
"scale" : "3x"
|
||||
"extent": "full-screen",
|
||||
"idiom": "iphone",
|
||||
"subtype": "2436h",
|
||||
"filename": "Default-Landscape-X.png",
|
||||
"minimum-system-version": "11.0",
|
||||
"orientation": "landscape",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "736h",
|
||||
"filename" : "Default-736h@3x.png",
|
||||
"minimum-system-version" : "8.0",
|
||||
"orientation" : "portrait",
|
||||
"scale" : "3x"
|
||||
"extent": "full-screen",
|
||||
"idiom": "iphone",
|
||||
"subtype": "736h",
|
||||
"filename": "Default-736h@3x.png",
|
||||
"minimum-system-version": "8.0",
|
||||
"orientation": "portrait",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "736h",
|
||||
"filename" : "Default-Landscape@3x.png",
|
||||
"minimum-system-version" : "8.0",
|
||||
"orientation" : "landscape",
|
||||
"scale" : "3x"
|
||||
"extent": "full-screen",
|
||||
"idiom": "iphone",
|
||||
"subtype": "736h",
|
||||
"filename": "Default-Landscape@3x.png",
|
||||
"minimum-system-version": "8.0",
|
||||
"orientation": "landscape",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "667h",
|
||||
"filename" : "Default-667h@2x.png",
|
||||
"minimum-system-version" : "8.0",
|
||||
"orientation" : "portrait",
|
||||
"scale" : "2x"
|
||||
"extent": "full-screen",
|
||||
"idiom": "iphone",
|
||||
"subtype": "667h",
|
||||
"filename": "Default-667h@2x.png",
|
||||
"minimum-system-version": "8.0",
|
||||
"orientation": "portrait",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Default@2x.png",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
"orientation": "portrait",
|
||||
"idiom": "iphone",
|
||||
"filename": "Default@2x.png",
|
||||
"extent": "full-screen",
|
||||
"minimum-system-version": "7.0",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "retina4",
|
||||
"filename" : "Default-568h@2x.png",
|
||||
"minimum-system-version" : "7.0",
|
||||
"orientation" : "portrait",
|
||||
"scale" : "2x"
|
||||
"extent": "full-screen",
|
||||
"idiom": "iphone",
|
||||
"subtype": "retina4",
|
||||
"filename": "Default-568h@2x.png",
|
||||
"minimum-system-version": "7.0",
|
||||
"orientation": "portrait",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Default-Portrait.png",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "1x"
|
||||
"orientation": "portrait",
|
||||
"idiom": "ipad",
|
||||
"filename": "Default-Portrait.png",
|
||||
"extent": "full-screen",
|
||||
"minimum-system-version": "7.0",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Default-Landscape.png",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "1x"
|
||||
"orientation": "landscape",
|
||||
"idiom": "ipad",
|
||||
"filename": "Default-Landscape.png",
|
||||
"extent": "full-screen",
|
||||
"minimum-system-version": "7.0",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Default-Portrait@2x.png",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
"orientation": "portrait",
|
||||
"idiom": "ipad",
|
||||
"filename": "Default-Portrait@2x.png",
|
||||
"extent": "full-screen",
|
||||
"minimum-system-version": "7.0",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Default-Landscape@2x.png",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
"orientation": "landscape",
|
||||
"idiom": "ipad",
|
||||
"filename": "Default-Landscape@2x.png",
|
||||
"extent": "full-screen",
|
||||
"minimum-system-version": "7.0",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Default.png",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "1x"
|
||||
"orientation": "portrait",
|
||||
"idiom": "iphone",
|
||||
"filename": "Default.png",
|
||||
"extent": "full-screen",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Default@2x.png",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "2x"
|
||||
"orientation": "portrait",
|
||||
"idiom": "iphone",
|
||||
"filename": "Default@2x.png",
|
||||
"extent": "full-screen",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Default-568h@2x.png",
|
||||
"extent" : "full-screen",
|
||||
"subtype" : "retina4",
|
||||
"scale" : "2x"
|
||||
"orientation": "portrait",
|
||||
"idiom": "iphone",
|
||||
"filename": "Default-568h@2x.png",
|
||||
"extent": "full-screen",
|
||||
"subtype": "retina4",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "1x"
|
||||
"orientation": "portrait",
|
||||
"idiom": "ipad",
|
||||
"extent": "to-status-bar",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Default-Portrait.png",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "1x"
|
||||
"orientation": "portrait",
|
||||
"idiom": "ipad",
|
||||
"filename": "Default-Portrait.png",
|
||||
"extent": "full-screen",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "1x"
|
||||
"orientation": "landscape",
|
||||
"idiom": "ipad",
|
||||
"extent": "to-status-bar",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Default-Landscape.png",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "1x"
|
||||
"orientation": "landscape",
|
||||
"idiom": "ipad",
|
||||
"filename": "Default-Landscape.png",
|
||||
"extent": "full-screen",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "2x"
|
||||
"orientation": "portrait",
|
||||
"idiom": "ipad",
|
||||
"extent": "to-status-bar",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Default-Portrait@2x.png",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "2x"
|
||||
"orientation": "portrait",
|
||||
"idiom": "ipad",
|
||||
"filename": "Default-Portrait@2x.png",
|
||||
"extent": "full-screen",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "2x"
|
||||
"orientation": "landscape",
|
||||
"idiom": "ipad",
|
||||
"extent": "to-status-bar",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Default-Landscape@2x.png",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "2x"
|
||||
"orientation": "landscape",
|
||||
"idiom": "ipad",
|
||||
"filename": "Default-Landscape@2x.png",
|
||||
"extent": "full-screen",
|
||||
"scale": "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
"images": [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchScreen-AspectFill.png",
|
||||
"scale" : "1x"
|
||||
"idiom": "universal",
|
||||
"filename": "LaunchScreen-AspectFill.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchScreen-AspectFill@2x.png",
|
||||
"scale" : "2x"
|
||||
"idiom": "universal",
|
||||
"filename": "LaunchScreen-AspectFill@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchScreen-AspectFill@3x.png",
|
||||
"scale" : "3x"
|
||||
"idiom": "universal",
|
||||
"filename": "LaunchScreen-AspectFill@3x.png",
|
||||
"scale": "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
"images": [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchScreen-Center.png",
|
||||
"scale" : "1x"
|
||||
"idiom": "universal",
|
||||
"filename": "LaunchScreen-Center.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchScreen-Center@2x.png",
|
||||
"scale" : "2x"
|
||||
"idiom": "universal",
|
||||
"filename": "LaunchScreen-Center@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchScreen-Center@3x.png",
|
||||
"scale" : "3x"
|
||||
"idiom": "universal",
|
||||
"filename": "LaunchScreen-Center@3x.png",
|
||||
"scale": "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// You can add custom settings here
|
||||
// for example you can uncomment the following line to force distribution code signing
|
||||
// CODE_SIGN_IDENTITY = iPhone Distribution
|
||||
// CODE_SIGN_IDENTITY = iPhone Distribution
|
||||
// To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
|
||||
// DEVELOPMENT_TEAM = YOUR_TEAM_ID;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
|
||||
@@ -24,7 +24,7 @@ export var test_DummyTestForSnippetOnly2 = function () {
|
||||
|
||||
export var test_DummyTestForSnippetOnly3 = function () {
|
||||
// >> console-dir
|
||||
var obj = {name: "John", age: 34};
|
||||
var obj = { name: "John", age: 34 };
|
||||
console.dir(obj);
|
||||
// << console-dir
|
||||
};
|
||||
@@ -33,4 +33,4 @@ export var test_DummyTestForSnippetOnly5 = function () {
|
||||
// >> console-trace
|
||||
console.trace();
|
||||
// << console-trace
|
||||
};
|
||||
};
|
||||
|
||||
@@ -114,7 +114,7 @@ export const test_ObservableArray_popShouldRemoveTheLastElement = function () {
|
||||
// >> (hide)
|
||||
const viewBase = new Label();
|
||||
viewBase.set("testProperty", 0);
|
||||
viewBase.bind({sourceProperty: "length", targetProperty: "testProperty"}, array);
|
||||
viewBase.bind({ sourceProperty: "length", targetProperty: "testProperty" }, array);
|
||||
// << (hide)
|
||||
const result = array.pop();
|
||||
// << observable-array-join-pop
|
||||
@@ -157,7 +157,7 @@ export const test_ObservableArray_pushShouldAppendNewElement = function () {
|
||||
// >> (hide)
|
||||
const viewBase = new Label();
|
||||
viewBase.set("testProperty", 0);
|
||||
viewBase.bind({sourceProperty: "length", targetProperty: "testProperty"}, array);
|
||||
viewBase.bind({ sourceProperty: "length", targetProperty: "testProperty" }, array);
|
||||
// << (hide)
|
||||
const result = array.push(4);
|
||||
// << observable-array-push
|
||||
@@ -196,7 +196,7 @@ export const test_ObservableArray_pushShouldAppendNewElements = function () {
|
||||
// >> (hide)
|
||||
const viewBase = new Label();
|
||||
viewBase.set("testProperty", 0);
|
||||
viewBase.bind({sourceProperty: "length", targetProperty: "testProperty"}, array);
|
||||
viewBase.bind({ sourceProperty: "length", targetProperty: "testProperty" }, array);
|
||||
// << (hide)
|
||||
const result = array.push(4, 5, 6);
|
||||
// << observable-array-push-multiple
|
||||
@@ -235,7 +235,7 @@ export const test_ObservableArray_pushShouldAppendNewElementsFromSourceArray = f
|
||||
// >> (hide)
|
||||
const viewBase = new Label();
|
||||
viewBase.set("testProperty", 0);
|
||||
viewBase.bind({sourceProperty: "length", targetProperty: "testProperty"}, array);
|
||||
viewBase.bind({ sourceProperty: "length", targetProperty: "testProperty" }, array);
|
||||
// << (hide)
|
||||
const result = array.push([4, 5, 6]);
|
||||
// << observable-array-push-source
|
||||
@@ -282,7 +282,7 @@ export const test_ObservableArray_shiftShouldRemoveTheFirstElement = function ()
|
||||
// >> (hide)
|
||||
const viewBase = new Label();
|
||||
viewBase.set("testProperty", 0);
|
||||
viewBase.bind({sourceProperty: "length", targetProperty: "testProperty"}, array);
|
||||
viewBase.bind({ sourceProperty: "length", targetProperty: "testProperty" }, array);
|
||||
// << (hide)
|
||||
const result = array.shift();
|
||||
// << observable-array-shift
|
||||
@@ -354,7 +354,7 @@ export const test_ObservableArray_spliceShouldRemoveSpecifiedNumberOfElementsSta
|
||||
// >> (hide)
|
||||
const viewBase = new Label();
|
||||
viewBase.set("testProperty", 0);
|
||||
viewBase.bind({sourceProperty: "length", targetProperty: "testProperty"}, array);
|
||||
viewBase.bind({ sourceProperty: "length", targetProperty: "testProperty" }, array);
|
||||
// << (hide)
|
||||
const result = array.splice(1, 2);
|
||||
// << observable-array-splice
|
||||
@@ -430,7 +430,7 @@ export const test_ObservableArray_unshiftShouldInsertNewElementsFromTheStart = f
|
||||
// >> (hide)
|
||||
const viewBase = new Label();
|
||||
viewBase.set("testProperty", 0);
|
||||
viewBase.bind({sourceProperty: "length", targetProperty: "testProperty"}, array);
|
||||
viewBase.bind({ sourceProperty: "length", targetProperty: "testProperty" }, array);
|
||||
// << (hide)
|
||||
const result = array.unshift(4, 5);
|
||||
// << observable-array-unshift
|
||||
@@ -647,7 +647,7 @@ export const test_reduce_with_initial_value = function () {
|
||||
};
|
||||
|
||||
export const test_reduce_with_zero_as_initial_value = function () {
|
||||
const sa = [{prop: 1}, {prop: 2}, {prop: 3}];
|
||||
const sa = [{ prop: 1 }, { prop: 2 }, { prop: 3 }];
|
||||
let array: ObservableArray<any> = new ObservableArray(sa);
|
||||
const result = array.reduce((a, b) => a + b.prop, 0);
|
||||
TKUnit.assertEqual(result, 6, "ObservableArray reduce function broken when Initial Value is zero.");
|
||||
@@ -672,7 +672,7 @@ export const test_reduceRight_with_initial_value = function () {
|
||||
};
|
||||
|
||||
export const test_reduceRight_with_zero_as_initial_value = function () {
|
||||
const sa = [{prop: 1}, {prop: 2}, {prop: 3}];
|
||||
const sa = [{ prop: 1 }, { prop: 2 }, { prop: 3 }];
|
||||
let array: ObservableArray<any> = new ObservableArray(sa);
|
||||
const result = array.reduceRight((a, b) => a + b.prop, 0);
|
||||
TKUnit.assertEqual(result, 6, "ObservableArray reduceRight function broken when Initial Value is zero.");
|
||||
|
||||
@@ -71,25 +71,25 @@ previous_url: /ApiReference/data/observable-array/HOW-TO
|
||||
### Handle "change" event to know more info about the change after calling shift() method.
|
||||
{%snippet observable-array-shift-change%}
|
||||
|
||||
### Use slice() method to return array with all ObservableArray elements.
|
||||
### Use slice() method to return array with all ObservableArray elements.
|
||||
{%snippet observable-array-slice%}
|
||||
|
||||
### Use slice(star, end) method to return section of the array.
|
||||
### Use slice(star, end) method to return section of the array.
|
||||
{%snippet observable-array-slice-args%}
|
||||
|
||||
### Use sort() method to sort the array.
|
||||
### Use sort() method to sort the array.
|
||||
{%snippet observable-array-sort%}
|
||||
|
||||
### Use sort(compareFunction) method to sort the array with your own comparing logic.
|
||||
### Use sort(compareFunction) method to sort the array with your own comparing logic.
|
||||
{%snippet observable-array-sort-comparer%}
|
||||
|
||||
### Use splice(start, deleteCount) method to delete elements in the array.
|
||||
### Use splice(start, deleteCount) method to delete elements in the array.
|
||||
{%snippet observable-array-splice%}
|
||||
|
||||
### Handle "change" event to know more info about the change after calling splice(start, deleteCount) method.
|
||||
{%snippet observable-array-splice-change%}
|
||||
|
||||
### Use splice(start, deleteCount, ...arguments) method to remove and insert elements in the array.
|
||||
### Use splice(start, deleteCount, ...arguments) method to remove and insert elements in the array.
|
||||
{%snippet observable-array-splice-args%}
|
||||
|
||||
### Handle "change" event to know more info about the change after calling splice(start, deleteCount, ...arguments) method.
|
||||
|
||||
@@ -563,7 +563,7 @@ export function test_get_set_on_observables_fromObject_without_property_in_json(
|
||||
|
||||
export function test_get_set_on_observables_fromObject_with_property_in_json() {
|
||||
const array = new ObservableArray<any>();
|
||||
const vm = fromObject({ p: null});
|
||||
const vm = fromObject({ p: null });
|
||||
vm.set("p", array);
|
||||
const value1 = vm.get("p");
|
||||
const value2 = (<any>vm).p;
|
||||
|
||||
@@ -9,8 +9,8 @@ previous_url: /ApiReference/data/virtual-array/HOW-TO
|
||||
{%snippet virtual-array-require%}
|
||||
|
||||
### Handle "itemsLoading" event to load items on demand using load() method.
|
||||
Use "length" property set via VirtualArray constructor to specify total number of items,
|
||||
"loadSize" to specify number of items to be requested in a single request,
|
||||
Use "length" property set via VirtualArray constructor to specify total number of items,
|
||||
"loadSize" to specify number of items to be requested in a single request,
|
||||
"itemsLoading" event to handle items request and "load()" method to copy items into the array.
|
||||
All already loaded items are cached in -memory and when "getItem()" method is called
|
||||
the array will raise "itemsLoading" event for still not loaded items.
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"eventType":"StartElement","elementName":"DocumentElement","attributes":{"param":"value"}}{"eventType":"StartElement","elementName":"First.Element","attributes":{"some.attr":"some.value"}}{"eventType":"Text","data":"\n ¶ Some Text ®\n "}{"eventType":"EndElement","elementName":"First.Element"}{"eventType":"StartElement","elementName":"SecondElement","attributes":{"param2":"something"}}{"eventType":"Text","data":"\n Pre-Text "}{"eventType":"StartElement","elementName":"Inline"}{"eventType":"Text","data":"Inlined text"}{"eventType":"EndElement","elementName":"Inline"}{"eventType":"Text","data":" Post-text.\n "}{"eventType":"EndElement","elementName":"SecondElement"}{"eventType":"StartElement","elementName":"entities"}{"eventType":"Text","data":"Xml tags begin with \"<\" and end with \">\" Ampersand is & and apostrophe is '"}{"eventType":"EndElement","elementName":"entities"}{"eventType":"StartElement","elementName":"script"}{"eventType":"CDATA","data":"\nfunction sum(a,b)\n{\n return a+b;\n}\n"}{"eventType":"EndElement","elementName":"script"}{"eventType":"Comment","data":"\n Hello,\n I am a multi-line XML comment.\n"}{"eventType":"EndElement","elementName":"DocumentElement"}
|
||||
{"eventType":"StartElement","elementName":"DocumentElement","attributes":{"param":"value"}}{"eventType":"StartElement","elementName":"First.Element","attributes":{"some.attr":"some.value"}}{"eventType":"Text","data":"\n ¶ Some Text ®\n "}{"eventType":"EndElement","elementName":"First.Element"}{"eventType":"StartElement","elementName":"SecondElement","attributes":{"param2":"something"}}{"eventType":"Text","data":"\n Pre-Text "}{"eventType":"StartElement","elementName":"Inline"}{"eventType":"Text","data":"Inlined text"}{"eventType":"EndElement","elementName":"Inline"}{"eventType":"Text","data":" Post-text.\n "}{"eventType":"EndElement","elementName":"SecondElement"}{"eventType":"StartElement","elementName":"entities"}{"eventType":"Text","data":"Xml tags begin with \"<\" and end with \">\" Ampersand is & and apostrophe is '"}{"eventType":"EndElement","elementName":"entities"}{"eventType":"StartElement","elementName":"script"}{"eventType":"CDATA","data":"\nfunction sum(a,b)\n{\n return a+b;\n}\n"}{"eventType":"EndElement","elementName":"script"}{"eventType":"Comment","data":"\n Hello,\n I am a multi-line XML comment.\n"}{"eventType":"EndElement","elementName":"DocumentElement"}
|
||||
|
||||
@@ -239,8 +239,8 @@ function _testIOSSpecificKnownFolder(knownFolderName: string) {
|
||||
}
|
||||
else {
|
||||
TKUnit.assertThrows(testFunc,
|
||||
`Trying to retrieve the ${knownFolderName} known folder on a platform different from iOS should throw!`,
|
||||
`The "${knownFolderName}" known folder is available on iOS only!`);
|
||||
`Trying to retrieve the ${knownFolderName} known folder on a platform different from iOS should throw!`,
|
||||
`The "${knownFolderName}" known folder is available on iOS only!`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -574,7 +574,7 @@ export function test_FileSize(done) {
|
||||
|
||||
return file.remove();
|
||||
}).then(() => done())
|
||||
.catch(done);
|
||||
.catch(done);
|
||||
}
|
||||
|
||||
export function test_UnlockAfterWrite(done) {
|
||||
@@ -586,17 +586,17 @@ export function test_UnlockAfterWrite(done) {
|
||||
|
||||
return file.remove();
|
||||
}).then(() => done())
|
||||
.catch(done);
|
||||
.catch(done);
|
||||
}
|
||||
|
||||
export function test_CreateParentOnNewFile(done) {
|
||||
var documentsFolderName = fs.knownFolders.documents().path;
|
||||
var tempFileName = fs.path.join(documentsFolderName, "folder1", "folder2", "Test_File_Create_Parent.txt");
|
||||
var file = fs.File.fromPath(tempFileName);
|
||||
file.writeText("Hello World!").then(() => {
|
||||
file.writeText("Hello World!").then(() => {
|
||||
return fs.knownFolders.documents().getFolder("folder1").remove();
|
||||
}).then(() => done())
|
||||
.catch(done);
|
||||
.catch(done);
|
||||
}
|
||||
|
||||
export function test_FolderClear_RemovesEmptySubfolders(done) {
|
||||
|
||||
@@ -8,20 +8,20 @@ export function test_global_system_import() {
|
||||
|
||||
TKUnit.assert((<any>global).System, "global.System not defined");
|
||||
TKUnit.assert(typeof (<any>global).System.import === "function", "global.System.import not a function");
|
||||
}
|
||||
}
|
||||
|
||||
export function test_global_zonedCallback() {
|
||||
TKUnit.assert(typeof zonedCallback === "function", "zonedCallback not defined");
|
||||
TKUnit.assert(typeof global.zonedCallback === "function", "global.zonedCallback not a function");
|
||||
}
|
||||
}
|
||||
|
||||
export function test_global_moduleMerge() {
|
||||
TKUnit.assert(typeof global.moduleMerge === "function", "global.moduleMerge not a function");
|
||||
}
|
||||
}
|
||||
|
||||
export function test_global_registerModule() {
|
||||
TKUnit.assert(typeof global.registerModule === "function", "global.registerModule not a function");
|
||||
}
|
||||
}
|
||||
|
||||
export function test_global_registerWebpackModules() {
|
||||
TKUnit.assert(typeof global.registerWebpackModules === "function", "global.registerWebpackModules not a function");
|
||||
|
||||
@@ -128,7 +128,7 @@ export var test_getJSON_fail_when_result_is_not_JSONP = function (done) {
|
||||
});
|
||||
};
|
||||
|
||||
export var test_gzip_request_explicit = function(done) {
|
||||
export var test_gzip_request_explicit = function (done) {
|
||||
var result;
|
||||
|
||||
http.request({
|
||||
@@ -136,7 +136,8 @@ export var test_gzip_request_explicit = function(done) {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Accept-Encoding": "gzip"
|
||||
}}).then(function (r) {
|
||||
}
|
||||
}).then(function (r) {
|
||||
result = r;
|
||||
try {
|
||||
TKUnit.assert(typeof (JSON.stringify(result)) === "string", "Result from gzipped stream should be valid JSON object!");
|
||||
@@ -150,12 +151,13 @@ export var test_gzip_request_explicit = function(done) {
|
||||
});
|
||||
};
|
||||
|
||||
export var test_gzip_request_implicit = function(done) {
|
||||
export var test_gzip_request_implicit = function (done) {
|
||||
var result;
|
||||
|
||||
http.request({
|
||||
url: "https://postman-echo.com/gzip",
|
||||
method: "GET"}).then(function (r) {
|
||||
method: "GET"
|
||||
}).then(function (r) {
|
||||
result = r;
|
||||
try {
|
||||
TKUnit.assert(typeof (JSON.stringify(result)) === "string", "Result from gzipped stream should be valid JSON object!");
|
||||
@@ -634,12 +636,12 @@ export var test_request_jsonAsContentSentAndReceivedProperly = function (done) {
|
||||
};
|
||||
|
||||
declare var Worker: any;
|
||||
export var test_getString_WorksProperlyInWorker = function(done) {
|
||||
export var test_getString_WorksProperlyInWorker = function (done) {
|
||||
let worker = new Worker("./http-string-worker");
|
||||
worker.onmessage = function(msg) {
|
||||
worker.onmessage = function (msg) {
|
||||
done();
|
||||
};
|
||||
worker.onerror = function(e) {
|
||||
worker.onerror = function (e) {
|
||||
done(e);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -14,4 +14,4 @@ export function imageSourceFromAsset(imageAsset) {
|
||||
}
|
||||
});
|
||||
}
|
||||
// << imagesource-from-imageasset-save-to
|
||||
// << imagesource-from-imageasset-save-to
|
||||
|
||||
@@ -53,4 +53,4 @@ The supported formats are `png`, `jpeg`, and `jpg`. The quality parameter is opt
|
||||
|
||||
### Creating PNG image file from base64 string
|
||||
The method `fromBase64(source: string): Promise<boolean>` loads this instance from the specified base64 encoded string asynchronously.
|
||||
{%snippet imagesource-from-base-string%}
|
||||
{%snippet imagesource-from-base-string%}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
Button, Label {
|
||||
Button,
|
||||
Label {
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
Button, Label {
|
||||
Button,
|
||||
Label {
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
Button, Label {
|
||||
Button,
|
||||
Label {
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Button {
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Button {
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<Page loaded="onLoaded">
|
||||
|
||||
|
||||
</Page>
|
||||
|
||||
@@ -1 +1 @@
|
||||
other.xml
|
||||
other.xml
|
||||
|
||||
@@ -1 +1 @@
|
||||
test.minWH300.xml
|
||||
test.minWH300.xml
|
||||
|
||||
@@ -1 +1 @@
|
||||
test.monWH450.xml
|
||||
test.monWH450.xml
|
||||
|
||||
@@ -1 +1 @@
|
||||
test.xml
|
||||
test.xml
|
||||
|
||||
2
tests/app/navigation/custom-transition.d.ts
vendored
2
tests/app/navigation/custom-transition.d.ts
vendored
@@ -3,4 +3,4 @@ import { Transition } from "tns-core-modules/ui/transition";
|
||||
export class CustomTransition extends Transition {
|
||||
constructor();
|
||||
constructor(duration: number, curve: any);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,4 +34,4 @@
|
||||
<GridLayout id="test-element" row="1">
|
||||
</GridLayout>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -81,4 +81,4 @@
|
||||
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -41,7 +41,7 @@ export function createPage() {
|
||||
lv.height = 200;
|
||||
lv.items = data;
|
||||
lv.on(list.ListView.itemLoadingEvent, (args: list.ItemEventData) => {
|
||||
var btn = <button.Button> args.view;
|
||||
var btn = <button.Button>args.view;
|
||||
if (!btn) {
|
||||
btn = new button.Button();
|
||||
args.view = btn;
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
{ "name" : "testsapp",
|
||||
"main" : "app.js" }
|
||||
{
|
||||
"name": "testsapp",
|
||||
"main": "app.js"
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<StackLayout>
|
||||
<Label text="resource:" />
|
||||
<Image src="res://icon" stretch="none" horizontalAlignment="left"/>
|
||||
|
||||
|
||||
<Label text="url:" />
|
||||
<Image src="http://www.google.com/images/errors/logo_sm_2.png" stretch="none" horizontalAlignment="left"/>
|
||||
|
||||
|
||||
<Label text="app file:" />
|
||||
<Image src="~/logo.png" stretch="none" horizontalAlignment="left" />
|
||||
</StackLayout>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Page loaded="pageLoaded" title="MyPageTitle" icon="res://icon">
|
||||
|
||||
|
||||
<StackLayout>
|
||||
<Button text="button" tap="buttonTap"/>
|
||||
</StackLayout>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
</TabViewItem>
|
||||
</TabView.items>
|
||||
</TabView>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<Page loaded="onLoaded">
|
||||
<ListView items="{{ $value }}" verticalAlignment="top" />
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
<StackLayout>
|
||||
<Button tap="onTap" text="Show Modal Page"/>
|
||||
</StackLayout>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -18,41 +18,41 @@ export function createPage() {
|
||||
btn.verticalAlignment = vAligns[(count++) % 4];
|
||||
});
|
||||
|
||||
//export function performanceTest() {
|
||||
// var testBtn = new buttons.Button();
|
||||
// var i = 0;
|
||||
// var tmp;
|
||||
// var start;
|
||||
// var end;
|
||||
//export function performanceTest() {
|
||||
// var testBtn = new buttons.Button();
|
||||
// var i = 0;
|
||||
// var tmp;
|
||||
// var start;
|
||||
// var end;
|
||||
|
||||
// start = new Date().getTime();
|
||||
// for (i = 0; i < 1000000; i++) {
|
||||
// tmp = testBtn.verticalAlignment;
|
||||
// }
|
||||
// end = new Date().getTime();
|
||||
// console.log("GET from STYLE time: " + (end - start));
|
||||
// start = new Date().getTime();
|
||||
// for (i = 0; i < 1000000; i++) {
|
||||
// tmp = testBtn.verticalAlignment;
|
||||
// }
|
||||
// end = new Date().getTime();
|
||||
// console.log("GET from STYLE time: " + (end - start));
|
||||
|
||||
// start = new Date().getTime();
|
||||
// for (i = 0; i < 1000000; i++) {
|
||||
// tmp = testBtn.horizontalAlignment;
|
||||
// }
|
||||
// end = new Date().getTime();
|
||||
// console.log("GET from LayoutInfo time: " + (end - start));
|
||||
// start = new Date().getTime();
|
||||
// for (i = 0; i < 1000000; i++) {
|
||||
// tmp = testBtn.horizontalAlignment;
|
||||
// }
|
||||
// end = new Date().getTime();
|
||||
// console.log("GET from LayoutInfo time: " + (end - start));
|
||||
|
||||
// start = new Date().getTime();
|
||||
// for (i = 0; i < 1000000; i++) {
|
||||
// testBtn.verticalAlignment = vAligns[i % 4];
|
||||
// }
|
||||
// end = new Date().getTime();
|
||||
// console.log("SET to STYLE time: " + (end - start));
|
||||
// start = new Date().getTime();
|
||||
// for (i = 0; i < 1000000; i++) {
|
||||
// testBtn.verticalAlignment = vAligns[i % 4];
|
||||
// }
|
||||
// end = new Date().getTime();
|
||||
// console.log("SET to STYLE time: " + (end - start));
|
||||
|
||||
// start = new Date().getTime();
|
||||
// for (i = 0; i < 1000000; i++) {
|
||||
// testBtn.horizontalAlignment = hAligns[i % 4];
|
||||
// }
|
||||
// end = new Date().getTime();
|
||||
// console.log("SET from LayoutInfo time: " + (end - start));
|
||||
// }
|
||||
// start = new Date().getTime();
|
||||
// for (i = 0; i < 1000000; i++) {
|
||||
// testBtn.horizontalAlignment = hAligns[i % 4];
|
||||
// }
|
||||
// end = new Date().getTime();
|
||||
// console.log("SET from LayoutInfo time: " + (end - start));
|
||||
// }
|
||||
|
||||
page.content = btn;
|
||||
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
<Button text="test big" tag="test-big" tap="navigate" />
|
||||
<Button text="telerik next session" tag="telerik-next-session" tap="navigate" />
|
||||
</StackLayout>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -51,4 +51,4 @@
|
||||
<Button text="5button8" />
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
<Button text="button7" />
|
||||
<Button text="button8" />
|
||||
</StackLayout>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -26,4 +26,4 @@
|
||||
</TabViewItem>
|
||||
</TabView.items>
|
||||
</TabView>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -80,7 +80,7 @@ export function test_setTimeout_callbackCalledWithBooleanPeriod() {
|
||||
// >> (hide)
|
||||
completed = true;
|
||||
// << (hide)
|
||||
// @ts-ignore
|
||||
// @ts-ignore
|
||||
}, false);
|
||||
// << timer-set-false
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ export function test_trace_error_should_pass_errors() {
|
||||
}
|
||||
});
|
||||
traceError(testError);
|
||||
|
||||
|
||||
TKUnit.assert(called, "trace.error() should call handler;");
|
||||
TKUnit.assertDeepEqual(actualError, testError);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ export var test_DummyTestForSnippetOnly1 = function () {
|
||||
, trace.categories.Style
|
||||
, trace.categories.ViewHierarchy
|
||||
, trace.categories.VisualTreeEvents
|
||||
));
|
||||
));
|
||||
trace.enable();
|
||||
// << trace-specific-categories
|
||||
};
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
<StackLayout>
|
||||
<Label text="page content"/>
|
||||
</StackLayout>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
<StackLayout>
|
||||
<Button text="Click me" />
|
||||
</StackLayout>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
<StackLayout>
|
||||
<Button text="Click me" />
|
||||
</StackLayout>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -421,4 +421,4 @@ export function createPageAndNavigate() {
|
||||
|
||||
export function test_recycling() {
|
||||
helper.nativeView_recycling_test(() => new actionBarModule.ActionBar());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* tslint:disable */
|
||||
//@private
|
||||
import * as android from "./action-bar-tests.android";
|
||||
import * as iOS from "./action-bar-tests.ios";
|
||||
import * as iOS from "./action-bar-tests.ios";
|
||||
|
||||
@@ -66,7 +66,7 @@ if (platform.device.os === platform.platformNames.ios) {
|
||||
/* tslint:disable:no-unused-variable */
|
||||
function binding_busy_to_image() {
|
||||
/* tslint:enable:no-unused-variable */
|
||||
|
||||
|
||||
// >> activity-indicator-loading
|
||||
var image = new imageModule.Image();
|
||||
var indicator = new activityIndicatorModule.ActivityIndicator();
|
||||
|
||||
@@ -501,10 +501,10 @@ export function test_AnimateExtent_Should_ThrowIfCannotParsePercentLength() {
|
||||
const label = new Label();
|
||||
helper.buildUIAndRunTest(label, (views: Array<viewModule.View>) => {
|
||||
TKUnit.assertThrows(() => {
|
||||
label.animate({width: "-frog%"});
|
||||
label.animate({ width: "-frog%" });
|
||||
}, "Invalid percent string should throw");
|
||||
TKUnit.assertThrows(() => {
|
||||
label.animate({height: "-frog%"});
|
||||
label.animate({ height: "-frog%" });
|
||||
}, "Invalid percent string should throw");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ function createAnimationFromCSS(css: string, name: string): keyframeAnimation.Ke
|
||||
}
|
||||
|
||||
function findSelectorInScope(scope: styleScope.StyleScope, cssClass: string): SelectorCore {
|
||||
let selectors = scope.query({cssClasses: new Set([cssClass])});
|
||||
let selectors = scope.query({ cssClasses: new Set([cssClass]) });
|
||||
|
||||
return selectors[0];
|
||||
}
|
||||
@@ -426,12 +426,12 @@ export function test_AnimationCurveInKeyframes() {
|
||||
function getTransformsValues(declarations) {
|
||||
return Object.assign({},
|
||||
...(<any>Object).entries(getTransforms(declarations))
|
||||
.map(([k, v]) => ({[k]: v.value}))
|
||||
.map(([k, v]) => ({ [k]: v.value }))
|
||||
);
|
||||
}
|
||||
|
||||
function getTransforms(declarations) {
|
||||
const [ translate, rotate, scale ] = [...declarations];
|
||||
const [translate, rotate, scale] = [...declarations];
|
||||
|
||||
return { translate, rotate, scale };
|
||||
}
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
@keyframes test {
|
||||
from { background-color: red; }
|
||||
50% { background-color: yellow; }
|
||||
to { background-color: green; }
|
||||
}
|
||||
from {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
50% {
|
||||
background-color: yellow;
|
||||
}
|
||||
|
||||
to {
|
||||
background-color: green;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,4 +5,4 @@ import * as helper from "../../ui-helper";
|
||||
|
||||
export function test_recycling() {
|
||||
helper.nativeView_recycling_test(() => new Border());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,4 +37,4 @@ export function getOriginalFont(tabView: BottomNavigation): any {
|
||||
typeface: tv.getTypeface(),
|
||||
size: tv.getTextSize()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,4 +5,4 @@ export function getNativeTabCount(tabView: BottomNavigation): number;
|
||||
export function selectNativeTab(tabView: BottomNavigation, index: number): void;
|
||||
export function getNativeSelectedIndex(tabView: BottomNavigation): number;
|
||||
export function getNativeFont(tabView: BottomNavigation): any;
|
||||
export function getOriginalFont(tabView: BottomNavigation): any;
|
||||
export function getOriginalFont(tabView: BottomNavigation): any;
|
||||
|
||||
@@ -427,7 +427,7 @@ export function testCustomComponentWithCode_JsCssQualifiers() {
|
||||
}
|
||||
|
||||
function loadRightComponentXmlWithCodeFileAndCssFile() {
|
||||
return `<Button
|
||||
return `<Button
|
||||
codeFile="${testPrefix}/component/custom-code-component.js"
|
||||
cssFile="${testPrefix}/component/custom-code-component.css"
|
||||
id="test-id" class="test-class" text="right" tap="testEvent"/>`;
|
||||
|
||||
@@ -103,7 +103,7 @@ export function test_listenerDoesNotRetainTarget(done) {
|
||||
|
||||
// with the v8 6.5 the GC does not release WeakRefs so fast if you pass them to a method
|
||||
// that's why we are making the call to the addWeakEventListener in a closure so that the WeakRef will be easier released
|
||||
(function() {
|
||||
(function () {
|
||||
addWeakEventListener(sourceRef.get(), Observable.propertyChangeEvent, emptyHandler, targetRef.get());
|
||||
})();
|
||||
forceGC();
|
||||
@@ -123,7 +123,7 @@ export function test_listenerDoesNotRetainSource(done) {
|
||||
|
||||
// with the v8 6.5 the GC does not release WeakRefs so fast if you pass them to a method
|
||||
// that's why we are making the call to the addWeakEventListener in a closure so that the WeakRef will be easier released
|
||||
(function() {
|
||||
(function () {
|
||||
addWeakEventListener(sourceRef.get(), Observable.propertyChangeEvent, targetRef.get().onEvent, targetRef.get());
|
||||
})();
|
||||
forceGC();
|
||||
|
||||
@@ -49,21 +49,21 @@ export class DatePickerTest extends testModule.UITest<datePickerModule.DatePicke
|
||||
|
||||
return datePicker;
|
||||
}
|
||||
|
||||
|
||||
private setUpDatePicker(year?: number, month?: number, day?: number) {
|
||||
if (year) {
|
||||
this.testView.year = year;
|
||||
}
|
||||
|
||||
|
||||
if (month) {
|
||||
this.testView.month = month;
|
||||
}
|
||||
|
||||
|
||||
if (day) {
|
||||
this.testView.day = day;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public test_DummyForCodeSnippet() {
|
||||
const datePicker = new datePickerModule.DatePicker();
|
||||
// >> date-picker-configure
|
||||
@@ -74,14 +74,14 @@ export class DatePickerTest extends testModule.UITest<datePickerModule.DatePicke
|
||||
datePicker.maxDate = new Date(2045, 4, 12);
|
||||
// << date-picker-configure
|
||||
}
|
||||
|
||||
|
||||
public test_set_color() {
|
||||
if (platform.device.os === platform.platformNames.ios) {
|
||||
this.testView.color = new color.Color("red");
|
||||
TKUnit.assertEqual(this.testView.color.ios.CGColor, this.testView.ios.valueForKey("textColor").CGColor, "datePicker.color");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public test_WhenCreated_YearIsCurrentYear() {
|
||||
const actualValue = this.testView.year;
|
||||
const expectedValue = currentDate.getFullYear();
|
||||
@@ -138,69 +138,69 @@ export class DatePickerTest extends testModule.UITest<datePickerModule.DatePicke
|
||||
const actualValue = datePickerTestsNative.getNativeDay(this.testView);
|
||||
TKUnit.assertEqual(actualValue, expectedValue);
|
||||
}
|
||||
|
||||
|
||||
public test_DateIsSetCorrectlyWhenDayIsSet() {
|
||||
const today = new Date(2016, 3, 15);
|
||||
this.testView.year = today.getFullYear();
|
||||
this.testView.month = today.getMonth();
|
||||
const expectedValue = today.getDate();
|
||||
this.testView.day = expectedValue;
|
||||
|
||||
|
||||
const expectedDate = new Date(today.getFullYear(), today.getMonth() - 1, expectedValue);
|
||||
TKUnit.assertEqual(this.testView.date.getDate(), expectedDate.getDate(), "Getting Day from date property failed.");
|
||||
TKUnit.assertEqual(this.testView.date.getMonth(), expectedDate.getMonth(), "Getting Month from date property failed.");
|
||||
TKUnit.assertEqual(this.testView.date.getFullYear(), expectedDate.getFullYear(), "Getting Year from date property failed.");
|
||||
}
|
||||
|
||||
|
||||
public test_DateIsSetCorrectlyWhenMonthIsSet() {
|
||||
const today = new Date(2016, 3, 15);
|
||||
this.testView.year = today.getFullYear();
|
||||
this.testView.day = today.getDate();
|
||||
|
||||
|
||||
const expectedValue = today.getMonth();
|
||||
this.testView.month = expectedValue;
|
||||
const expectedDate = new Date(today.getFullYear(), expectedValue - 1, today.getDate());
|
||||
|
||||
|
||||
TKUnit.assertEqual(this.testView.date.getDate(), expectedDate.getDate(), "Getting Day from date property failed.");
|
||||
TKUnit.assertEqual(this.testView.date.getMonth(), expectedDate.getMonth(), "Getting Month from date property failed.");
|
||||
TKUnit.assertEqual(this.testView.date.getFullYear(), expectedDate.getFullYear(), "Getting Year from date property failed.");
|
||||
}
|
||||
|
||||
|
||||
public test_DateIsSetCorrectlyWhenYearIsSet() {
|
||||
const current = new Date(2016, 3, 15);
|
||||
this.testView.month = current.getMonth();
|
||||
this.testView.day = current.getDate();
|
||||
|
||||
|
||||
const expectedValue = 1980;
|
||||
this.testView.year = expectedValue;
|
||||
const expectedDate = new Date(1980, current.getMonth() - 1, current.getDate());
|
||||
|
||||
|
||||
TKUnit.assertEqual(this.testView.date.getDate(), expectedDate.getDate(), "Getting Day from date property failed.");
|
||||
TKUnit.assertEqual(this.testView.date.getMonth(), expectedDate.getMonth(), "Getting Month from date property failed.");
|
||||
TKUnit.assertEqual(this.testView.date.getFullYear(), expectedDate.getFullYear(), "Getting Year from date property failed.");
|
||||
}
|
||||
|
||||
|
||||
public testMaxDateFromLocalToNative() {
|
||||
const expectedValue = new Date(1980, 1, 9);
|
||||
this.testView.maxDate = expectedValue;
|
||||
const actualValue = datePickerTestsNative.getNativeMaxDate(this.testView);
|
||||
TKUnit.assertEqual(actualValue.getTime(), expectedValue.getTime());
|
||||
}
|
||||
|
||||
|
||||
public testMinDateFromLocalToNative() {
|
||||
const expectedValue = new Date(1980, 1, 9);
|
||||
this.testView.minDate = expectedValue;
|
||||
const actualValue = datePickerTestsNative.getNativeMinDate(this.testView);
|
||||
TKUnit.assertEqual(actualValue.getTime(), expectedValue.getTime());
|
||||
}
|
||||
|
||||
|
||||
public testYearFromNativeToLocal() {
|
||||
const expectedValue = 1981;
|
||||
datePickerTestsNative.setNativeYear(this.testView, expectedValue);
|
||||
const actualValue = this.testView.year;
|
||||
TKUnit.assertEqual(actualValue, expectedValue);
|
||||
}
|
||||
|
||||
|
||||
public testMonthFromNativeToLocal() {
|
||||
// Use July as it has 31 days
|
||||
const expectedValue = 7;
|
||||
@@ -208,7 +208,7 @@ export class DatePickerTest extends testModule.UITest<datePickerModule.DatePicke
|
||||
const actualValue = this.testView.month;
|
||||
TKUnit.assertEqual(actualValue, expectedValue);
|
||||
}
|
||||
|
||||
|
||||
public testYearMonthDayFromNativeToLocal() {
|
||||
const testYear = 2000;
|
||||
const testMonth = 3;
|
||||
@@ -217,67 +217,67 @@ export class DatePickerTest extends testModule.UITest<datePickerModule.DatePicke
|
||||
datePickerTestsNative.setNativeDate(this.testView, testYear, testMonth, testDay);
|
||||
assertDate(this.testView, testYear, testMonth, testDay);
|
||||
}
|
||||
|
||||
|
||||
public testDayFromNativeToLocal() {
|
||||
const expectedValue = 20;
|
||||
datePickerTestsNative.setNativeDay(this.testView, expectedValue);
|
||||
const actualValue = this.testView.day;
|
||||
TKUnit.assert(actualValue === expectedValue, "Actual: " + actualValue + "; Expected: " + expectedValue);
|
||||
}
|
||||
|
||||
|
||||
public test_DateFromNativeToLocalWithDay() {
|
||||
const today = new Date();
|
||||
const expectedValue = 20;
|
||||
|
||||
|
||||
datePickerTestsNative.setNativeDate(this.testView, today.getFullYear(), today.getMonth(), expectedValue);
|
||||
|
||||
|
||||
const expectedDate = new Date(today.getFullYear(), today.getMonth() - 1, expectedValue);
|
||||
TKUnit.assertEqual(this.testView.date.getDate(), expectedDate.getDate(), "Getting Day from date property failed.");
|
||||
TKUnit.assertEqual(this.testView.date.getMonth(), expectedDate.getMonth(), "Getting Month from date property failed.");
|
||||
TKUnit.assertEqual(this.testView.date.getFullYear(), expectedDate.getFullYear(), "Getting Year from date property failed.");
|
||||
}
|
||||
|
||||
|
||||
public test_DateFromNativeToLocalWithMonth() {
|
||||
const today = new Date();
|
||||
const expectedValue = 7;
|
||||
|
||||
|
||||
datePickerTestsNative.setNativeDate(this.testView, today.getFullYear(), expectedValue, today.getDate());
|
||||
|
||||
|
||||
const expectedDate = new Date(today.getFullYear(), expectedValue - 1, today.getDate());
|
||||
TKUnit.assertEqual(this.testView.date.getDate(), expectedDate.getDate(), "Getting Day from date property failed.");
|
||||
TKUnit.assertEqual(this.testView.date.getMonth(), expectedDate.getMonth(), "Getting Month from date property failed.");
|
||||
TKUnit.assertEqual(this.testView.date.getFullYear(), expectedDate.getFullYear(), "Getting Year from date property failed.");
|
||||
}
|
||||
|
||||
|
||||
public test_DateFromNativeToLocalWithYear() {
|
||||
const today = new Date();
|
||||
|
||||
|
||||
const expectedValue = 1981;
|
||||
datePickerTestsNative.setNativeDate(this.testView, expectedValue, today.getMonth(), today.getDate());
|
||||
|
||||
|
||||
const expectedDate = new Date(expectedValue, today.getMonth() - 1, today.getDate());
|
||||
TKUnit.assertEqual(this.testView.date.getDate(), expectedDate.getDate(), "Getting Day from date property failed.");
|
||||
TKUnit.assertEqual(this.testView.date.getMonth(), expectedDate.getMonth(), "Getting Month from date property failed.");
|
||||
TKUnit.assertEqual(this.testView.date.getFullYear(), expectedDate.getFullYear(), "Getting Year from date property failed.");
|
||||
}
|
||||
|
||||
|
||||
public test_DateFromNativeToLocalWithAll() {
|
||||
const testYear = 2000;
|
||||
const testMonth = 3;
|
||||
const testDay = 24;
|
||||
|
||||
|
||||
datePickerTestsNative.setNativeDate(this.testView, testYear, testMonth, testDay);
|
||||
const expectedDate = new Date(testYear, testMonth - 1, testDay);
|
||||
TKUnit.assertEqual(this.testView.date.getDate(), expectedDate.getDate(), "Getting Day from date property failed.");
|
||||
TKUnit.assertEqual(this.testView.date.getMonth(), expectedDate.getMonth(), "Getting Month from date property failed.");
|
||||
TKUnit.assertEqual(this.testView.date.getFullYear(), expectedDate.getFullYear(), "Getting Year from date property failed.");
|
||||
}
|
||||
|
||||
|
||||
public testSetYearMonthDay_BeforeLoaded() {
|
||||
const testYear = 2000;
|
||||
const testMonth = 3;
|
||||
const testDay = 24;
|
||||
|
||||
|
||||
this.setUpDatePicker(testYear, testMonth, testDay);
|
||||
|
||||
TKUnit.assertEqual(this.testView.year, testYear, "datePicker.year");
|
||||
@@ -288,16 +288,16 @@ export class DatePickerTest extends testModule.UITest<datePickerModule.DatePicke
|
||||
TKUnit.assertEqual(datePickerTestsNative.getNativeMonth(this.testView), testMonth, "Native datePicker.month");
|
||||
TKUnit.assertEqual(datePickerTestsNative.getNativeDay(this.testView), testDay, "Native datePicker.day");
|
||||
}
|
||||
|
||||
|
||||
public testSetYearMonthDay_AfterLoaded() {
|
||||
const testYear = 2000;
|
||||
const testMonth = 3;
|
||||
const testDay = 24;
|
||||
|
||||
|
||||
this.testView.year = testYear;
|
||||
this.testView.month = testMonth;
|
||||
this.testView.day = testDay;
|
||||
|
||||
|
||||
this.waitUntilTestElementIsLoaded();
|
||||
assertDate(this.testView, testYear, testMonth, testDay);
|
||||
}
|
||||
|
||||
@@ -11,9 +11,9 @@ export function test_percent_width_and_height_set_to_page_support() {
|
||||
(<any>currentPage).width = "50%";
|
||||
(<any>currentPage).height = "50%";
|
||||
|
||||
TKUnit.waitUntilReady(() => {
|
||||
return currentPage.isLayoutValid;
|
||||
}, 1);
|
||||
TKUnit.waitUntilReady(() => {
|
||||
return currentPage.isLayoutValid;
|
||||
}, 1);
|
||||
|
||||
let topFrameWidth = topFrame.getMeasuredWidth();
|
||||
let topFrameHeight = topFrame.getMeasuredHeight();
|
||||
@@ -37,9 +37,9 @@ export function test_percent_margin_set_to_page_support() {
|
||||
let currentPage = topFrame.currentPage;
|
||||
currentPage.margin = "10%";
|
||||
|
||||
TKUnit.waitUntilReady(() => {
|
||||
return currentPage.isLayoutValid;
|
||||
}, 1);
|
||||
TKUnit.waitUntilReady(() => {
|
||||
return currentPage.isLayoutValid;
|
||||
}, 1);
|
||||
|
||||
let topFrameWidth = topFrame.getMeasuredWidth();
|
||||
let topFrameHeight = topFrame.getMeasuredHeight();
|
||||
@@ -63,4 +63,4 @@ export function test_percent_margin_set_to_page_support() {
|
||||
TKUnit.assertTrue(PercentLength.equals(currentPage.marginTop, 0));
|
||||
TKUnit.assertTrue(PercentLength.equals(currentPage.marginRight, 0));
|
||||
TKUnit.assertTrue(PercentLength.equals(currentPage.marginBottom, 0));
|
||||
}
|
||||
}
|
||||
|
||||
2
tests/app/ui/frame/frame-tests.d.ts
vendored
2
tests/app/ui/frame/frame-tests.d.ts
vendored
@@ -1,3 +1,3 @@
|
||||
/* tslint:disable */
|
||||
//@private
|
||||
import * as android from "./frame-tests.android";
|
||||
import * as android from "./frame-tests.android";
|
||||
|
||||
@@ -1 +1 @@
|
||||
export * from "./frame-tests-common";
|
||||
export * from "./frame-tests-common";
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as TKUnit from "../../tk-unit";
|
||||
|
||||
const sdkVersion = lazy(() => parseInt(device.sdkVersion));
|
||||
|
||||
export const test_ImageCache_ValidUrl = function() {
|
||||
export const test_ImageCache_ValidUrl = function () {
|
||||
// see https://github.com/NativeScript/NativeScript/issues/6643
|
||||
if (sdkVersion() < 20) {
|
||||
return;
|
||||
@@ -46,7 +46,7 @@ export const test_ImageCache_ValidUrl = function() {
|
||||
TKUnit.assertEqual(validKey, url, "Key should equal the provided url");
|
||||
};
|
||||
|
||||
export const test_ImageCache_NothingAtProvidedUrl = function() {
|
||||
export const test_ImageCache_NothingAtProvidedUrl = function () {
|
||||
const cache = new imageCacheModule.Cache();
|
||||
cache.maxRequests = 5;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ previous_url: /ApiReference/ui/image/HOW-TO
|
||||
|
||||
# Image
|
||||
|
||||
The purpose of this article is to show the basic functionality of the Image view. The snippets demonstrates some scenarios and the usage of the ImageView specifics properties
|
||||
The purpose of this article is to show the basic functionality of the Image view. The snippets demonstrates some scenarios and the usage of the ImageView specifics properties
|
||||
|
||||
* [Binding image source property](#binding-image-source-property)
|
||||
* [Loading an image from app resources](#loading-an-image-from-app-resources)
|
||||
@@ -62,7 +62,7 @@ The example demonstrates how we could load an image, which is available in the A
|
||||
``` XML
|
||||
<Page>
|
||||
<StackLayout>
|
||||
{%raw%}<Image src="http://www.google.com/images/errors/logo_sm_2.png" stretch ="none" />{%endraw%}
|
||||
{%raw%}<Image src="http://www.google.com/images/errors/logo_sm_2.png" stretch ="none" />{%endraw%}
|
||||
</StackLayout>
|
||||
</Page>
|
||||
```
|
||||
@@ -83,13 +83,13 @@ The sample above, demonstrates, how to load an image source while providing URL
|
||||
|
||||
{%snippet img-create-local%}
|
||||
|
||||
The Image source could be load also from a local file. The path to the image should start with a tilde(`~`) as it is shown in the example above. Using `~/` prefix, we can load images relative to the project `app` folder
|
||||
The Image source could be load also from a local file. The path to the image should start with a tilde(`~`) as it is shown in the example above. Using `~/` prefix, we can load images relative to the project `app` folder
|
||||
|
||||
### Loading an image from Data URI
|
||||
|
||||
{%snippet img-create-datauri%}
|
||||
|
||||
In the sample code is shown, how to load an image source data, while using data URI.
|
||||
In the sample code is shown, how to load an image source data, while using data URI.
|
||||
|
||||
### Setting image stretching
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
label {
|
||||
background-color: red;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
label {
|
||||
<!--Test wrong comment-->
|
||||
background-color: red;
|
||||
< !--Test wrong comment-->background-color: red;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export class AbsoluteLayoutTest extends testModule.UITest<absoluteLayoutModule.A
|
||||
absoluteLayout.height = { value: 230, unit: "px" };
|
||||
absoluteLayout.style.backgroundColor = new colorModule.Color("LightGray");
|
||||
let label = new labelModule.Label();
|
||||
|
||||
|
||||
absoluteLayoutModule.AbsoluteLayout.setLeft(label, layoutHelper.dp(10));
|
||||
absoluteLayoutModule.AbsoluteLayout.setTop(label, layoutHelper.dp(10));
|
||||
label.width = { value: 100, unit: "px" };
|
||||
|
||||
@@ -56,13 +56,15 @@ import { Label } from "tns-core-modules/ui/label";
|
||||
import * as TKUnit from "../../tk-unit";
|
||||
import * as helper from "../../ui-helper";
|
||||
import { parse } from "tns-core-modules/ui/builder";
|
||||
import { dipToDp, left, top, right, bottom, height, width,
|
||||
import {
|
||||
dipToDp, left, top, right, bottom, height, width,
|
||||
paddingLeft, paddingTop, paddingRight, paddingBottom,
|
||||
equal, closeEnough, notEqual, check,
|
||||
heightEqual, widthEqual,
|
||||
isLeftAlignedWith, isRightAlignedWith, isTopAlignedWith, isBottomAlignedWith,
|
||||
isLeftOf, isRightOf, isBelow, isAbove,
|
||||
isLeftWith, isAboveWith, isRightWith, isBelowWith } from "./layout-tests-helper";
|
||||
isLeftWith, isAboveWith, isRightWith, isBelowWith
|
||||
} from "./layout-tests-helper";
|
||||
|
||||
function waitUntilTestElementLayoutIsValid(view: View, timeoutSec?: number): void {
|
||||
TKUnit.waitUntilReady(() => {
|
||||
|
||||
@@ -121,7 +121,7 @@ export class GridLayoutTest extends testModule.UITest<RemovalTrackingGridLayout>
|
||||
|
||||
public test_synonym_property_setting_column_changes_col() {
|
||||
const test = new Button();
|
||||
|
||||
|
||||
test.column = 3;
|
||||
|
||||
TKUnit.assertEqual(test.column, 3, "Setting column should work.");
|
||||
@@ -130,7 +130,7 @@ export class GridLayoutTest extends testModule.UITest<RemovalTrackingGridLayout>
|
||||
|
||||
public test_synonym_property_setting_col_changes_column() {
|
||||
const test = new Button();
|
||||
|
||||
|
||||
test.col = 3;
|
||||
|
||||
TKUnit.assertEqual(test.col, 3, "Setting col should work.");
|
||||
@@ -139,7 +139,7 @@ export class GridLayoutTest extends testModule.UITest<RemovalTrackingGridLayout>
|
||||
|
||||
public test_synonym_property_setColumn_should_set_col_and_column() {
|
||||
const test = new Button();
|
||||
|
||||
|
||||
GridLayout.setColumn(test, 3);
|
||||
|
||||
TKUnit.assertEqual(test.col, 3, "setColumn should set col");
|
||||
@@ -148,7 +148,7 @@ export class GridLayoutTest extends testModule.UITest<RemovalTrackingGridLayout>
|
||||
|
||||
public test_synonym_property_setting_columnSpan_changes_colSpan() {
|
||||
const test = new Button();
|
||||
|
||||
|
||||
test.columnSpan = 3;
|
||||
|
||||
TKUnit.assertEqual(test.columnSpan, 3, "Setting columnSpan should work.");
|
||||
@@ -157,7 +157,7 @@ export class GridLayoutTest extends testModule.UITest<RemovalTrackingGridLayout>
|
||||
|
||||
public test_synonym_property_setting_colSpan_changes_columnSpan() {
|
||||
const test = new Button();
|
||||
|
||||
|
||||
test.colSpan = 3;
|
||||
|
||||
TKUnit.assertEqual(test.colSpan, 3, "Setting colSpan should work.");
|
||||
@@ -166,7 +166,7 @@ export class GridLayoutTest extends testModule.UITest<RemovalTrackingGridLayout>
|
||||
|
||||
public test_synonym_property_setColumnSpan_should_set_colSpan_and_columnSpan() {
|
||||
const test = new Button();
|
||||
|
||||
|
||||
GridLayout.setColumnSpan(test, 3);
|
||||
|
||||
TKUnit.assertEqual(test.colSpan, 3, "setColumnSpan should set colSpan");
|
||||
|
||||
@@ -249,4 +249,4 @@ export function dp(value: number): number {
|
||||
|
||||
export function dip(value: number): number {
|
||||
return utils.layout.toDevicePixels(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ export class MyButton extends Button implements def.MyButton {
|
||||
|
||||
return bounds.bottom - bounds.top;
|
||||
}
|
||||
|
||||
|
||||
get layoutLeft(): number {
|
||||
let bounds = this._getCurrentLayoutBounds();
|
||||
|
||||
|
||||
@@ -1033,7 +1033,7 @@ export class SafeAreaTests extends testModule.UITest<any> {
|
||||
|
||||
greaterOrCloseEnough(width(cells[1][0]), width(cells[1][1]), `cell10 width<${width(cells[1][0])}> not greater or close enough cell11 width<${width(cells[1][1])}>`);
|
||||
lessOrCloseEnough(width(cells[1][1]), width(cells[1][2]), `cell11 width<${width(cells[1][1])}> not less or close enough cell12 width<${width(cells[1][2])}>`);
|
||||
|
||||
|
||||
const sumOfNestedGridWidths = width(cells[1][0]) + width(cells[1][1]) + width(cells[1][2]);
|
||||
equal(width(grid), sumOfNestedGridWidths, `grid width<${width(grid)}> sum of nested grids width <${sumOfNestedGridWidths}>`);
|
||||
},
|
||||
|
||||
@@ -20,7 +20,7 @@ Using a StackLayout requires the StackLayout module.
|
||||
|
||||
## Create StackLayout
|
||||
{%snippet stack-layout-new%}
|
||||
|
||||
|
||||
## Add child view to layout
|
||||
{%snippet stack-layout-addchild%}
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"main": "lifecycle-tests"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#btn2, #btn3, #btn4 {
|
||||
#btn2,
|
||||
#btn3,
|
||||
#btn4 {
|
||||
border-width: 2;
|
||||
border-color: teal;
|
||||
border-radius: 20;
|
||||
|
||||
@@ -12,4 +12,4 @@ Button {
|
||||
|
||||
.nocolor {
|
||||
background: red;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,4 +14,4 @@ export function selectNativeItem(listPicker: listPickerModule.ListPicker, index:
|
||||
var oldIndex = listPicker.selectedIndex;
|
||||
listPicker.nativeViewProtected.setValue(index);
|
||||
listPicker.nativeViewProtected.valueChangedListener.onValueChange(listPicker.android, oldIndex, index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,4 +233,4 @@ export var test_Android_WhenSelectedIndexChangesEditTextIsUpdatedProperly = func
|
||||
var actualValue = listPicker.nativeViewProtected.editText.getText().toString();
|
||||
TKUnit.assertEqual(actualValue, expectedValue);
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
@@ -16,4 +16,4 @@ export class ViewModel extends Observable {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
<StackLayout>
|
||||
<Label text="Modal Page" />
|
||||
</StackLayout>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
<TabViewItem title="Modal Second">
|
||||
<Label text="tab 2" />
|
||||
</TabViewItem>
|
||||
</TabView>
|
||||
</TabView>
|
||||
|
||||
2
tests/app/ui/page/page-tests.d.ts
vendored
2
tests/app/ui/page/page-tests.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
/* tslint:disable */
|
||||
//@private
|
||||
import * as android from "./page-tests.android";
|
||||
import * as iOS from "./page-tests.ios";
|
||||
import * as iOS from "./page-tests.ios";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Page, View, EventData } from "tns-core-modules/ui/page";
|
||||
import { Page, View, EventData } from "tns-core-modules/ui/page";
|
||||
import { Label } from "tns-core-modules/ui/label";
|
||||
import { topmost } from "tns-core-modules/ui/frame";
|
||||
import * as TKUnit from "../../tk-unit";
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
<Label text="In Modal Page" />
|
||||
<Repeater items="{{ $value }}" verticalAlignment="top" />
|
||||
</StackLayout>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Label {
|
||||
background-color: #ff00ff00;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<Page>
|
||||
<Label text="Label created within a page declarative file with css."/>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Label {
|
||||
background-color: #ff00ff00;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ export function test_placeholder_creatingView() {
|
||||
}
|
||||
|
||||
export function test_placeholder_will_not_crash_wihout_creatingView() {
|
||||
const p = new placeholderModule.Placeholder();
|
||||
const p = new placeholderModule.Placeholder();
|
||||
|
||||
function testAction(views: Array<viewModule.View>) {
|
||||
if (isIOS) {
|
||||
@@ -63,4 +63,4 @@ export function test_placeholder_will_not_crash_wihout_creatingView() {
|
||||
}
|
||||
|
||||
helper.buildUIAndRunTest(p, testAction);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import * as view from "tns-core-modules/ui/core/view";
|
||||
import * as platform from "tns-core-modules/platform";
|
||||
import { Repeater } from "tns-core-modules/ui/repeater";
|
||||
import { UITest } from "../../ui-test";
|
||||
import { left, top, right, bottom, equal } from "../layouts/layout-tests-helper";
|
||||
import { left, top, right, bottom, equal } from "../layouts/layout-tests-helper";
|
||||
|
||||
export class RepeaterSafeAreaTest extends UITest<Repeater> {
|
||||
|
||||
|
||||
@@ -12,4 +12,4 @@ exports.pageLoaded = pageLoaded;
|
||||
|
||||
exports.tapPage = function (args) {
|
||||
console.log("Tap! " + args + " " + args.object);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
</GridLayout>
|
||||
</Repeater.itemTemplate>
|
||||
</Repeater>
|
||||
</Page>
|
||||
</Page>
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
{ "name" : "MyControl",
|
||||
"main" : "MyControl.js" }
|
||||
{
|
||||
"name": "MyControl",
|
||||
"main": "MyControl.js"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
.MyStackLayoutRoot {
|
||||
background-color: blue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<customControls:MyControl xmlns:customControls="ui/root-view/mymodule/" class="MyStackLayoutRoot">
|
||||
</customControls:MyControl>
|
||||
</customControls:MyControl>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user