Skip to content

updated tests #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/angular/CreateNG_Tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
33 changes: 3 additions & 30 deletions tests/build/PlatformiOS_Tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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,
Expand All @@ -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})
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/UnitTests_Tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down