Skip to content

Commit 8e4e0fa

Browse files
committed
1 parent 9f19dea commit 8e4e0fa

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

core/tns/tns.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def plugin_add(name, attributes={}, log_trace=False, assert_success=True, tns_pa
307307
output = Tns.run_tns_command("plugin add " + name, attributes=attributes, log_trace=log_trace,
308308
tns_path=tns_path)
309309
if assert_success:
310-
short_name = name.replace("@" + TAG, "").replace(".tgz", "").split(os.sep)[-1]
310+
short_name = name.rsplit('@', 1)[0].replace(".tgz", "").split(os.sep)[-1]
311311
assert "Successfully installed plugin {0}".format(short_name) in output
312312
return output
313313

tests/build/android/plugin_android_tests.py

+9
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,15 @@ def test_300_build_app_with_plugin_added_outside_project(self):
167167
output = Tns.run_tns_command("plugin", attributes={"--path": self.app_name})
168168
assert tns_plugin in output
169169

170+
def test_390_plugin_with_promise_in_hooks(self):
171+
Tns.create_app(self.app_name)
172+
Tns.plugin_add("[email protected]", attributes={"--path": self.app_name})
173+
output = Tns.prepare_android(attributes={"--path": self.app_name}, assert_success=False)
174+
assert "Failed to execute hook" in output
175+
assert "nativescript-fabric.js" in output
176+
assert "TypeError" not in output
177+
assert "Cannot read property" not in output
178+
170179
def test_400_plugin_add_not_existing_plugin(self):
171180
Tns.create_app(self.app_name)
172181
output = Tns.plugin_add("fakePlugin", attributes={"--path": self.app_name}, assert_success=False)

tests/build/ios/build_ios_provision_tests.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ def test_200_build_ios_list_provisions(self):
4646
assert PROVISIONING in output
4747
assert DEVELOPMENT_TEAM in output
4848

49-
@unittest.skipIf(Xcode.get_version() >= 9.0,
49+
@unittest.skipIf(float(Xcode.get_version()) >= 9.0,
5050
"Skip on Xcode9 because of https://github.com/NativeScript/nativescript-cli/issues/3046")
5151
def test_201_build_ios_with_provision(self):
5252
build_attributes = {"--path": self.app_name, "--forDevice": "", "--release": "", "--provision": PROVISIONING}
5353
Tns.build_ios(attributes=build_attributes)
5454

55-
@unittest.skipIf(Xcode.get_version() >= 9.0,
55+
@unittest.skipIf(float(Xcode.get_version()) >= 9.0,
5656
"Skip on Xcode9 because of https://github.com/NativeScript/nativescript-cli/issues/3046")
5757
def test_202_build_ios_with_distribution_provision(self):
5858
build_attributes = {"--path": self.app_name, "--forDevice": "", "--release": "",

0 commit comments

Comments
 (0)