]>
Commit | Line | Data |
---|---|---|
947f0963 TL |
1 | SenchaTestRunner.bindings = { |
2 | ||
3 | setCurrentScript : function(script) { | |
4 | jasmine.setCurrentScript(script); | |
5 | }, | |
6 | ||
7 | waitUntilPageIsReady : function(callbackFunction) { | |
8 | var args = arguments; | |
9 | if (typeof Ext !== 'undefined') { | |
10 | Ext.require('*'); | |
11 | Ext.onReady(function() { | |
12 | callbackFunction(); | |
13 | }); | |
14 | } else { | |
15 | callbackFunction(); | |
16 | } | |
17 | }, | |
18 | ||
19 | startTestRunner : function(jsonOptions, contextDirectoryMapping) { | |
20 | // jasmine.contextMapping = JSON.parse(contextDirectoryMapping); | |
21 | jasmine.setOptions(jsonOptions); | |
22 | jasmine.initDebug(); | |
23 | jasmine.getEnv().addReporter(new SenchaTestRunner.Reporter()); | |
24 | jasmine.getEnv().execute(); | |
25 | }, | |
26 | ||
27 | testsAreRunning : function() { | |
28 | return SenchaTestRunner.isRunning(); | |
29 | }, | |
30 | ||
31 | getTestResultsAsJson : function() { | |
32 | return JSON.stringify(SenchaTestRunner.results); | |
33 | } | |
34 | ||
35 | }; |