Skip to content

Commit 7144d9b

Browse files
author
Joseph Atkins-Turkish
committed
Interface/test fixes
1 parent 73c5e26 commit 7144d9b

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

ide/static/ide/js/editor.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ CloudPebble.Editor = (function() {
4949
var platform_name = ConnectionPlatformNames[platform];
5050

5151
CloudPebble.Prompts.Progress.Show("Testing", "Starting test");
52-
CloudPebble.Compile.GetPlatformsCompiledFor().then(function(platforms) {
52+
CloudPebble.Editor.SaveAll().then(function() {
53+
return CloudPebble.Compile.GetPlatformsCompiledFor();
54+
}).then(function(platforms) {
5355
if (platforms.length == 0) {
5456
throw new Error(gettext("Project must be compiled before testing"))
5557
}
@@ -64,8 +66,9 @@ CloudPebble.Editor = (function() {
6466
CloudPebble.Prompts.Progress.Update(gettext("Starting test"));
6567
return emulator.runTest(PROJECT_ID, test_id, platform_name, options.update);
6668
}).then(function (result) {
67-
CloudPebble.Prompts.Progress.Hide();
6869
return CloudPebble.TestManager.ShowLiveTestRun(result['subscribe_url'], result['session_id'], result['run_id']);
70+
}).then(function(){
71+
CloudPebble.Prompts.Progress.Hide();
6972
}).catch(function (error) {
7073
CloudPebble.Prompts.Progress.Update(error.message);
7174
CloudPebble.Prompts.Progress.Fail();

ide/static/ide/js/monkey/test_manager.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@ CloudPebble.TestManager = (function() {
535535
},
536536
ShowLiveTestRun(url, session_id, run_id) {
537537
const api = get_api();
538-
api.Logs.subscribe(run_id, session_id, url);
539-
return api.Route.navigate('sessions', session_id)
538+
return api.Tests.refresh()
539+
.then(() => api.Route.navigate('sessions', session_id))
540540
.then(() => api.Route.navigate('/logs', run_id))
541541
.then(show_test_manager_pane);
542542
},

utils/monkeyscript_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def frame_test_file(test_file, test_name, app_name, uuid):
8181
"""
8282
return test_template.format(
8383
test_name=test_name,
84-
app_name=app_name,
84+
app_name=app_name.lower(),
8585
uuid=uuid,
8686
content="".join(' %s' % l for l in test_file.readlines())
8787
)

0 commit comments

Comments
 (0)