X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=Gruntfile.js;h=1ecc2c032fab3e0d7dab7c429c4ff882a31f8741;hb=07157675bdaaaa1ae982b658d98dce41fb24b6e9;hp=0e1c8cb2c2826d4196cbb762ccf277d5cd7a8db1;hpb=c10cdec089b69d32bf81c6a36031a27fd70bb1f1;p=lhc%2Fweb%2Fwiklou.git diff --git a/Gruntfile.js b/Gruntfile.js index 0e1c8cb2c2..1ecc2c032f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,6 +4,7 @@ module.exports = function ( grunt ) { var wgServer = process.env.MW_SERVER, wgScriptPath = process.env.MW_SCRIPT_PATH, + WebdriverIOconfigFile, karmaProxy = {}; grunt.loadNpmTasks( 'grunt-banana-checker' ); @@ -13,12 +14,19 @@ 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, changeOrigin: true }; + if ( process.env.JENKINS_HOME ) { + WebdriverIOconfigFile = './tests/selenium/wdio.conf.jenkins.js'; + } else { + WebdriverIOconfigFile = './tests/selenium/wdio.conf.js'; + } + grunt.initConfig( { eslint: { all: [ @@ -105,7 +113,15 @@ module.exports = function ( grunt ) { return require( 'path' ).join( dest, src.replace( 'resources/', '' ) ); } } + }, + + // Configure WebdriverIO task + webdriver: { + test: { + configFile: WebdriverIOconfigFile + } } + } ); grunt.registerTask( 'assert-mw-env', function () {