tns create appTestNg
15
e2e/appTestNg/.editorconfig
Normal file
@@ -0,0 +1,15 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8
|
||||
|
||||
[*.json]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.ts]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
33
e2e/appTestNg/.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
# NativeScript
|
||||
hooks/
|
||||
node_modules/
|
||||
platforms/
|
||||
|
||||
# NativeScript Template
|
||||
*.js.map
|
||||
*.js
|
||||
!webpack.config.js
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
.idea
|
||||
.cloud
|
||||
.project
|
||||
tmp/
|
||||
typings/
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
20
e2e/appTestNg/App_Resources/Android/app.gradle
Normal file
@@ -0,0 +1,20 @@
|
||||
// Add your native dependencies here:
|
||||
|
||||
// Uncomment to add recyclerview-v7 dependency
|
||||
//dependencies {
|
||||
// implementation 'com.android.support:recyclerview-v7:+'
|
||||
//}
|
||||
|
||||
// If you want to add something to be applied before applying plugins' include.gradle files
|
||||
// e.g. project.ext.googlePlayServicesVersion = "15.0.1"
|
||||
// create a file named before-plugins.gradle in the current directory and place it there
|
||||
|
||||
android {
|
||||
defaultConfig {
|
||||
minSdkVersion 17
|
||||
generatedDensities = []
|
||||
}
|
||||
aaptOptions {
|
||||
additionalParameters "--no-version-vectors"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="__PACKAGE__"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<supports-screens
|
||||
android:smallScreens="true"
|
||||
android:normalScreens="true"
|
||||
android:largeScreens="true"
|
||||
android:xlargeScreens="true"/>
|
||||
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application
|
||||
android:name="com.tns.NativeScriptApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/icon"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme">
|
||||
|
||||
<activity
|
||||
android:name="com.tns.NativeScriptActivity"
|
||||
android:label="@string/title_activity_kimera"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode"
|
||||
android:theme="@style/LaunchScreenTheme">
|
||||
|
||||
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.tns.ErrorReportActivity"/>
|
||||
</application>
|
||||
</manifest>
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,8 @@
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="fill">
|
||||
<item>
|
||||
<bitmap android:gravity="fill" android:src="@drawable/background" />
|
||||
</item>
|
||||
<item>
|
||||
<bitmap android:gravity="center" android:src="@drawable/logo" />
|
||||
</item>
|
||||
</layer-list>
|
||||
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 193 KiB |
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ns_accent">#3d5afe</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- Application theme -->
|
||||
<style name="AppThemeBase21" parent="AppThemeBase">
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:datePickerStyle">@style/SpinnerDatePicker</item>
|
||||
<item name="android:timePickerStyle">@style/SpinnerTimePicker</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme" parent="AppThemeBase21">
|
||||
</style>
|
||||
|
||||
<!-- Default style for DatePicker - in spinner mode -->
|
||||
<style name="SpinnerDatePicker" parent="android:Widget.Material.Light.DatePicker">
|
||||
<item name="android:datePickerMode">spinner</item>
|
||||
</style>
|
||||
|
||||
<!-- Default style for TimePicker - in spinner mode -->
|
||||
<style name="SpinnerTimePicker" parent="android:Widget.Material.Light.TimePicker">
|
||||
<item name="android:timePickerMode">spinner</item>
|
||||
</style>
|
||||
|
||||
<style name="NativeScriptToolbarStyle" parent="NativeScriptToolbarStyleBase">
|
||||
<item name="android:elevation">4dp</item>
|
||||
<item name="android:paddingTop">24dp</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- Application theme -->
|
||||
<style name="AppThemeBase29" parent="AppThemeBase21">
|
||||
<item name="android:forceDarkAllowed">true</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme" parent="AppThemeBase29">
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ns_primary">#F5F5F5</color>
|
||||
<color name="ns_primaryDark">#757575</color>
|
||||
<color name="ns_accent">#33B5E5</color>
|
||||
<color name="ns_blue">#272734</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- theme to use FOR launch screen-->
|
||||
<style name="LaunchScreenThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>
|
||||
|
||||
<item name="colorPrimary">@color/ns_primary</item>
|
||||
<item name="colorPrimaryDark">@color/ns_primaryDark</item>
|
||||
<item name="colorAccent">@color/ns_accent</item>
|
||||
|
||||
<item name="android:windowBackground">@drawable/splash_screen</item>
|
||||
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="LaunchScreenTheme" parent="LaunchScreenThemeBase">
|
||||
</style>
|
||||
|
||||
<!-- theme to use AFTER launch screen is loaded-->
|
||||
<style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>
|
||||
|
||||
<item name="colorPrimary">@color/ns_primary</item>
|
||||
<item name="colorPrimaryDark">@color/ns_primaryDark</item>
|
||||
<item name="colorAccent">@color/ns_accent</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="AppTheme" parent="AppThemeBase">
|
||||
</style>
|
||||
|
||||
<!-- theme for action-bar -->
|
||||
<style name="NativeScriptToolbarStyleBase" parent="Widget.AppCompat.Toolbar">
|
||||
<item name="android:background">@color/ns_primary</item>
|
||||
<item name="theme">@style/ThemeOverlay.AppCompat.ActionBar</item>
|
||||
<item name="popupTheme">@style/ThemeOverlay.AppCompat</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="NativeScriptToolbarStyle" parent="NativeScriptToolbarStyleBase">
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,122 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "icon-20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"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@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"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@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "icon-60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"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@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "icon-29.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"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@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "icon-76.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"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" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "icon-1024.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 28 KiB |
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
23
e2e/appTestNg/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchScreen-AspectFill.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchScreen-AspectFill@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchScreen-AspectFill@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 34 KiB |
23
e2e/appTestNg/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchScreen-Center.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchScreen-Center@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchScreen-Center@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
e2e/appTestNg/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
vendored
Normal file
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 202 KiB |
|
After Width: | Height: | Size: 92 KiB |
47
e2e/appTestNg/App_Resources/iOS/Info.plist
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiresFullScreen</key>
|
||||
<true/>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
53
e2e/appTestNg/App_Resources/iOS/LaunchScreen.storyboard
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<device id="retina5_9" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LaunchScreen.AspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="wtH-rr-YfP">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LaunchScreen.Center" translatesAutoresizingMaskIntoConstraints="NO" id="s1z-aa-wYv">
|
||||
<rect key="frame" x="0.0" y="150" width="375" height="512"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="s1z-aa-wYv" secondAttribute="trailing" id="4Rf-kf-vql"/>
|
||||
<constraint firstAttribute="bottom" secondItem="wtH-rr-YfP" secondAttribute="bottom" id="5CS-At-4ka"/>
|
||||
<constraint firstItem="wtH-rr-YfP" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="Awn-b8-xf1"/>
|
||||
<constraint firstItem="s1z-aa-wYv" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="BpJ-vb-eKA"/>
|
||||
<constraint firstItem="s1z-aa-wYv" firstAttribute="trailing" secondItem="wtH-rr-YfP" secondAttribute="trailing" id="QIM-7J-OZz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="wtH-rr-YfP" secondAttribute="trailing" id="RXg-rW-UK8"/>
|
||||
<constraint firstItem="s1z-aa-wYv" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="Rcp-LG-48z"/>
|
||||
<constraint firstItem="wtH-rr-YfP" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="cch-8E-tYu"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="509.60000000000002" y="237.93103448275863"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchScreen.AspectFill" width="768" height="1024"/>
|
||||
<image name="LaunchScreen.Center" width="384" height="512"/>
|
||||
</resources>
|
||||
</document>
|
||||
6
e2e/appTestNg/App_Resources/iOS/build.xcconfig
Normal file
@@ -0,0 +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
|
||||
// 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;
|
||||
201
e2e/appTestNg/LICENSE
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright (c) 2015-2019 Progress Software Corporation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
17
e2e/appTestNg/angular.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"cli": {
|
||||
"defaultCollection": "@nativescript/schematics"
|
||||
},
|
||||
"projects": {
|
||||
"hello-world": {
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"projectType": "application",
|
||||
"prefix": "ns"
|
||||
}
|
||||
},
|
||||
"defaultProject": "hello-world"
|
||||
}
|
||||
4
e2e/appTestNg/nsconfig.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"appResourcesPath": "App_Resources",
|
||||
"appPath": "src"
|
||||
}
|
||||
38
e2e/appTestNg/package.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"nativescript": {
|
||||
"id": "org.nativescript.appTestNg",
|
||||
"tns-android": {
|
||||
"version": "6.2.0"
|
||||
},
|
||||
"tns-ios": {
|
||||
"version": "6.2.0"
|
||||
}
|
||||
},
|
||||
"description": "NativeScript Application",
|
||||
"license": "SEE LICENSE IN <your-license-filename>",
|
||||
"repository": "<fill-your-repository-here>",
|
||||
"dependencies": {
|
||||
"@angular/animations": "~8.2.0",
|
||||
"@angular/common": "~8.2.0",
|
||||
"@angular/compiler": "~8.2.0",
|
||||
"@angular/core": "~8.2.0",
|
||||
"@angular/forms": "~8.2.0",
|
||||
"@angular/platform-browser": "~8.2.0",
|
||||
"@angular/platform-browser-dynamic": "~8.2.0",
|
||||
"@angular/router": "~8.2.0",
|
||||
"@nativescript/theme": "~2.2.0",
|
||||
"nativescript-angular": "~8.20.0",
|
||||
"reflect-metadata": "~0.1.12",
|
||||
"rxjs": "^6.4.0",
|
||||
"tns-core-modules": "~6.2.0",
|
||||
"zone.js": "~0.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/compiler-cli": "~8.2.0",
|
||||
"@ngtools/webpack": "~8.2.0",
|
||||
"nativescript-dev-webpack": "~1.3.0",
|
||||
"typescript": "~3.5.3"
|
||||
},
|
||||
"gitHead": "6894b56740adbd34cb17ebf10afa6a05768747bf",
|
||||
"readme": "NativeScript Application"
|
||||
}
|
||||
25
e2e/appTestNg/src/app.css
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
In NativeScript, the app.css file is where you place CSS rules that
|
||||
you would like to apply to your entire application. Check out
|
||||
http://docs.nativescript.org/ui/styling for a full list of the CSS
|
||||
selectors and properties you can use to style UI components.
|
||||
|
||||
/*
|
||||
In many cases you may want to use the NativeScript core theme instead
|
||||
of writing your own CSS rules. You can learn more about the
|
||||
NativeScript core theme at https://github.com/nativescript/theme
|
||||
The imported CSS rules must precede all other types of rules.
|
||||
*/
|
||||
@import "~@nativescript/theme/css/core.css";
|
||||
@import "~@nativescript/theme/css/default.css";
|
||||
|
||||
/* Place any CSS rules you want to apply on both iOS and Android here.
|
||||
This is where the vast majority of your CSS code goes. */
|
||||
|
||||
/*
|
||||
The following CSS rule changes the font size of all Buttons that have the
|
||||
"-primary" class modifier.
|
||||
*/
|
||||
Button.-primary {
|
||||
font-size: 18;
|
||||
}
|
||||
18
e2e/appTestNg/src/app/app-routing.module.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { NgModule } from "@angular/core";
|
||||
import { NativeScriptRouterModule } from "nativescript-angular/router";
|
||||
import { Routes } from "@angular/router";
|
||||
|
||||
import { ItemsComponent } from "./item/items.component";
|
||||
import { ItemDetailComponent } from "./item/item-detail.component";
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: "", redirectTo: "/items", pathMatch: "full" },
|
||||
{ path: "items", component: ItemsComponent },
|
||||
{ path: "item/:id", component: ItemDetailComponent }
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [NativeScriptRouterModule.forRoot(routes)],
|
||||
exports: [NativeScriptRouterModule]
|
||||
})
|
||||
export class AppRoutingModule { }
|
||||
2
e2e/appTestNg/src/app/app.component.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<!-- https://docs.nativescript.org/angular/core-concepts/angular-navigation.html#page-router-outlet -->
|
||||
<page-router-outlet></page-router-outlet>
|
||||
7
e2e/appTestNg/src/app/app.component.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Component } from "@angular/core";
|
||||
|
||||
@Component({
|
||||
selector: "ns-app",
|
||||
templateUrl: "./app.component.html"
|
||||
})
|
||||
export class AppComponent { }
|
||||
36
e2e/appTestNg/src/app/app.module.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
|
||||
import { NativeScriptModule } from "nativescript-angular/nativescript.module";
|
||||
|
||||
import { AppRoutingModule } from "./app-routing.module";
|
||||
import { AppComponent } from "./app.component";
|
||||
import { ItemsComponent } from "./item/items.component";
|
||||
import { ItemDetailComponent } from "./item/item-detail.component";
|
||||
|
||||
// Uncomment and add to NgModule imports if you need to use two-way binding
|
||||
// import { NativeScriptFormsModule } from "nativescript-angular/forms";
|
||||
|
||||
// Uncomment and add to NgModule imports if you need to use the HttpClient wrapper
|
||||
// import { NativeScriptHttpClientModule } from "nativescript-angular/http-client";
|
||||
|
||||
@NgModule({
|
||||
bootstrap: [
|
||||
AppComponent
|
||||
],
|
||||
imports: [
|
||||
NativeScriptModule,
|
||||
AppRoutingModule
|
||||
],
|
||||
declarations: [
|
||||
AppComponent,
|
||||
ItemsComponent,
|
||||
ItemDetailComponent
|
||||
],
|
||||
providers: [],
|
||||
schemas: [
|
||||
NO_ERRORS_SCHEMA
|
||||
]
|
||||
})
|
||||
/*
|
||||
Pass your application module to the bootstrapModule function located in main.ts to start your app
|
||||
*/
|
||||
export class AppModule { }
|
||||
9
e2e/appTestNg/src/app/item/item-detail.component.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<ActionBar title="Details"></ActionBar>
|
||||
|
||||
<FlexboxLayout flexDirection="column">
|
||||
<FlexboxLayout class="m-15">
|
||||
<Label class="h2" [text]="item.id + '. '"></Label>
|
||||
<Label class="h2" [text]="item.name"></Label>
|
||||
</FlexboxLayout>
|
||||
<Label class="h4 m-15" [text]="item.role"></Label>
|
||||
</FlexboxLayout>
|
||||
23
e2e/appTestNg/src/app/item/item-detail.component.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { ActivatedRoute } from "@angular/router";
|
||||
|
||||
import { Item } from "./item";
|
||||
import { ItemService } from "./item.service";
|
||||
|
||||
@Component({
|
||||
selector: "ns-details",
|
||||
templateUrl: "./item-detail.component.html"
|
||||
})
|
||||
export class ItemDetailComponent implements OnInit {
|
||||
item: Item;
|
||||
|
||||
constructor(
|
||||
private itemService: ItemService,
|
||||
private route: ActivatedRoute
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
const id = +this.route.snapshot.params.id;
|
||||
this.item = this.itemService.getItem(id);
|
||||
}
|
||||
}
|
||||
41
e2e/appTestNg/src/app/item/item.service.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
import { Item } from "./item";
|
||||
|
||||
@Injectable({
|
||||
providedIn: "root"
|
||||
})
|
||||
export class ItemService {
|
||||
private items = new Array<Item>(
|
||||
{ id: 1, name: "Ter Stegen", role: "Goalkeeper" },
|
||||
{ id: 3, name: "Piqué", role: "Defender" },
|
||||
{ id: 4, name: "I. Rakitic", role: "Midfielder" },
|
||||
{ id: 5, name: "Sergio", role: "Midfielder" },
|
||||
{ id: 6, name: "Denis Suárez", role: "Midfielder" },
|
||||
{ id: 7, name: "Arda", role: "Midfielder" },
|
||||
{ id: 8, name: "A. Iniesta", role: "Midfielder" },
|
||||
{ id: 9, name: "Suárez", role: "Forward" },
|
||||
{ id: 10, name: "Messi", role: "Forward" },
|
||||
{ id: 11, name: "Neymar", role: "Forward" },
|
||||
{ id: 12, name: "Rafinha", role: "Midfielder" },
|
||||
{ id: 13, name: "Cillessen", role: "Goalkeeper" },
|
||||
{ id: 14, name: "Mascherano", role: "Defender" },
|
||||
{ id: 17, name: "Paco Alcácer", role: "Forward" },
|
||||
{ id: 18, name: "Jordi Alba", role: "Defender" },
|
||||
{ id: 19, name: "Digne", role: "Defender" },
|
||||
{ id: 20, name: "Sergi Roberto", role: "Midfielder" },
|
||||
{ id: 21, name: "André Gomes", role: "Midfielder" },
|
||||
{ id: 22, name: "Aleix Vidal", role: "Midfielder" },
|
||||
{ id: 23, name: "Umtiti", role: "Defender" },
|
||||
{ id: 24, name: "Mathieu", role: "Defender" },
|
||||
{ id: 25, name: "Masip", role: "Goalkeeper" }
|
||||
);
|
||||
|
||||
getItems(): Array<Item> {
|
||||
return this.items;
|
||||
}
|
||||
|
||||
getItem(id: number): Item {
|
||||
return this.items.filter((item) => item.id === id)[0];
|
||||
}
|
||||
}
|
||||
5
e2e/appTestNg/src/app/item/item.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export interface Item {
|
||||
id: number;
|
||||
name: string;
|
||||
role: string;
|
||||
}
|
||||
34
e2e/appTestNg/src/app/item/items.component.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!--
|
||||
The template defines the view of the component - what is actually rendered.
|
||||
In NativeScript applications the template is defined with XML using NativeScript UI elements.
|
||||
It is different from HTML. So instead of <input>, <span>, <div> etc. - we have <TextField>, <Label> and layouts.
|
||||
The important thing is that although the elements are different - all of the Angular’s template syntax works exactly the same.
|
||||
So you can still use template expressions, bindings, templates as well as all the built-in directives.
|
||||
-->
|
||||
|
||||
<!--
|
||||
The ActionBar is the NativeScript common abstraction over the Android ActionBar and iOS NavigationBar.
|
||||
http://docs.nativescript.org/ui/action-bar
|
||||
-->
|
||||
<ActionBar title="My App">
|
||||
</ActionBar>
|
||||
|
||||
<!--
|
||||
The GridLayout arranges its child elements in a table structure of rows and columns.
|
||||
A cell can contain multiple child elements, they can span over multiple rows and columns,
|
||||
and even overlap each other. The GridLayout has one column and one row by default.
|
||||
You can learn more about NativeScript layouts at https://docs.nativescript.org/ui/layout-containers.
|
||||
|
||||
These components make use of the NativeScript core theme, which styles them with element selectors.
|
||||
The theme also provides a set of helper class names such as p-20, h1, h2, and text-center to enhance styling.
|
||||
You can learn more about the NativeScript core theme at https://github.com/nativescript/theme
|
||||
-->
|
||||
<GridLayout>
|
||||
<ListView [items]="items">
|
||||
<ng-template let-item="item">
|
||||
<StackLayout>
|
||||
<Label [nsRouterLink]="['/item', item.id]" [text]="item.name"></Label>
|
||||
</StackLayout>
|
||||
</ng-template>
|
||||
</ListView>
|
||||
</GridLayout>
|
||||
18
e2e/appTestNg/src/app/item/items.component.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
|
||||
import { Item } from "./item";
|
||||
import { ItemService } from "./item.service";
|
||||
|
||||
@Component({
|
||||
selector: "ns-items",
|
||||
templateUrl: "./items.component.html"
|
||||
})
|
||||
export class ItemsComponent implements OnInit {
|
||||
items: Array<Item>;
|
||||
|
||||
constructor(private itemService: ItemService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.items = this.itemService.getItems();
|
||||
}
|
||||
}
|
||||
13
e2e/appTestNg/src/main.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// this import should be first in order to load some required settings (like globals and reflect-metadata)
|
||||
import { platformNativeScriptDynamic } from "nativescript-angular/platform";
|
||||
|
||||
import { AppModule } from "./app/app.module";
|
||||
|
||||
// A traditional NativeScript application starts by initializing global objects,
|
||||
// setting up global CSS rules, creating, and navigating to the main page.
|
||||
// Angular applications need to take care of their own initialization:
|
||||
// modules, components, directives, routes, DI providers.
|
||||
// A NativeScript Angular app needs to make both paradigms work together,
|
||||
// so we provide a wrapper platform object, platformNativeScriptDynamic,
|
||||
// that sets up a NativeScript application and can bootstrap the Angular framework.
|
||||
platformNativeScriptDynamic().bootstrapModule(AppModule);
|
||||
7
e2e/appTestNg/src/package.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"main": "main.js",
|
||||
"android": {
|
||||
"v8Flags": "--expose_gc",
|
||||
"markingMode": "none"
|
||||
}
|
||||
}
|
||||
29
e2e/appTestNg/tsconfig.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"noEmitHelpers": true,
|
||||
"noEmitOnError": true,
|
||||
"skipLibCheck": true,
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom",
|
||||
"es2015.iterable"
|
||||
],
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"~/*": [
|
||||
"src/*"
|
||||
],
|
||||
"*": [
|
||||
"./node_modules/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"platforms"
|
||||
]
|
||||
}
|
||||
4
e2e/appTestNg/tsfmt.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"indentSize": 4,
|
||||
"tabSize": 4
|
||||
}
|
||||
335
e2e/appTestNg/webpack.config.js
Normal file
@@ -0,0 +1,335 @@
|
||||
const { join, relative, resolve, sep, dirname } = require("path");
|
||||
|
||||
const webpack = require("webpack");
|
||||
const nsWebpack = require("nativescript-dev-webpack");
|
||||
const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target");
|
||||
const { nsReplaceBootstrap } = require("nativescript-dev-webpack/transformers/ns-replace-bootstrap");
|
||||
const { nsReplaceLazyLoader } = require("nativescript-dev-webpack/transformers/ns-replace-lazy-loader");
|
||||
const { nsSupportHmrNg } = require("nativescript-dev-webpack/transformers/ns-support-hmr-ng");
|
||||
const { getMainModulePath } = require("nativescript-dev-webpack/utils/ast-utils");
|
||||
const { getNoEmitOnErrorFromTSConfig } = require("nativescript-dev-webpack/utils/tsconfig-utils");
|
||||
const CleanWebpackPlugin = require("clean-webpack-plugin");
|
||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
|
||||
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
const { getAngularCompilerPlugin } = require("nativescript-dev-webpack/plugins/NativeScriptAngularCompilerPlugin");
|
||||
const hashSalt = Date.now().toString();
|
||||
|
||||
module.exports = env => {
|
||||
// Add your custom Activities, Services and other Android app components here.
|
||||
const appComponents = [
|
||||
"tns-core-modules/ui/frame",
|
||||
"tns-core-modules/ui/frame/activity",
|
||||
];
|
||||
|
||||
const platform = env && (env.android && "android" || env.ios && "ios");
|
||||
if (!platform) {
|
||||
throw new Error("You need to provide a target platform!");
|
||||
}
|
||||
|
||||
const AngularCompilerPlugin = getAngularCompilerPlugin(platform);
|
||||
const projectRoot = __dirname;
|
||||
|
||||
// Default destination inside platforms/<platform>/...
|
||||
const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot));
|
||||
|
||||
const {
|
||||
// The 'appPath' and 'appResourcesPath' values are fetched from
|
||||
// the nsconfig.json configuration file.
|
||||
appPath = "src",
|
||||
appResourcesPath = "App_Resources",
|
||||
|
||||
// You can provide the following flags when running 'tns run android|ios'
|
||||
aot, // --env.aot
|
||||
snapshot, // --env.snapshot,
|
||||
production, // --env.production
|
||||
uglify, // --env.uglify
|
||||
report, // --env.report
|
||||
sourceMap, // --env.sourceMap
|
||||
hiddenSourceMap, // --env.hiddenSourceMap
|
||||
hmr, // --env.hmr,
|
||||
unitTesting, // --env.unitTesting
|
||||
verbose, // --env.verbose
|
||||
snapshotInDocker, // --env.snapshotInDocker
|
||||
skipSnapshotTools, // --env.skipSnapshotTools
|
||||
compileSnapshot // --env.compileSnapshot
|
||||
} = env;
|
||||
|
||||
const useLibs = compileSnapshot;
|
||||
const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap;
|
||||
const externals = nsWebpack.getConvertedExternals(env.externals);
|
||||
const appFullPath = resolve(projectRoot, appPath);
|
||||
const appResourcesFullPath = resolve(projectRoot, appResourcesPath);
|
||||
const tsConfigName = "tsconfig.tns.json";
|
||||
const entryModule = `${nsWebpack.getEntryModule(appFullPath, platform)}.ts`;
|
||||
const entryPath = `.${sep}${entryModule}`;
|
||||
const entries = { bundle: entryPath };
|
||||
const areCoreModulesExternal = Array.isArray(env.externals) && env.externals.some(e => e.indexOf("tns-core-modules") > -1);
|
||||
if (platform === "ios" && !areCoreModulesExternal) {
|
||||
entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules";
|
||||
};
|
||||
|
||||
const ngCompilerTransformers = [];
|
||||
const additionalLazyModuleResources = [];
|
||||
if (aot) {
|
||||
ngCompilerTransformers.push(nsReplaceBootstrap);
|
||||
}
|
||||
|
||||
if (hmr) {
|
||||
ngCompilerTransformers.push(nsSupportHmrNg);
|
||||
}
|
||||
|
||||
// when "@angular/core" is external, it's not included in the bundles. In this way, it will be used
|
||||
// directly from node_modules and the Angular modules loader won't be able to resolve the lazy routes
|
||||
// fixes https://github.com/NativeScript/nativescript-cli/issues/4024
|
||||
if (env.externals && env.externals.indexOf("@angular/core") > -1) {
|
||||
const appModuleRelativePath = getMainModulePath(resolve(appFullPath, entryModule), tsConfigName);
|
||||
if (appModuleRelativePath) {
|
||||
const appModuleFolderPath = dirname(resolve(appFullPath, appModuleRelativePath));
|
||||
// include the lazy loader inside app module
|
||||
ngCompilerTransformers.push(nsReplaceLazyLoader);
|
||||
// include the new lazy loader path in the allowed ones
|
||||
additionalLazyModuleResources.push(appModuleFolderPath);
|
||||
}
|
||||
}
|
||||
|
||||
const ngCompilerPlugin = new AngularCompilerPlugin({
|
||||
hostReplacementPaths: nsWebpack.getResolver([platform, "tns"]),
|
||||
platformTransformers: ngCompilerTransformers.map(t => t(() => ngCompilerPlugin, resolve(appFullPath, entryModule), projectRoot)),
|
||||
mainPath: join(appFullPath, entryModule),
|
||||
tsConfigPath: join(__dirname, tsConfigName),
|
||||
skipCodeGeneration: !aot,
|
||||
sourceMap: !!isAnySourceMapEnabled,
|
||||
additionalLazyModuleResources: additionalLazyModuleResources
|
||||
});
|
||||
|
||||
let sourceMapFilename = nsWebpack.getSourceMapFilename(hiddenSourceMap, __dirname, dist);
|
||||
|
||||
const itemsToClean = [`${dist}/**/*`];
|
||||
if (platform === "android") {
|
||||
itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "src", "main", "assets", "snapshots")}`);
|
||||
itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`);
|
||||
}
|
||||
|
||||
const noEmitOnErrorFromTSConfig = getNoEmitOnErrorFromTSConfig(join(projectRoot, tsConfigName));
|
||||
|
||||
nsWebpack.processAppComponents(appComponents, platform);
|
||||
const config = {
|
||||
mode: production ? "production" : "development",
|
||||
context: appFullPath,
|
||||
externals,
|
||||
watchOptions: {
|
||||
ignored: [
|
||||
appResourcesFullPath,
|
||||
// Don't watch hidden files
|
||||
"**/.*",
|
||||
]
|
||||
},
|
||||
target: nativescriptTarget,
|
||||
entry: entries,
|
||||
output: {
|
||||
pathinfo: false,
|
||||
path: dist,
|
||||
sourceMapFilename,
|
||||
libraryTarget: "commonjs2",
|
||||
filename: "[name].js",
|
||||
globalObject: "global",
|
||||
hashSalt
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".ts", ".js", ".scss", ".css"],
|
||||
// Resolve {N} system modules from tns-core-modules
|
||||
modules: [
|
||||
resolve(__dirname, "node_modules/tns-core-modules"),
|
||||
resolve(__dirname, "node_modules"),
|
||||
"node_modules/tns-core-modules",
|
||||
"node_modules",
|
||||
],
|
||||
alias: {
|
||||
'~': appFullPath
|
||||
},
|
||||
symlinks: true
|
||||
},
|
||||
resolveLoader: {
|
||||
symlinks: false
|
||||
},
|
||||
node: {
|
||||
// Disable node shims that conflict with NativeScript
|
||||
"http": false,
|
||||
"timers": false,
|
||||
"setImmediate": false,
|
||||
"fs": "empty",
|
||||
"__dirname": false,
|
||||
},
|
||||
devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"),
|
||||
optimization: {
|
||||
runtimeChunk: "single",
|
||||
noEmitOnErrors: noEmitOnErrorFromTSConfig,
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
vendor: {
|
||||
name: "vendor",
|
||||
chunks: "all",
|
||||
test: (module, chunks) => {
|
||||
const moduleName = module.nameForCondition ? module.nameForCondition() : '';
|
||||
return /[\\/]node_modules[\\/]/.test(moduleName) ||
|
||||
appComponents.some(comp => comp === moduleName);
|
||||
},
|
||||
enforce: true,
|
||||
},
|
||||
}
|
||||
},
|
||||
minimize: !!uglify,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
cache: true,
|
||||
sourceMap: isAnySourceMapEnabled,
|
||||
terserOptions: {
|
||||
output: {
|
||||
comments: false,
|
||||
semicolons: !isAnySourceMapEnabled
|
||||
},
|
||||
compress: {
|
||||
// The Android SBG has problems parsing the output
|
||||
// when these options are enabled
|
||||
'collapse_vars': platform !== "android",
|
||||
sequences: platform !== "android",
|
||||
}
|
||||
}
|
||||
})
|
||||
],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
include: join(appFullPath, entryPath),
|
||||
use: [
|
||||
// Require all Android app components
|
||||
platform === "android" && {
|
||||
loader: "nativescript-dev-webpack/android-app-components-loader",
|
||||
options: { modules: appComponents }
|
||||
},
|
||||
|
||||
{
|
||||
loader: "nativescript-dev-webpack/bundle-config-loader",
|
||||
options: {
|
||||
angular: true,
|
||||
loadCss: !snapshot, // load the application css if in debug mode
|
||||
unitTesting,
|
||||
appFullPath,
|
||||
projectRoot,
|
||||
ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform)
|
||||
}
|
||||
},
|
||||
].filter(loader => !!loader)
|
||||
},
|
||||
|
||||
{ test: /\.html$|\.xml$/, use: "raw-loader" },
|
||||
|
||||
{
|
||||
test: /[\/|\\]app\.css$/,
|
||||
use: [
|
||||
"nativescript-dev-webpack/style-hot-loader",
|
||||
{
|
||||
loader: "nativescript-dev-webpack/css2json-loader",
|
||||
options: { useForImports: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /[\/|\\]app\.scss$/,
|
||||
use: [
|
||||
"nativescript-dev-webpack/style-hot-loader",
|
||||
{
|
||||
loader: "nativescript-dev-webpack/css2json-loader",
|
||||
options: { useForImports: true }
|
||||
},
|
||||
"sass-loader"
|
||||
]
|
||||
},
|
||||
|
||||
// Angular components reference css files and their imports using raw-loader
|
||||
{ test: /\.css$/, exclude: /[\/|\\]app\.css$/, use: "raw-loader" },
|
||||
{ test: /\.scss$/, exclude: /[\/|\\]app\.scss$/, use: ["raw-loader", "resolve-url-loader", "sass-loader"] },
|
||||
|
||||
{
|
||||
test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/,
|
||||
use: [
|
||||
"nativescript-dev-webpack/moduleid-compat-loader",
|
||||
"nativescript-dev-webpack/lazy-ngmodule-hot-loader",
|
||||
"@ngtools/webpack",
|
||||
]
|
||||
},
|
||||
|
||||
// Mark files inside `@angular/core` as using SystemJS style dynamic imports.
|
||||
// Removing this will cause deprecation warnings to appear.
|
||||
{
|
||||
test: /[\/\\]@angular[\/\\]core[\/\\].+\.js$/,
|
||||
parser: { system: true },
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
// Define useful constants like TNS_WEBPACK
|
||||
new webpack.DefinePlugin({
|
||||
"global.TNS_WEBPACK": "true",
|
||||
"process": "global.process",
|
||||
}),
|
||||
// Remove all files from the out dir.
|
||||
new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }),
|
||||
// Copy assets to out dir. Add your own globs as needed.
|
||||
new CopyWebpackPlugin([
|
||||
{ from: { glob: "fonts/**" } },
|
||||
{ from: { glob: "**/*.jpg" } },
|
||||
{ from: { glob: "**/*.png" } },
|
||||
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
|
||||
new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"),
|
||||
// For instructions on how to set up workers with webpack
|
||||
// check out https://github.com/nativescript/worker-loader
|
||||
new NativeScriptWorkerPlugin(),
|
||||
ngCompilerPlugin,
|
||||
// Does IPC communication with the {N} CLI to notify events when running in watch mode.
|
||||
new nsWebpack.WatchStateLoggerPlugin(),
|
||||
],
|
||||
};
|
||||
|
||||
if (report) {
|
||||
// Generate report files for bundles content
|
||||
config.plugins.push(new BundleAnalyzerPlugin({
|
||||
analyzerMode: "static",
|
||||
openAnalyzer: false,
|
||||
generateStatsFile: true,
|
||||
reportFilename: resolve(projectRoot, "report", `report.html`),
|
||||
statsFilename: resolve(projectRoot, "report", `stats.json`),
|
||||
}));
|
||||
}
|
||||
|
||||
if (snapshot) {
|
||||
config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({
|
||||
chunk: "vendor",
|
||||
angular: true,
|
||||
requireModules: [
|
||||
"reflect-metadata",
|
||||
"@angular/platform-browser",
|
||||
"@angular/core",
|
||||
"@angular/common",
|
||||
"@angular/router",
|
||||
"nativescript-angular/platform-static",
|
||||
"nativescript-angular/router",
|
||||
],
|
||||
projectRoot,
|
||||
webpackConfig: config,
|
||||
snapshotInDocker,
|
||||
skipSnapshotTools,
|
||||
useLibs
|
||||
}));
|
||||
}
|
||||
|
||||
if (hmr) {
|
||||
config.plugins.push(new webpack.HotModuleReplacementPlugin());
|
||||
}
|
||||
|
||||
return config;
|
||||
};
|
||||