Closed pixelzoom closed 2 years ago
This assertion is going to fail with any stringTest, because stringTest replaces ALL strings, and "{{value}}" will therefore not exist. I'm going to comment it out (and commit it) so I can proceed with my testing.
Question: The purpose of stringTest
is to test layout. If voicing strings are not displayed, then should voicing strings be skipped by stringTest
? If they were in a standard place in the JSON, it would be relatively easy to skip them.
Thanks for the report, and sorry that you ran into this.
I didn't do enough research for this assertion, but I felt like the assertion was worth while, and that there was precedent when we have common code that fills in a value
.
Perhaps it is as easy as disregarding the assertion when stringTest
is provided. Does that sound reasonable to you @pixelzoom? I could also see just removing the assertion, but that doesn't seem like a win to me.
I also noticed that the default value should be SunConstants.VALUE_NAMED_PLACEHOLDER
instead of a new i18n string.
I committed above after testing with ?stringTest
. How's that?
Changes look good.
You didn't comment on:
If voicing strings are not displayed, then should voicing strings be skipped by stringTest?
... so let's continue that in https://github.com/phetsims/chipper/issues/1198.
Closing.
I'm trying to test Geometric Optics with
?stringTest=long
. It's failing in ComboBoxListItemNode.js, at this assertion:Testing with other sims that have a ComboBox results in the same failure.
Git history shows this line was added by @zepumph on 2/11/22 in https://github.com/phetsims/sun/commit/8e1b1ad4275d3b3dbef79d7adab62ac97a279ee3 for https://github.com/phetsims/sun/issues/726.