Skip to content

Update a test to cover Run->LiveSync->Run workflow on an android device with API level 21. #7

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

Merged
merged 1 commit into from
Oct 1, 2015
Merged
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
11 changes: 9 additions & 2 deletions tests/livesync_android.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class LiveSync_Android(unittest.TestCase):
def setUpClass(cls):
StopEmulators()
StopSimulators()

CleanupFolder('./TNS_App')
CreateProjectAndAddPlatform(projName="TNS_App", platform="android", frameworkPath=androidRuntimePath)
Run(platform="android", path="TNS_App")

def setUp(self):

print ""
Expand Down Expand Up @@ -52,6 +52,7 @@ def test_001_LiveSync_Android_XmlJsCss_Files(self):
output = catAppFile("android", "TNSApp", "app/app.css")
assert ("font-size: 20;" in output)

# This tests the Run -> LiveSync -> Run workflow on an android device with API level 21.
def test_002_LiveSync_Android_Device_XmlFile(self):

replace("TNS_App/app/main-page.xml", "TAP", "TEST")
Expand All @@ -60,6 +61,12 @@ def test_002_LiveSync_Android_Device_XmlFile(self):
output = catAppFile("android", "TNSApp", "app/main-page.xml")
assert ("<Button text=\"TEST\" tap=\"{{ tapAction }}\" />" in output)

replace("TNS_App/app/main-page.xml", "TEST", "RUN")
Run(platform="android", path="TNS_App")

output = catAppFile("android", "TNSApp", "app/main-page.xml")
assert ("<Button text=\"RUN\" tap=\"{{ tapAction }}\" />" in output)

@unittest.skip("TODO: Fix this test.")
def test_004_LiveSync_Android_Watch(self):

Expand Down