From 345559bf538bdd43dd28a3f790fb03ec85989e5b Mon Sep 17 00:00:00 2001 From: fredck Date: Wed, 13 May 2015 13:49:04 +0200 Subject: [PATCH] Customized the test display name in the dashboard list. --- dev/bender/plugins/ckeditor5/lib/index.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/dev/bender/plugins/ckeditor5/lib/index.js b/dev/bender/plugins/ckeditor5/lib/index.js index 71f96e2d4ab..bb86daf1b1a 100644 --- a/dev/bender/plugins/ckeditor5/lib/index.js +++ b/dev/bender/plugins/ckeditor5/lib/index.js @@ -15,6 +15,20 @@ var files = [ module.exports = { name: 'bender-ckeditor5', - files: files, - include: files + attach: function() { + var that = this; + var bender = that; + + bender.plugins.addFiles( files ); + bender.plugins.addInclude( files ); + + bender.on( 'test:created', function( test ) { + var name = test.displayName; + + name = name.replace( /node_modules\/ckeditor5-core/, 'core: ' ); + name = name.replace( /node_modules\/ckeditor5-plugin-([^\/]+)/, 'plugin!$1: ' ); + + test.displayName = name; + } ); + } };