X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=Gruntfile.js;h=69a123cc9f443765702ab84676623a7b9b8ab6fa;hb=2cecc8d7be6213c7d03d072882b51680e94e06db;hp=0e1c8cb2c2826d4196cbb762ccf277d5cd7a8db1;hpb=d17eeb742a26c2567de96872c0419b39b97cde56;p=lhc%2Fweb%2Fwiklou.git diff --git a/Gruntfile.js b/Gruntfile.js index 0e1c8cb2c2..69a123cc9f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -13,6 +13,7 @@ module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.loadNpmTasks( 'grunt-karma' ); grunt.loadNpmTasks( 'grunt-stylelint' ); + grunt.loadNpmTasks( 'grunt-webdriver' ); karmaProxy[ wgScriptPath ] = { target: wgServer + wgScriptPath, @@ -36,8 +37,6 @@ module.exports = function ( grunt ) { '!extensions/**/*.js', '!skins/**/*.js', // Skip functions aren't even parseable - '!resources/src/dom-level2-skip.js', - '!resources/src/es5-skip.js', '!resources/src/mediawiki.hidpi-skip.js' ] }, @@ -56,9 +55,6 @@ module.exports = function ( grunt ) { installer: 'includes/installer/i18n/' }, stylelint: { - options: { - syntax: 'less' - }, src: '{resources/src,mw-config}/**/*.{css,less}' }, watch: { @@ -80,11 +76,14 @@ module.exports = function ( grunt ) { } ], logLevel: 'DEBUG', frameworks: [ 'qunit' ], - reporters: [ 'progress' ], + reporters: [ 'mocha' ], singleRun: true, autoWatch: false, // Some tests in extensions don't yield for more than the default 10s (T89075) - browserNoActivityTimeout: 60 * 1000 + browserNoActivityTimeout: 60 * 1000, + // Karma requires Same-Origin (or CORS) by default since v1.1.1 + // for better stacktraces. But we load the first request from wgServer + crossOriginAttribute: false }, main: { browsers: [ 'Chrome' ] @@ -92,8 +91,8 @@ module.exports = function ( grunt ) { chromium: { browsers: [ 'Chromium' ] }, - more: { - browsers: [ 'Chrome', 'Firefox' ] + firefox: { + browsers: [ 'Firefox' ] } }, copy: { @@ -105,7 +104,15 @@ module.exports = function ( grunt ) { return require( 'path' ).join( dest, src.replace( 'resources/', '' ) ); } } + }, + + // Configure WebdriverIO task + webdriver: { + test: { + configFile: './tests/selenium/wdio.conf.js' + } } + } ); grunt.registerTask( 'assert-mw-env', function () {