phetsims / atomic-interactions

"Atomic Interactions" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 2 forks source link

CT: api mismatches present #84

Closed chrisklus closed 4 years ago

chrisklus commented 4 years ago

atomic-interactions : phet-io-fuzz : require.js : run
Query: brand=phet-io&phetioStandalone&ea&fuzz&memoryLimit=1000
Uncaught Error: Assertion failed: api mismatches present:

atomicInteractions.globalOptionsNode.projectorModeCheckbox.projectorModeEnabledProperty:  4. After startup, only dynamic instances prescribed by the baseline file can be registered.
Error: Assertion failed: api mismatches present:

atomicInteractions.globalOptionsNode.projectorModeCheckbox.projectorModeEnabledProperty:  4. After startup, only dynamic instances prescribed by the baseline file can be registered.
    at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/assert/js/assert.js?bust=1580125670113:22:13)
    at PhetioAPIValidation.assertOutIfErrorsPresent (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/tandem/js/phetioAPIValidation.js?bust=1580125670198:275:9)
    at PhetioAPIValidation.addError (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/tandem/js/phetioAPIValidation.js?bust=1580125670198:299:14)
    at https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/tandem/js/phetioAPIValidation.js?bust=1580125670198:206:18
    at callback (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/axon/js/timer.js?bust=1580125670198:42:13)
    at TinyEmitter.emit (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/axon/js/TinyEmitter.js?bust=1580125670198:68:55)
    at https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/axon/js/Emitter.js?bust=1580125670198:36:31
    at Timer.execute (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/axon/js/Action.js?bust=1580125670198:232:20)
    at Timer.emit (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/axon/js/Emitter.js?bust=1580125670198:61:21)
    at https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/joist/js/Sim.js?bust=1580125670198:224:13
id: Bayes Chrome
Approximately 1/27/2020, 5:57:33 AM
atomic-interactions : phet-io-fuzz : require.js : run
Query: brand=phet-io&phetioStandalone&ea&fuzz&memoryLimit=1000
Uncaught Error: Assertion failed: api mismatches present:

atomicInteractions.globalOptionsNode.projectorModeCheckbox.projectorModeEnabledProperty:  4. After startup, only dynamic instances prescribed by the baseline file can be registered.,
atomicInteractions.globalOptionsNode.projectorModeCheckbox.projectorModeEnabledProperty:  4. After startup, only dynamic instances prescribed by the baseline file can be registered.
Error: Assertion failed: api mismatches present:

atomicInteractions.globalOptionsNode.projectorModeCheckbox.projectorModeEnabledProperty:  4. After startup, only dynamic instances prescribed by the baseline file can be registered.,
atomicInteractions.globalOptionsNode.projectorModeCheckbox.projectorModeEnabledProperty:  4. After startup, only dynamic instances prescribed by the baseline file can be registered.
    at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/assert/js/assert.js?bust=1580125670113:22:13)
    at PhetioAPIValidation.assertOutIfErrorsPresent (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/tandem/js/phetioAPIValidation.js?bust=1580125670198:275:9)
    at PhetioAPIValidation.addError (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/tandem/js/phetioAPIValidation.js?bust=1580125670198:299:14)
    at https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/tandem/js/phetioAPIValidation.js?bust=1580125670198:206:18
    at callback (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/axon/js/timer.js?bust=1580125670198:42:13)
    at TinyEmitter.emit (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/axon/js/TinyEmitter.js?bust=1580125670198:68:55)
    at https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/axon/js/Emitter.js?bust=1580125670198:36:31
    at Timer.execute (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/axon/js/Action.js?bust=1580125670198:232:20)
    at Timer.emit (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/axon/js/Emitter.js?bust=1580125670198:61:21)
    at https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/joist/js/Sim.js?bust=1580125670198:224:13
id: Bayes Chrome
Approximately 1/27/2020, 5:57:33 AM
atomic-interactions : phet-io-tests : assert
7 out of 8 tests passed. 1 failed.
SimTests: atomic-interactions: iframe api failed:
Changed state on startup should be empty, but instead includes: atomicInteractions.atomicInteractionsScreen.view.returnAtomButton.visibleProperty
    at https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/phet-io-wrappers/js/tests/SimTests.js?bust=1580136060847:115:20
    at Client.dispatch (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/phet-io-wrappers/common/js/Client.js?bust=1580136060764:432:82)
    at windowMessageListener (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/phet-io-wrappers/common/js/Client.js?bust=1580136060764:331:24)

id: Bayes Chrome
Approximately 1/27/2020, 5:57:33 AM
atomic-interactions : phet-io-tests : no-assert
7 out of 8 tests passed. 1 failed.
SimTests: atomic-interactions: iframe api failed:
Changed state on startup should be empty, but instead includes: atomicInteractions.atomicInteractionsScreen.view.returnAtomButton.visibleProperty
    at https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/phet-io-wrappers/js/tests/SimTests.js?bust=1580128600284:115:20
    at Client.dispatch (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/phet-io-wrappers/common/js/Client.js?bust=1580128600198:432:82)
    at windowMessageListener (https://bayes.colorado.edu/continuous-testing/snapshot-1580122653081/phet-io-wrappers/common/js/Client.js?bust=1580128600198:331:24)

id: Bayes Chrome
Approximately 1/27/2020, 5:57:33 AM

Same as https://github.com/phetsims/states-of-matter/issues/249, but with the visibleProperty error included as well.

chrisklus commented 4 years ago

The visibleProperty state error was due to the sim hiding the returnAtomButton during sim construction, which defaulted the phet-io state to not be "clean" after initialization. The commit I pushed above is the quick fix for this - defaulting the button's visibility to false. Thanks to @zepumph for the recommendation.

Assigning to @jbphet to see if you're okay with this change.

jbphet commented 4 years ago

Well, you guys are the phet-io experts, so if you're cool with it, I guess I am too. Closing.