Commit fe3b37b8 authored by Dumitru Corini's avatar Dumitru Corini Committed by abirembaut
Browse files

chore(all tests): Run tests in chrome (#38)

* chore(all tests): Run tests in chrome instead of electron
parent 60ecf56f
......@@ -24,7 +24,7 @@ ansiColor('xterm') {
try {
gradle 'buildUIDPage --parallel --max-workers 2'
gradle 'build'
gradle 'runTest --parallel --max-workers 2'
gradle 'runTestChrome --parallel --max-workers 2'
} finally {
junit testResults: '**/build*/tests/results/*.xml', allowEmptyResults: true
archiveArtifacts '**/build*/distributions/*.zip, **/build*/*.zip, uid-pages/**/videos/*'
......
......@@ -7,5 +7,10 @@
"reporterOptions": {
"mochaFile": "build/tests/results/test-results-output.xml",
"toConsole": true
}
},
"numTestsKeptInMemory": 20,
"viewportHeight": 768,
"viewportWidth": 1366,
"testFiles": "**/*.feature",
"chromeWebSecurity": false
}
\ No newline at end of file
......@@ -14,4 +14,8 @@
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
on('before:browser:launch', (browser, launchOptions) => {
launchOptions.args.push('--lang=en');
return launchOptions
})
}
......@@ -24,10 +24,9 @@ subprojects { subProject ->
group 'ui designer'
}
subProject.task([dependsOn: [unzip, subProject.tasks.npm_install], type: NpmTask],"runTest") {
subProject.task([dependsOn: [unzip, subProject.tasks.npm_install], type: NpmTask],"runTestChrome") {
workingDir = parentProject.projectDir
args = ['test', '--', '--project', subProject.name]
environment = [LANG: 'en_EN.UTF-8']
args = ['test', '--', '--project', subProject.name, '--browser', 'chrome', '--headless']
group 'Bonita'
}
}
......
......@@ -11,5 +11,6 @@
"numTestsKeptInMemory": 20,
"viewportHeight": 768,
"viewportWidth": 1366,
"testFiles": "**/*.feature"
"testFiles": "**/*.feature",
"chromeWebSecurity": false
}
......@@ -14,4 +14,8 @@
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
on('before:browser:launch', (browser, launchOptions) => {
launchOptions.args.push('--lang=en');
return launchOptions
})
}
......@@ -14,4 +14,8 @@
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
on('before:browser:launch', (browser, launchOptions) => {
launchOptions.args.push('--lang=en');
return launchOptions
})
}
......@@ -11,5 +11,6 @@
"numTestsKeptInMemory": 20,
"viewportHeight": 768,
"viewportWidth": 1366,
"testFiles": "**/*.feature"
"testFiles": "**/*.feature",
"chromeWebSecurity": false
}
......@@ -14,4 +14,8 @@
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
on('before:browser:launch', (browser, launchOptions) => {
launchOptions.args.push('--lang=en');
return launchOptions
})
}
......@@ -11,5 +11,6 @@
"numTestsKeptInMemory": 20,
"viewportHeight": 768,
"viewportWidth": 1366,
"testFiles": "**/*.feature"
"testFiles": "**/*.feature",
"chromeWebSecurity": false
}
......@@ -14,4 +14,8 @@
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
on('before:browser:launch', (browser, launchOptions) => {
launchOptions.args.push('--lang=en');
return launchOptions
})
}
......@@ -11,5 +11,6 @@
"numTestsKeptInMemory": 20,
"viewportHeight": 768,
"viewportWidth": 1366,
"testFiles": "**/*.feature"
"testFiles": "**/*.feature",
"chromeWebSecurity": false
}
......@@ -14,4 +14,8 @@
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
on('before:browser:launch', (browser, launchOptions) => {
launchOptions.args.push('--lang=en');
return launchOptions
})
}
......@@ -11,5 +11,6 @@
"numTestsKeptInMemory": 20,
"viewportHeight": 768,
"viewportWidth": 1366,
"testFiles": "**/*.feature"
"testFiles": "**/*.feature",
"chromeWebSecurity": false
}
......@@ -14,4 +14,8 @@
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
on('before:browser:launch', (browser, launchOptions) => {
launchOptions.args.push('--lang=en');
return launchOptions
})
}
......@@ -11,5 +11,6 @@
"numTestsKeptInMemory": 20,
"viewportHeight": 768,
"viewportWidth": 1366,
"testFiles": "**/*.feature"
"testFiles": "**/*.feature",
"chromeWebSecurity": false
}
......@@ -14,4 +14,8 @@
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
on('before:browser:launch', (browser, launchOptions) => {
launchOptions.args.push('--lang=en');
return launchOptions
})
}
......@@ -8,8 +8,9 @@
"mochaFile": "build/tests/results/test-results-output.xml",
"toConsole": true
},
"testFiles": "**/*.feature",
"numTestsKeptInMemory": 20,
"viewportHeight": 768,
"viewportWidth": 1366
"viewportWidth": 1366,
"testFiles": "**/*.feature",
"chromeWebSecurity": false
}
\ No newline at end of file
......@@ -14,4 +14,8 @@
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
on('before:browser:launch', (browser, launchOptions) => {
launchOptions.args.push('--lang=en');
return launchOptions
})
}
......@@ -11,5 +11,6 @@
"numTestsKeptInMemory": 20,
"viewportHeight": 768,
"viewportWidth": 1366,
"testFiles": "**/*.feature"
"testFiles": "**/*.feature",
"chromeWebSecurity": false
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment