@@ -97,11 +97,6 @@ def test_001_full_livesync_ios_simulator_xml_js_css_tns_files(self):
97
97
assert "require(\" globals\" ); // test" in output
98
98
99
99
100
- # # Add a new folder
101
- # def test_100_livesync_ios_simulator_watch_add_new_folder(self):
102
- # create_folder("folder")
103
-
104
-
105
100
# Add new files
106
101
def test_101_livesync_ios_simulator_watch_add_xml_file (self ):
107
102
shutil .copyfile ("TNS_App/app/main-page.xml" , "TNS_App/app/test/test.xml" )
@@ -174,6 +169,39 @@ def test_123_livesync_ios_simulator_watch_delete_css_file(self):
174
169
assert "No such file or directory" in output
175
170
176
171
172
+ # Add files to a new folder
173
+ def test_131_livesync_ios_simulator_watch_add_xml_file_to_new_folder (self ):
174
+ create_folder ("TNS_App/app/folder" )
175
+ self .wait_for_text_in_output ("app/folder/ to" )
176
+
177
+ shutil .copyfile ("TNS_App/app/main-page.xml" , "TNS_App/app/folder/test.xml" )
178
+ self .wait_for_text_in_output ("app/folder/test.xml to" )
179
+
180
+ output = cat_app_file_on_simulator ("TNSApp" , "app/folder/test.xml" )
181
+ assert "<Button text=\" WATCH\" tap=\" {{ tapAction }}\" />" in output
182
+
183
+ # remove("TNS_App/app/folder")
184
+ # self.wait_for_text_in_output("app/folder/")
185
+ #
186
+ # output = cat_app_file_on_simulator("TNSApp", "app/folder/test.xml")
187
+ # assert "No such file or directory" in output
188
+
189
+ def test_132_livesync_ios_simulator_watch_add_js_file_to_new_folder (self ):
190
+ shutil .copyfile ("TNS_App/app/app.js" , "TNS_App/app/folder/test.js" )
191
+ self .wait_for_text_in_output ("app/folder/test.js to" )
192
+ time .sleep (2 )
193
+
194
+ output = cat_app_file_on_simulator ("TNSApp" , "app/folder/test.js" )
195
+ assert "application.start();" in output
196
+
197
+ def test_133_livesync_ios_simulator_watch_add_css_file_to_new_folder (self ):
198
+ shutil .copyfile ("TNS_App/app/app.css" , "TNS_App/app/folder/test.css" )
199
+ self .wait_for_text_in_output ("app/folder/test.css to" )
200
+
201
+ output = cat_app_file_on_simulator ("TNSApp" , "app/folder/test.css" )
202
+ assert "color: green;" in output
203
+
204
+
177
205
def test_301_livesync_ios_simulator_before_run (self ):
178
206
self .terminate_watcher ()
179
207
cleanup_folder ('appTest' )
0 commit comments