Skip to content

Commit 2279a18

Browse files
committed
Fix test in PluginsiOS_Tests.py
1 parent 72b3fea commit 2279a18

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

core/tns/tns.py

+1
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ def build_ios(attributes={}, assert_success=True, tns_path=None):
316316
assert "BUILD SUCCEEDED" in output
317317
assert "Project successfully built" in output
318318
assert "ERROR" not in output
319+
assert "malformed" not in output
319320
assert codesign in output
320321
app_name = Tns.__get_app_name_from_attributes(attributes=attributes)
321322
app_id = Tns.__get_final_package_name(app_name, platform=Platforms.IOS)

tests/plugin/PluginsiOS_Tests.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,11 @@ def test_204_build_app_with_plugin_inside_project(self):
104104

105105
current_dir = os.getcwd()
106106
os.chdir(os.path.join(current_dir, self.app_name))
107-
output = Tns.run_tns_command("plugin add tns-plugin", tns_path=os.path.join("..", TNS_PATH))
107+
output = Tns.plugin_add(name="tns-plugin", tns_path=os.path.join("..", TNS_PATH), assert_success=False)
108108
os.chdir(current_dir)
109109
assert "Successfully installed plugin tns-plugin" in output
110110

111-
output = Tns.build_ios(attributes={"--path": self.app_name})
112-
assert successfully_prepared in output
113-
assert "** BUILD SUCCEEDED **" in output
114-
assert error not in output.lower()
115-
assert "malformed" not in output
111+
Tns.build_ios(attributes={"--path": self.app_name})
116112

117113
def test_300_build_app_with_plugin_outside(self):
118114
Tns.create_app(self.app_name)
@@ -135,7 +131,7 @@ def test_301_build_app_for_both_platforms(self):
135131
assert File.exists(self.app_name + "/node_modules/tns-plugin/test2.ios.xml")
136132

137133
Tns.build_ios(attributes={"--path": self.app_name})
138-
Tns.build_android(attributes={"--path ": self.app_name})
134+
Tns.build_android(attributes={"--path": self.app_name})
139135

140136
assert File.exists(self.app_name + "/platforms/android/build/outputs/apk/TNSApp-debug.apk")
141137
assert File.exists(self.app_name + "/platforms/android/src/main/assets/app/tns_modules/tns-plugin/index.js")

0 commit comments

Comments
 (0)