Skip to content

Commit 925db1d

Browse files
committed
preview tests: ensure app i sin initial state on every run
1 parent c0f121c commit 925db1d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/preview_tests/preview_ios_tests.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def setUpClass(cls):
5858
"""We need new project because we need app with long imports to test preview with --bundle"""
5959
Tns.create_app(cls.app_webpack_name,attributes={"--template": os.path.join(SUT_FOLDER, "template-hello-world")})
6060
Tns.install_npm(package=WEBPACK_PACKAGE, option='--save-dev', folder=cls.app_webpack_name)
61+
Folder.copy(TEST_RUN_HOME + "/" + cls.app_webpack_name, TEST_RUN_HOME + "/data/TestAppWebpack")
6162

6263
"""Create angular app"""
6364
Tns.create_app_ng(cls.app_angular_name)
@@ -144,6 +145,10 @@ def test_001_tns_preview_ios_js_css_xml(self):
144145
def test_002_tns_preview_ios_webpack_js_css_xml(self):
145146
"""Make valid changes in JS,CSS and XML"""
146147

148+
# Ensure app is in initial state
149+
Folder.cleanup(self.app_webpack_name)
150+
Folder.copy(TEST_RUN_HOME + "/data/TestAppWebpack", TEST_RUN_HOME + "/TestAppWebpack")
151+
147152
# `tns preview` and take the app url and open it in Preview App
148153
log = Tns.preview(attributes={'--path': self.app_webpack_name,'--bundle':'' }, wait=False,
149154
log_trace=True,assert_success=False)

0 commit comments

Comments
 (0)