diff --git a/ide/static/ide/js/editor.js b/ide/static/ide/js/editor.js index a2cb42b0..70bb64f7 100644 --- a/ide/static/ide/js/editor.js +++ b/ide/static/ide/js/editor.js @@ -49,7 +49,9 @@ CloudPebble.Editor = (function() { var platform_name = ConnectionPlatformNames[platform]; CloudPebble.Prompts.Progress.Show("Testing", "Starting test"); - CloudPebble.Compile.GetPlatformsCompiledFor().then(function(platforms) { + CloudPebble.Editor.SaveAll().then(function() { + return CloudPebble.Compile.GetPlatformsCompiledFor(); + }).then(function(platforms) { if (platforms.length == 0) { throw new Error(gettext("Project must be compiled before testing")) } @@ -64,8 +66,9 @@ CloudPebble.Editor = (function() { CloudPebble.Prompts.Progress.Update(gettext("Starting test")); return emulator.runTest(PROJECT_ID, test_id, platform_name, options.update); }).then(function (result) { - CloudPebble.Prompts.Progress.Hide(); return CloudPebble.TestManager.ShowLiveTestRun(result['subscribe_url'], result['session_id'], result['run_id']); + }).then(function(){ + CloudPebble.Prompts.Progress.Hide(); }).catch(function (error) { CloudPebble.Prompts.Progress.Update(error.message); CloudPebble.Prompts.Progress.Fail(); diff --git a/ide/static/ide/js/monkey/test_manager.jsx b/ide/static/ide/js/monkey/test_manager.jsx index 0ed6174c..dcaed13b 100644 --- a/ide/static/ide/js/monkey/test_manager.jsx +++ b/ide/static/ide/js/monkey/test_manager.jsx @@ -535,8 +535,8 @@ CloudPebble.TestManager = (function() { }, ShowLiveTestRun(url, session_id, run_id) { const api = get_api(); - api.Logs.subscribe(run_id, session_id, url); - return api.Route.navigate('sessions', session_id) + return api.Tests.refresh() + .then(() => api.Route.navigate('sessions', session_id)) .then(() => api.Route.navigate('/logs', run_id)) .then(show_test_manager_pane); }, diff --git a/utils/monkeyscript_helpers.py b/utils/monkeyscript_helpers.py index fea06f5d..13e596b5 100644 --- a/utils/monkeyscript_helpers.py +++ b/utils/monkeyscript_helpers.py @@ -81,7 +81,7 @@ def frame_test_file(test_file, test_name, app_name, uuid): """ return test_template.format( test_name=test_name, - app_name=app_name, + app_name=app_name.lower(), uuid=uuid, content="".join(' %s' % l for l in test_file.readlines()) )