Skip to content

Commit

Permalink
add studio, state, and mirror-input wrapper fuzzing to CT, including …
Browse files Browse the repository at this point in the history
…Client postMessageToParent parameter, #76
  • Loading branch information
zepumph committed Feb 14, 2020
1 parent 3666f2b commit 71fa842
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
22 changes: 21 additions & 1 deletion js/continuous-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,10 +680,30 @@ function createSnapshot( callback, errorCallback ) {
url: 'sim-test.html?url=' + encodeURIComponent( '../../' + snapshotName + '/' + phetioRepo + '/' + phetioRepo + '_en.html' ) +
'&simQueryParameters=' + encodeURIComponent( 'brand=phet-io&phetioStandalone&ea' + validatedParam + '&fuzz&memoryLimit=1000' )
} );

// fuzz test important wrappers
snapshot.testQueue.push( {
count: 0,
snapshotName: snapshotName,
test: [ phetioRepo, 'phet-io-studio-fuzz', 'require.js' ],
url: 'sim-test.html?url=' + encodeURIComponent( `../../${snapshotName}/studio/?sim=${phetioRepo}&phetioDebug&fuzz&postMessageToParent` )
} );
snapshot.testQueue.push( {
count: 0,
snapshotName: snapshotName,
test: [ phetioRepo, 'phet-io-state-fuzz', 'require.js' ],
url: 'sim-test.html?url=' + encodeURIComponent( `../../${snapshotName}/phet-io-wrappers/state/?sim=${phetioRepo}&phetioDebug&fuzz&postMessageToParent` )
} );
snapshot.testQueue.push( {
count: 0,
snapshotName: snapshotName,
test: [ phetioRepo, 'phet-io-mirror-inputs-fuzz', 'require.js' ],
url: 'sim-test.html?url=' + encodeURIComponent( `../../${snapshotName}/phet-io-wrappers/mirror-inputs/?sim=${phetioRepo}&phetioDebug&fuzz&postMessageToParent` )
} );
} );

// accessible tests
snapshot.accessibleRepos.forEach( function( accessibleRepo ) {
snapshot.accessibleRepos.forEach( accessibleRepo => {
snapshot.testQueue.push( {
count: 0,
snapshotName: snapshotName,
Expand Down
3 changes: 2 additions & 1 deletion js/sim-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ iframe.setAttribute( 'height', '384' );
document.body.appendChild( iframe );

// Add those two to our query parameters, so we get load/error messages
iframe.src = options.url + '?postMessageOnLoad&postMessageOnError&postMessageOnBeforeUnload' + ( options.simQueryParameters ? '&' + options.simQueryParameters : '' );
iframe.src = QueryStringMachine.appendQueryStringArray( options.url,
[ '?postMessageOnLoad&postMessageOnError&postMessageOnBeforeUnload', options.simQueryParameters ] );

let hasErrored = false;
let hasLoaded = false;
Expand Down

0 comments on commit 71fa842

Please sign in to comment.