mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Drawing tests structure cleanup
This commit is contained in:
@@ -72,5 +72,5 @@ var Constants = {
|
||||
EMPTY_FUNCTION : function () {},
|
||||
|
||||
// TESTS
|
||||
BASE_TEST_FOLDER : 'integration/casperjs/drawing-records'
|
||||
DRAWING_TEST_FOLDER : 'drawing'
|
||||
};
|
||||
@@ -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();
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
};
|
||||
|
||||
ns.TestRecordController.prototype.onTestRecordEnd_ = function (evt, success) {
|
||||
console.log('test finished : ', success);
|
||||
window.alert('Test finished : ', success);
|
||||
};
|
||||
|
||||
})();
|
||||
Reference in New Issue
Block a user