-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vasil Chimev
authored and
Vasil Chimev
committed
Oct 29, 2015
1 parent
3799f6c
commit 5eb6457
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import unittest | ||
|
||
from helpers._os_lib import CleanupFolder, runAUT, FileExists | ||
from helpers._tns_lib import iosRuntimeSymlinkPath, \ | ||
tnsPath, Prepare, CreateProjectAndAddPlatform | ||
|
||
|
||
class Plugins_OSX_Sandbox_Pods(unittest.TestCase): | ||
|
||
def setUp(self): | ||
|
||
print "" | ||
print "#####" | ||
print self.id() | ||
print "#####" | ||
print "" | ||
|
||
runAUT("rm -rf ~/Library/Developer/Xcode/DerivedData/*") # Delete derived data | ||
CleanupFolder('./TNS_App') | ||
|
||
def tearDown(self): | ||
pass | ||
|
||
def test_001_PluginAdd_Sandbox_Pod_CanWriteInAppFolder(self): | ||
CreateProjectAndAddPlatform(projName="TNS_App", platform="ios", frameworkPath=iosRuntimeSymlinkPath, symlink=True) | ||
|
||
output = runAUT(tnsPath + " plugin add QA-TestApps/CocoaPods/nativescript-ios-working-with-sandbox-plugin --path TNS_App") | ||
assert ("Successfully installed plugin nativescript-ios-working-with-sandbox-plugin." in output) | ||
|
||
output = runAUT("cat TNS_App/package.json") | ||
assert ("nativescript-ios-working-with-sandbox-plugin" in output) | ||
|
||
output = Prepare(platform="ios", path="TNS_App") | ||
assert ("Successfully prepared plugin nativescript-ios-working-with-sandbox-plugin for ios." in output) | ||
|
||
output = runAUT("cat TNS_App/platforms/ios/TNSApp/app/I_MADE_THIS_FILE.txt") | ||
assert ("content" in output) | ||
|
||
def test_401_PluginAdd_Sandbox_Pod_CanNotWriteOutsideAppFolder(self): | ||
CreateProjectAndAddPlatform(projName="TNS_App", platform="ios", frameworkPath=iosRuntimeSymlinkPath, symlink=True) | ||
|
||
output = runAUT(tnsPath + " plugin add QA-TestApps/CocoaPods/nativescript-ios-fail-with-sandbox-plugin --path TNS_App") | ||
assert ("Successfully installed plugin nativescript-ios-fail-with-sandbox-plugin." in output) | ||
|
||
output = runAUT("cat TNS_App/package.json") | ||
assert ("nativescript-ios-fail-with-sandbox-plugin" in output) | ||
|
||
output = Prepare(platform="ios", path="TNS_App") | ||
assert ("Successfully prepared plugin nativescript-ios-fail-with-sandbox-plugin for ios." in output) | ||
|
||
assert ("sh: ../I_MADE_THIS_FILE.txt: Operation not permitted" in output) | ||
assert not FileExists("TNS_App/platforms/I_MADE_THIS_FILE.txt") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters