Skip to content

Commit 79d5fe6

Browse files
committed
Fix test_310_build_ios_with_copy_to(self):
1 parent ee03417 commit 79d5fe6

File tree

4 files changed

+5
-19
lines changed

4 files changed

+5
-19
lines changed

core/tns/tns.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ def build_android(attributes={}, assert_success=True, tns_path=None, log_trace=F
357357
if assert_success:
358358
# Verify output of build command
359359
assert "Project successfully built" in output, "Build failed!" + os.linesep + output
360+
assert "FAILURE" not in output
360361
assert "NOT FOUND" not in output # Test for https://github.com/NativeScript/android-runtime/issues/390
361362
if log_trace:
362363
assert "BUILD SUCCESSFUL" in output, "Build failed!" + os.linesep + output

tests/build/android/plugin_android_tests.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,7 @@ def test_200_build_app_with_plugin_added_inside_project(self):
113113
os.chdir(current_dir)
114114
assert "Successfully installed plugin tns-plugin" in output
115115

116-
output = Tns.build_android(attributes={"--path": self.app_name})
117-
assert successfully_prepared in output
118-
119-
assert build_successful in output
120-
assert successfully_built in output
121-
assert error not in output.lower()
122-
assert "FAILURE" not in output
123-
116+
Tns.build_android(attributes={"--path": self.app_name}, log_trace=True)
124117
assert File.exists(self.app_name + "/platforms/android/build/outputs/apk/TestApp-debug.apk")
125118
assert File.exists(self.app_name + "/platforms/android/src/main/assets/app/tns_modules/tns-plugin/index.js")
126119

tests/build/android/prepare_android_tests.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,6 @@ def test_310_prepare_should_flatten_scoped_dependencies(self):
129129
ng_path = os.path.join(self.app_name, TnsAsserts.PLATFORM_ANDROID_NPM_MODULES_PATH, '@angular', 'core')
130130
assert File.exists(ng_path), "Scoped dependencies are flattened, please see #1783!"
131131

132-
@unittest.skip("TODO: Fix the test")
133-
def test_320_unmet_peer_dependencies_do_not_stop_prepare(self):
134-
Tns.create_app_ng(self.app_name, update_modules=True)
135-
# Cleanup node_modules and let CLI install npm dependencies
136-
Folder.cleanup(os.path.join(TEST_RUN_HOME, self.app_name, 'node_modules'))
137-
output = Tns.prepare_android(attributes={"--path": self.app_name})
138-
assert "requires a peer of tns-core-modules" in output, "No npm warning for unmet peer dependencies."
139-
assert "but none was installed" in output, "No npm warning for unmet peer dependencies."
140-
141132
def test_400_prepare_missing_or_missing_platform(self):
142133
Tns.create_app(self.app_name, update_modules=False)
143134

tests/build/ios/build_ios_tests.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,11 @@ def test_310_build_ios_with_copy_to(self):
124124
Tns.create_app(self.app_name)
125125
Tns.platform_add_ios(attributes={"--path": self.app_name, "--frameworkPath": IOS_RUNTIME_PATH})
126126

127-
Tns.build_ios(attributes={"--path": self.app_name, "--copy-to": "./"})
127+
Tns.build_ios(attributes={"--path": self.app_name, "--copy-to": "./"}, log_trace=True)
128128
assert File.exists("TestApp.app")
129129

130-
Tns.build_ios(attributes={"--path": self.app_name, "--forDevice": "", "--release": "", "--copy-to": "./"})
130+
Tns.build_ios(attributes={"--path": self.app_name, "--forDevice": "", "--release": "", "--copy-to": "./"},
131+
log_trace=True)
131132
assert File.exists("TestApp.ipa")
132133

133134
def test_320_build_ios_with_custom_entitlements(self):

0 commit comments

Comments
 (0)