Skip to content

Commit cd70496

Browse files
Vasil ChimevVasil Chimev
Vasil Chimev
authored and
Vasil Chimev
committed
Update test to run an app with renamed project root dir.
NativeScript/nativescript-cli#1041
1 parent 2ea87ea commit cd70496

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

run_tests.py

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def AnalyzeResultAndExit():
3535
# Cleanup folders created by test execution
3636
remove('stderr.txt')
3737
CleanupFolder('app')
38+
CleanupFolder('appTest')
3839
CleanupFolder('TNS App')
3940
CleanupFolder('TNS_App')
4041
CleanupFolder('TNS_TempApp')

tests/run_linux.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ def setUp(self):
2626
GivenRunningEmulator()
2727
GivenRealDeviceRunning(platform="android")
2828
CleanupFolder('./TNS_App/platforms/android/build/outputs')
29+
CleanupFolder('./appTest')
2930

3031
def tearDown(self):
3132
pass
3233

3334
@classmethod
3435
def tearDownClass(cls):
36+
CleanupFolder('./appTest')
3537
CleanupFolder('./TNS_App')
3638
CleanupFolder('./TNS_App_NoPlatform')
3739

@@ -69,11 +71,13 @@ def test_200_Run_Android_InsideProject(self):
6971
assert ("Project successfully built" in output)
7072
assert ("Successfully deployed on device with identifier" in output)
7173

72-
def test_201_Run_Android_DeviceId(self):
73-
output = runAUT(tnsPath + " run android --device emulator-5554 --path TNS_App --justlaunch")
74-
assert ("Project successfully prepared" in output)
75-
assert ("Project successfully built" in output)
76-
assert ("Successfully deployed on device with identifier 'emulator-5554'" in output)
74+
def test_201_Run_Android_DeviceId_RenamedProjDir(self):
75+
runAUT("mv TNS_App appTest")
76+
output = runAUT(tnsPath + " run android --device emulator-5554 --path appTest --justlaunch")
77+
assert ("Project successfully prepared" in output)
78+
assert ("Project successfully built" in output)
79+
assert ("appTest/platforms/android/build/outputs/apk/TNSApp-debug.apk" in output)
80+
assert ("Successfully deployed on device with identifier 'emulator-5554'" in output)
7781
#TODO: Get device id and verify files are deployed and process is running on this device
7882

7983
def test_300_Run_Android_PlatformNotAdded(self):

0 commit comments

Comments
 (0)