Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-05-21 14:54:34 +0400
committerVincent Petry <pvince81@owncloud.com>2014-05-30 12:06:29 +0400
commit1d9129eac35b49a4e8d0d642a68d7d634f31c905 (patch)
tree513bdd46bb2e557bbac678aff73d1766b8e3c9c6 /tests/karma.config.js
parent6fbf4d8548133dff4419e5e2e0c649f49e177669 (diff)
Sharing overview fixes and unit tests
- Fixed renaming and fileActionsReady event - Added unit tests for shares list - Fixed public page with defer - Fixed file actions in sharing overview - Fixed sharing counterpart list (10 entries max) - Fixed file path attribute to be used in download action - Fix sharing list headers - OC.Share icons now operate on fileList instance - Fix OC.Share.updateIcon when more than one list in DOM
Diffstat (limited to 'tests/karma.config.js')
-rw-r--r--tests/karma.config.js43
1 files changed, 35 insertions, 8 deletions
diff --git a/tests/karma.config.js b/tests/karma.config.js
index 08b49d854e0..846e8f7be91 100644
--- a/tests/karma.config.js
+++ b/tests/karma.config.js
@@ -43,7 +43,19 @@ module.exports = function(config) {
return apps;
*/
// other apps tests don't run yet... needs further research / clean up
- return ['files', 'files_trashbin'];
+ return [
+ 'files',
+ 'files_trashbin',
+ {
+ name: 'files_sharing',
+ srcFiles: [
+ // only test these files, others are not ready and mess
+ // up with the global namespace/classes/state
+ 'apps/files_sharing/js/app.js',
+ 'apps/files_sharing/js/sharedfilelist.js'
+ ],
+ testFiles: ['apps/files_sharing/tests/js/*.js']
+ }];
}
// respect NOCOVERAGE env variable
@@ -110,15 +122,30 @@ module.exports = function(config) {
files.push(corePath + 'tests/specs/*.js');
}
- for ( var i = 0; i < appsToTest.length; i++ ) {
- // add app JS
- var srcFile = 'apps/' + appsToTest[i] + '/js/*.js';
- files.push(srcFile);
+ function addApp(app) {
+ // if only a string was specified, expand to structure
+ if (typeof(app) === 'string') {
+ app = {
+ srcFiles: 'apps/' + app + '/js/*.js',
+ testFiles: 'apps/' + app + '/tests/js/*.js'
+ };
+ }
+
+ // add source files/patterns
+ files = files.concat(app.srcFiles || []);
+ // add test files/patterns
+ files = files.concat(app.testFiles || []);
if (enableCoverage) {
- preprocessors[srcFile] = 'coverage';
+ // add coverage entry for each file/pattern
+ for (var i = 0; i < app.srcFiles.length; i++) {
+ preprocessors[app.srcFiles[i]] = 'coverage';
+ }
}
- // add test specs
- files.push('apps/' + appsToTest[i] + '/tests/js/*.js');
+ }
+
+ // add source files for apps to test
+ for ( var i = 0; i < appsToTest.length; i++ ) {
+ addApp(appsToTest[i]);
}
// serve images to avoid warnings