Skip to content

Commit

Permalink
Merge bd79df2 into 68f3333
Browse files Browse the repository at this point in the history
  • Loading branch information
martnpaneq committed Oct 6, 2022
2 parents 68f3333 + bd79df2 commit 62e3ad1
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 315 deletions.
4 changes: 0 additions & 4 deletions packages/ckeditor5-dev-tests/bin/test-manual.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ const options = tests.parseArguments( process.argv.slice( 2 ) );
// without rebuilding it. See: https://github.com/ckeditor/ckeditor5/issues/10982.
options.disableWatch = process.argv.includes( '--disable-watch' );

if ( options.files.length === 0 ) {
options.files = [ '*', 'ckeditor5' ];
}

// "Lark" is the default theme for tests.
options.themePath = path.resolve( cwd, 'packages', 'ckeditor5-theme-lark', 'theme', 'theme.css' );

Expand Down
9 changes: 5 additions & 4 deletions packages/ckeditor5-dev-tests/lib/tasks/runmanualtests.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ const transformFileOptionToTestGlob = require( '../utils/transformfileoptiontote
module.exports = function runManualTests( options ) {
const log = logger();
const buildDir = path.join( process.cwd(), 'build', '.manual-tests' );
const files = ( options.files && options.files.length ) ? options.files : [ '*' ];
const sourceFiles = files
.flatMap( file => transformFileOptionToTestGlob( file, true ) )
const isFilesFlagProvided = ( options.files && options.files.length );
const files = isFilesFlagProvided ? options.files : [ '*', 'ckeditor5' ];
const dedupedFileTestGlobs = [ ...new Set( files.flatMap( file => transformFileOptionToTestGlob( file, true ) ) ) ];
const sourceFiles = dedupedFileTestGlobs
.reduce( ( result, manualTestPattern ) => {
return [
...result,
Expand All @@ -60,7 +61,7 @@ module.exports = function runManualTests( options ) {
const language = options.language;
const additionalLanguages = options.additionalLanguages;
const silent = options.silent || false;
const disableWatch = options.disableWatch || false;
const disableWatch = options.disableWatch || !isFilesFlagProvided;
let socketServer;

function onTestCompilationStatus( status ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ module.exports = class WebpackNotifierPlugin {

this.log.info( '[Webpack] Finished the compilation.' );

if ( !stats.compilation.options.watch ) {
this.log.info( '[Webpack] File watcher is disabled.' );
}

this.onTestCompilationStatus( 'finished' );
} );
}
Expand Down

0 comments on commit 62e3ad1

Please sign in to comment.