Skip to content

Commit

Permalink
Interface/test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Atkins-Turkish committed Jul 7, 2016
1 parent 73c5e26 commit 7144d9b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions ide/static/ide/js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}
Expand All @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions ide/static/ide/js/monkey/test_manager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down
2 changes: 1 addition & 1 deletion utils/monkeyscript_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
)

0 comments on commit 7144d9b

Please sign in to comment.