var wgServer = process.env.MW_SERVER,
wgScriptPath = process.env.MW_SCRIPT_PATH,
- WebdriverIOconfigFile,
karmaProxy = {};
grunt.loadNpmTasks( 'grunt-banana-checker' );
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: [
// Configure WebdriverIO task
webdriver: {
test: {
- configFile: WebdriverIOconfigFile
+ configFile: './tests/selenium/wdio.conf.js'
}
}
+++ /dev/null
-'use strict';
-const merge = require( 'deepmerge' ),
- password = 'testpass',
- username = 'WikiAdmin',
- wdioConf = require( './wdio.conf.js' );
-
-// Overwrite default settings
-exports.config = merge( wdioConf.config, {
- username: process.env.MEDIAWIKI_USER === undefined ?
- username :
- process.env.MEDIAWIKI_USER,
- password: process.env.MEDIAWIKI_PASSWORD === undefined ?
- password :
- process.env.MEDIAWIKI_PASSWORD,
- screenshotPath: '../log/',
- baseUrl: process.env.MW_SERVER + process.env.MW_SCRIPT_PATH,
- exclude: [
- './extensions/CirrusSearch/tests/selenium/specs/**/*.js'
- ],
- reporters: [ 'spec', 'junit' ],
- reporterOptions: {
- junit: {
- outputDir: '../log/'
- }
- }
-} );
'use strict';
-const password = 'vagrant',
- fs = require( 'fs' ),
- path = require( 'path' ),
+const fs = require( 'fs' ),
+ path = require( 'path' );
+
+let logPath, password, username;
+
+// username and password will be used only if
+// MEDIAWIKI_USER or MEDIAWIKI_PASSWORD environment variables are not set
+if ( process.env.JENKINS_HOME ) {
+ logPath = '../log/';
+ password = 'testpass';
+ username = 'WikiAdmin';
+} else {
+ logPath = './log/';
+ password = 'vagrant';
username = 'Admin';
+}
function relPath( foo ) {
return path.resolve( __dirname, '../..', foo );
],
// Patterns to exclude.
exclude: [
- // 'path/to/excluded/files'
+ './extensions/CirrusSearch/tests/selenium/specs/**/*.js'
],
//
// ============
bail: 0,
//
// Saves a screenshot to a given path if a command fails.
- screenshotPath: './log/',
+ screenshotPath: logPath,
//
// Set a base URL in order to shorten url command calls. If your `url` parameter starts
// with `/`, the base url gets prepended, not including the path portion of your baseUrl.
// Test reporter for stdout.
// The only one supported by default is 'dot'
// see also: http://webdriver.io/guide/testrunner/reporters.html
- reporters: [ 'spec' ],
+ reporters: [ 'spec', 'junit' ],
+ reporterOptions: {
+ junit: {
+ outputDir: logPath
+ }
+ },
//
// Options to be passed to Mocha.
// See the full list at http://mochajs.org/