Closed Nancy-Salpepi closed 1 year ago
Yikes! This is a very serious bug, thanks for finding it @Nancy-Salpepi . Hopefully we don't re-publish the sim with this issue.
Good eye @Nancy-Salpepi!
@marlitas - This errant behavior is caused by the switch from parseInt
to Number
that was done in 29f79fc4ae62029a3fa20d83795bf9922b9de05d. In this sim, the code is counting on the NaN
value that was coming from parseInt
to blank out the input box, but as you and I found out while working on the problem that came up in expression-exchange, Number('')
produces a value of zero.
Please have a look, see if you can resolve it, and let me know if you need any help. I dug through the code for a bit and a good place to start looking is DivideEquationNode
, line 33, but there may be other problems, so I'd suggest a thorough regression test.
@jbphet I took a look and implemented a fix in DivideEquationNode.js Not sure what the best tools for a regression test here are, but I did go through every screen/screen-view to ensure that nothing funky stood out in terms of number/strings in both the answer boxes as well as the grids.
Pleas let me know if there are other tools you recommend I use or look at.
Assigning back to @jbphet for final review of fix.
@marlitas - thanks for the fix.
@Nancy-Salpepi - Can you please take a look around the sim and see if you see any occurrences of his problem?
@jbphet @marlitas looks fixed to me!
Test device MacBook Air (m1 chip)
Operating System 12.4
Browser Safari
Problem description While testing https://github.com/phetsims/qa/issues/817, on the Division screen I noticed that after the first question, a zero is present in the box where you need to type your answer instead of it being empty. In the published version, the box is empty.
I am not sure if it has to do with the work that was done in https://github.com/phetsims/vegas/issues/102 or other work that was completed. I also didn't see this on the other 2 screens.
Steps to reproduce
Visuals On Master:
https://user-images.githubusercontent.com/87318828/177433326-9ff00fce-58a1-434a-8351-fad3fc4df411.mp4
** In the published version: