Skip to content

Commit

Permalink
fix phetmarks for phet-io unit tests, remove "name", see phetsims/phe…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Jul 10, 2018
1 parent 8651c9d commit 92c197f
Showing 1 changed file with 32 additions and 33 deletions.
65 changes: 32 additions & 33 deletions js/phetmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,19 @@
} );
}

if ( hasUnitTests ) {
if ( hasUnitTests || repo === 'phet-io' ) {

var url = '../' + repo + '/' + repo + '-tests.html';

// phet-io - "all-sims' runnable to run phet-io wrapper unit tests on every phet-io outfitted simulation.
if ( repo === 'phet-io' || repo === 'phet-io-wrappers' ) {
url = '../phet-io-wrappers/phet-io-wrappers-all-sims-tests.html';
}
modes.push( {
name: 'unitTestsRequirejs',
text: 'Unit Tests (Require.js)',
description: 'Runs unit tests in require.js mode',
url: '../' + repo + '/' + repo + '-tests.html',
url: url,
queryParameters: [ { value: 'ea', text: 'Assertions', default: true } ]
} );
}
Expand Down Expand Up @@ -213,14 +220,6 @@
url: '../' + repo + '/tests/playground.html'
} );
}
if ( repo === 'phet-io' || repo === 'phet-io-wrappers' ) {
modes.push( {
name: 'test-iframe-api',
text: 'Test Wrappers and API',
description: 'test phet-io interface and wrappers',
url: '../phet-io-wrappers/phet-io-wrappers-tests.html'
} );
}
if ( repo === 'chipper' || repo === 'aqua' ) {
var generalTestParams = 'ea&audioVolume=0&testDuration=10000&testConcurrentBuilds=4';
var fuzzMouseTestParameter = [ {
Expand Down Expand Up @@ -294,13 +293,27 @@
// if a phet-io sim, then add the wrappers to them
if ( isPhetIO ) {

// omit the phet brand query parameter, but take everything else
var noPhetBrandQP = devSimQueryParameters.concat( phetIOQueryParameters ).filter( function( queryParameter ) {
return queryParameter.value !== 'brand=phet';
} );

// Add the console logging, not a wrapper but nice to have
modes.push( {
name: 'one-sim-wrapper-tests',
text: 'Wrapper Unit Tests',
description: 'Test the PhET-iO API for this sim.',
url: '../phet-io-wrappers/phet-io-wrappers-tests.html?sim=' + repo,
queryParameters: noPhetBrandQP
} );

// Add a link to the compiled index wrapper;
modes.push( {
name: 'compiled-index',
text: 'Compiled Index',
description: 'Runs the PhET-iO index wrapper from build/ directory (built from chipper)',
url: '../' + repo + '/build/phet-io/wrappers/index',
queryParameters: ( isPhetIO ? phetIOQueryParameters : [] ).concat( simQueryParameters )
queryParameters: noPhetBrandQP
} );

// phet-io wrappers
Expand All @@ -317,31 +330,19 @@
url = wrapperName === 'sonification' ? '../phet-io-wrapper-' + wrapperName + '/' + repo + '-sonification.html?sim=' + repo :
'../' + wrapper + '/' + wrapperName + '.html?sim=' + repo;

modes.push( {
name: wrapperName,
text: wrapperName,
description: 'Runs the phet-io wrapper ' + wrapperName,
url: url,
queryParameters: devSimQueryParameters.concat( phetIOQueryParameters ).filter( function( queryParameter ) {
return queryParameter.value !== 'brand=phet';
} )
} );
}

// Load the wrapper urls for the phet-io-wrappers/
else {
url = '../' + wrapper + '/' + wrapperName + '.html?sim=' + repo;

modes.push( {
name: wrapperName,
text: wrapperName,
description: 'Runs the phet-io wrapper ' + wrapperName,
url: url,
queryParameters: devSimQueryParameters.concat( phetIOQueryParameters ).filter( function( queryParameter ) {
return queryParameter.value !== 'brand=phet';
} )
} );
}
modes.push( {
name: wrapperName,
text: wrapperName,
description: 'Runs the phet-io wrapper ' + wrapperName,
url: url,
queryParameters: noPhetBrandQP
} );
} );

// Add the console logging, not a wrapper but nice to have
Expand All @@ -350,9 +351,7 @@
text: 'console: colorized',
description: 'Show the colorized event log in the console of the stand alone sim.',
url: '../' + repo + '/' + repo + '_en.html?brand=phet-io&phetioConsoleLog=colorized&phetioStandalone',
queryParameters: devSimQueryParameters.concat( phetIOQueryParameters ).filter( function( queryParameter ) {
return queryParameter.value !== 'brand=phet';
} )
queryParameters: noPhetBrandQP
} );
}

Expand Down

0 comments on commit 92c197f

Please sign in to comment.