@@ -58,7 +58,6 @@ def test_001_create_app(self):
58
58
assert File .exists (self .app_name + "/node_modules/tns-core-modules/LICENSE" )
59
59
assert File .exists (self .app_name + "/node_modules/tns-core-modules/xml/xml.js" )
60
60
61
-
62
61
def test_002_create_project_with_path (self ):
63
62
Tns .create_app (self .app_name , attributes = {"--path" : "folder/subfolder/" },
64
63
assert_success = False , update_modules = False )
@@ -136,6 +135,24 @@ def test_100_create_project_with_template(self, template_source):
136
135
output = File .read (self .app_name + os .sep + "package.json" )
137
136
assert "\" id\" : \" org.nativescript.TNSApp\" " in output
138
137
138
+ def test_101_create_project_with_local_directory_template (self ):
139
+ Tns .create_app (self .app_name , attributes = {"--template" : "./data/templates/myCustomTemplate/" },
140
+ assert_success = False , update_modules = False )
141
+ assert File .exists (self .app_name + "/app/index.js" )
142
+ assert File .exists (self .app_name + "/app/package.json" )
143
+ assert not Folder .is_empty (self .app_name + "/app/App_Resources/Android" )
144
+ assert not Folder .is_empty (self .app_name + "/app/App_Resources/iOS" )
145
+ assert not Folder .is_empty (self .app_name + "/node_modules/lodash" )
146
+ assert not Folder .is_empty (self .app_name + "/node_modules/minimist" )
147
+ assert not Folder .is_empty (self .app_name + "/node_modules/tns-core-modules" )
148
+ assert not Folder .is_empty (self .app_name + "/node_modules/tns-core-modules-widgets" )
149
+ assert Folder .is_empty (self .app_name + "/platforms" )
150
+
151
+ output = File .read (self .app_name + os .sep + "package.json" )
152
+ assert "\" tns-core-modules\" :" in output
153
+ assert "\" lodash\" : \" 3.10.1\" " in output
154
+ assert "\" minimist\" : \" 1.2.0\" " in output
155
+
139
156
def test_400_create_project_with_copyfrom_wrong_path (self ):
140
157
output = Tns .create_app (self .app_name , attributes = {"--copy-from" : "invalidFolder" },
141
158
assert_success = False , update_modules = False )
0 commit comments