Drawing tests structure cleanup

This commit is contained in:
jdescottes
2014-08-26 08:21:58 +02:00
parent 35d4be5d3e
commit b2ab504422
22 changed files with 21 additions and 20 deletions

View File

@@ -72,5 +72,5 @@ var Constants = {
EMPTY_FUNCTION : function () {},
// TESTS
BASE_TEST_FOLDER : 'integration/casperjs/drawing-records'
DRAWING_TEST_FOLDER : 'drawing'
};

View File

@@ -3,7 +3,7 @@
ns.DrawingTestSuiteController = function (suitePath) {
if (suitePath.indexOf('/') === -1) {
suitePath = [Constants.BASE_TEST_FOLDER, suitePath].join('/');
suitePath = [Constants.DRAWING_TEST_FOLDER, suitePath].join('/');
}
this.suitePath = suitePath;
this.testSuiteRunner = null;
@@ -41,7 +41,7 @@
ns.DrawingTestSuiteController.prototype.onTestSuiteLoaded_ = function (response) {
var testPaths = JSON.parse(response.responseText).tests;
testPaths = testPaths.map(function (path) {
return this.suitePath.replace(/\/([^\/]+\.json)/i, '/' + path);
return [Constants.DRAWING_TEST_FOLDER, 'tests', path].join('/');
}.bind(this));
this.testSuiteRunner = new ns.DrawingTestSuiteRunner(testPaths);
this.testSuiteRunner.start();

View File

@@ -70,7 +70,7 @@
};
ns.TestRecordController.prototype.onTestRecordEnd_ = function (evt, success) {
console.log('test finished : ', success);
window.alert('Test finished : ', success);
};
})();