Closed pixelzoom closed 8 months ago
Running locally, I hit this assertion in ComboBoxListBox:
const selectionIndex = this.getVisibleListItemNodes().indexOf( this.selectionOnFireAction );
assert && assert( selectionIndex !== -1, 'sound generation does not support adding new items' );
This is something that @jbphet and I added recently, while working on https://github.com/phetsims/sun/issues/861. I'm not sure how new items are possibly being added, will need to investigate. Perhaps there's a bug in ComboBoxListBox that assumes that all items are initially visible.
I'm also not sure whether this is the cause of the failure being reported by CT.
This is a duplicate of #244. Here's the relevant code in ComboBoxListBox. #244 is failing the assertion. This issue is failing the next line because the test is "fuzz : built", and assertions are stripped out of built versions.
// The selected item didn't provide a sound player, so use a default based on its position within the list
// of visible selections.
const selectionIndex = this.getVisibleListItemNodes().indexOf( this.selectionOnFireAction );
assert && assert( selectionIndex !== -1, 'sound generation does not support adding new items' );
defaultItemSelectedSoundPlayers[ selectionIndex ].play();
Occurring occassionally: