From 79b48f634107146bbab3aa42dccb983b308e62cf Mon Sep 17 00:00:00 2001 From: plamen5kov Date: Mon, 21 Nov 2016 17:27:08 +0200 Subject: [PATCH] updated tests there was a functionality in cli that is obsolete (--symlink) is no longer possible removed the tests concerning the --symlink functionality and updated ones that could stay --- tests/angular/CreateNG_Tests.py | 3 ++- tests/build/PlatformiOS_Tests.py | 33 +++--------------------------- tests/unittests/UnitTests_Tests.py | 2 +- 3 files changed, 6 insertions(+), 32 deletions(-) diff --git a/tests/angular/CreateNG_Tests.py b/tests/angular/CreateNG_Tests.py index 1ff3d795..5e556c70 100644 --- a/tests/angular/CreateNG_Tests.py +++ b/tests/angular/CreateNG_Tests.py @@ -22,7 +22,8 @@ def assert_angular_project(self): assert Folder.exists(self.app_name + "/node_modules/tns-core-modules") assert Folder.exists(self.app_name + "/hooks") - assert Folder.exists(self.app_name + "/app/App_Resources") + #TODO: plamen5kov: return check when we publish 2.5 templates that include App_Resources folder + # assert Folder.exists(self.app_name + "/app/App_Resources") def test_101_create_ng_project(self): output = Tns.create_app(self.app_name, attributes={"--ng": ""}, update_modules=False) diff --git a/tests/build/PlatformiOS_Tests.py b/tests/build/PlatformiOS_Tests.py index feac3bda..f4e08b8b 100644 --- a/tests/build/PlatformiOS_Tests.py +++ b/tests/build/PlatformiOS_Tests.py @@ -27,8 +27,7 @@ def setUp(self): def test_001_platform_list_ios_project(self): Tns.create_app(self.app_name) Tns.platform_add_ios(attributes={"--path": self.app_name, - "--frameworkPath": IOS_RUNTIME_SYMLINK_PATH, - "--symlink": "" + "--frameworkPath": IOS_RUNTIME_SYMLINK_PATH }) output = Tns.run_tns_command("platform list", attributes={"--path": self.app_name}) assert "The project is not prepared for any platform" in output @@ -39,8 +38,7 @@ def test_001_platform_list_ios_project(self): assert "The project is prepared for: ios" in output assert "Installed platforms: ios" in output Tns.platform_add_android(attributes={"--path": self.app_name, - "--frameworkPath": ANDROID_RUNTIME_PATH, - "--symlink": "" + "--frameworkPath": ANDROID_RUNTIME_PATH }) output = Tns.run_tns_command("platform list", attributes={"--path": self.app_name}) assert "The project is prepared for: ios" in output @@ -55,18 +53,6 @@ def test_002_platform_add_ios(self): Tns.create_app(self.app_name) Tns.platform_add_ios(attributes={"--path": self.app_name}) - def test_003_platform_add_ios_symlink_and_framework_path(self): - Tns.create_app(self.app_name) - Tns.platform_add_ios(attributes={"--path": self.app_name, - "--frameworkPath": IOS_RUNTIME_SYMLINK_PATH, - "--symlink": "" - }) - - # Verify Runtime is symlink - output = run("ls -la " + self.app_name + "/platforms/ios/") - assert "internal ->" in output - assert "package/framework/internal" in output - def test_200_platform_add_ios_framework_path(self): Tns.create_app(self.app_name) Tns.platform_add_ios(attributes={"--path": self.app_name, @@ -86,18 +72,6 @@ def test_201_platform_remove_ios(self): output = File.read(self.app_name + os.sep + "package.json") assert "tns-ios" not in output - def test_202_platform_remove_ios_symlink(self): - Tns.create_app(self.app_name) - Tns.platform_add_ios(attributes={"--path": self.app_name, - "--frameworkPath": IOS_RUNTIME_SYMLINK_PATH, - "--symlink": "" - }) - - Tns.platform_remove(platform="ios", attributes={"--path": self.app_name}) - assert Folder.is_empty(self.app_name + '/platforms') - output = File.read(self.app_name + os.sep + "package.json") - assert "tns-ios" not in output - def test_300_platform_add_ios_custom_version(self): Tns.create_app(self.app_name) Tns.platform_add_ios(version="2.1.0", attributes={"--path": self.app_name}) @@ -130,8 +104,7 @@ def test_320_platform_add_ios_custom_bundle_id(self): # Add iOS platform Tns.platform_add_ios(attributes={"--path": self.app_name, - "--frameworkPath": IOS_RUNTIME_SYMLINK_PATH, - "--symlink": "" + "--frameworkPath": IOS_RUNTIME_SYMLINK_PATH }) # Verify plist file in native project (after prepare) diff --git a/tests/unittests/UnitTests_Tests.py b/tests/unittests/UnitTests_Tests.py index 5abbdd37..00161eca 100644 --- a/tests/unittests/UnitTests_Tests.py +++ b/tests/unittests/UnitTests_Tests.py @@ -36,7 +36,7 @@ def test_101_test_init_jasmine(self): output = run("cat " + self.app_name + "/package.json") assert "karma-jasmine" in output - assert "jasmine-core" in output + # assert "jasmine-core" in output //no such package is being installed (we install karma, karma-jasmine, karma-nativescript-launcher none of which install jasmine-core) output = run("cat " + self.app_name + "/karma.conf.js") assert "frameworks: ['jasmine']" in output