Skip to content

Commit a44db5f

Browse files
Vasil ChimevVasil Chimev
Vasil Chimev
authored and
Vasil Chimev
committed
Fix LiveSync Android device tests.
1 parent 912e026 commit a44db5f

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

helpers/device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def StopEmulators():
5252
KillProcess("emulator64-x86")
5353

5454
def StopSimulators():
55-
KillProcess("launchd_sim")
55+
KillProcess("iOS Simulator")
5656

5757
def GivenRunningEmulator():
5858

tests/livesync_android.py

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,22 @@ def tearDown(self):
3434
def tearDownClass(cls):
3535
pass
3636

37-
def test_001_LiveSync_Android_XmlFile(self):
37+
def test_001_LiveSync_Android_XmlJsCss_Files(self):
3838
CreateProjectAndAddPlatform(projName="TNS_App", platform="android", frameworkPath=androidRuntimePath)
3939
Run(platform="android", path="TNS_App")
4040

4141
replace("TNS_App/app/main-page.xml", "TAP", "TEST")
42+
replace("TNS_App/app/main-view-model.js", "taps", "clicks")
43+
replace("TNS_App/app/app.css", "30", "20")
44+
4245
LiveSync(platform="android", path="TNS_App")
4346

4447
output = catAppFile("android", "TNSApp", "app/main-page.xml")
4548
assert ("<Button text=\"TEST\" tap=\"{{ tapAction }}\" />" in output)
49+
output = catAppFile("android", "TNSApp", "app/main-view-model.js")
50+
assert ("this.set(\"message\", this.counter + \" clicks left\");" in output)
51+
output = catAppFile("android", "TNSApp", "app/app.css")
52+
assert ("font-size: 20;" in output)
4653

4754
def test_002_LiveSync_Android_Device_XmlFile(self):
4855
CreateProjectAndAddPlatform(projName="TNS_App", platform="android", frameworkPath=androidRuntimePath)
@@ -93,21 +100,7 @@ def test_004_LiveSync_Android_Watch(self):
93100
print "force killing child ..."
94101
pr.kill()
95102

96-
def test_011_LiveSync_Android_CssJs_Files(self):
97-
CreateProjectAndAddPlatform(projName="TNS_App", platform="android", frameworkPath=androidRuntimePath)
98-
Run(platform="android", path="TNS_App")
99-
100-
replace("TNS_App/app/app.css", "30", "20")
101-
replace("TNS_App/app/main-view-model.js", "taps", "clicks")
102-
LiveSync(platform="android", path="TNS_App")
103-
104-
output = catAppFile("android", "TNSApp", "app/app.css")
105-
assert ("font-size: 20;" in output)
106-
107-
output = catAppFile("android", "TNSApp", "app/main-view-model.js")
108-
assert ("this.set(\"message\", this.counter + \" clicks left\");" in output)
109-
110-
def test_012_LiveSync_Android_TnsModules_Files(self):
103+
def test_011_LiveSync_Android_TnsModules_Files(self):
111104
CreateProjectAndAddPlatform(projName="TNS_App", platform="android", frameworkPath=androidRuntimePath)
112105
Run(platform="android", path="TNS_App")
113106

@@ -162,7 +155,6 @@ def test_302_LiveSync(self):
162155
output = LiveSync(path="TNS_App", assertSuccess=False)
163156

164157
assert ("Multiple device platforms detected (iOS and Android). Specify platform or device on command line." in output)
165-
assert ("# livesync" in output)
166158

167159
# # TODO: Implement it.
168160
# @unittest.skip("Fix LiveSync for Android device.")

0 commit comments

Comments
 (0)