mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[tests/browser] generate css before testsBundle, include css (#23794)
This commit is contained in:
parent
1f13ee6421
commit
e2ec868588
4 changed files with 11 additions and 4 deletions
|
@ -70,6 +70,7 @@ export default (kibana) => {
|
|||
}
|
||||
|
||||
testGlobs.push(`${plugin.publicDir}/**/__tests__/**/*.js`);
|
||||
testGlobs.push(`${plugin.publicDir}/**/*.css`);
|
||||
});
|
||||
} else {
|
||||
// add the modules from all of the apps
|
||||
|
@ -79,6 +80,7 @@ export default (kibana) => {
|
|||
|
||||
for (const plugin of plugins) {
|
||||
testGlobs.push(`${plugin.publicDir}/**/__tests__/**/*.js`);
|
||||
testGlobs.push(`${plugin.publicDir}/**/*.css`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,11 +71,9 @@ module.exports = function (grunt) {
|
|||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
'http://localhost:5610/bundles/vendors.bundle.js',
|
||||
'http://localhost:5610/bundles/commons.bundle.js',
|
||||
'http://localhost:5610/bundles/tests.bundle.js',
|
||||
|
||||
'http://localhost:5610/bundles/vendors.style.css',
|
||||
'http://localhost:5610/bundles/commons.style.css',
|
||||
'http://localhost:5610/bundles/tests.style.css'
|
||||
],
|
||||
|
||||
|
|
|
@ -128,6 +128,13 @@ module.exports = function (grunt) {
|
|||
...browserTestServerFlags,
|
||||
]
|
||||
}),
|
||||
browserSCSS: createKbnServerTask({
|
||||
flags: [
|
||||
...browserTestServerFlags,
|
||||
'--optimize',
|
||||
'--optimize.enabled=false'
|
||||
]
|
||||
}),
|
||||
|
||||
// used by the test:coverage task
|
||||
// runs the kibana server to serve the instrumented version of the browser test bundle
|
||||
|
|
|
@ -33,7 +33,7 @@ module.exports = function (grunt) {
|
|||
|
||||
grunt.registerTask('test:server', ['checkPlugins', 'run:mocha']);
|
||||
|
||||
grunt.registerTask('test:browser', ['checkPlugins', 'run:browserTestServer', 'karma:unit']);
|
||||
grunt.registerTask('test:browser', ['checkPlugins', 'run:browserSCSS', 'run:browserTestServer', 'karma:unit']);
|
||||
|
||||
grunt.registerTask('test:browser-ci', () => {
|
||||
const ciShardTasks = keys(grunt.config.get('karma'))
|
||||
|
@ -41,7 +41,7 @@ module.exports = function (grunt) {
|
|||
.map(key => `karma:${key}`);
|
||||
|
||||
grunt.log.ok(`Running UI tests in ${ciShardTasks.length} shards`);
|
||||
|
||||
grunt.task.run(['run:browserSCSS']);
|
||||
grunt.task.run(['run:browserTestServer', ...ciShardTasks]);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue