Add the ability to not show droplet tooltips on a per level basis - #4235
Add the ability to not show droplet tooltips on a per level basis#4235trevorb wants to merge 2 commits into
Conversation
|
@Bjvanminnen Any suggestions on the best way to write tests for this? |
|
Easiest is probably an eye test. I think we already have code that enters arbitrary text into the editor. At that point, it's just a matter of snapping a screenshot and making sure we do/don't see a dropdown as expected. Another option would be to do this in the context of a mocha levelTest. Essentially you create a freeplay based level, then you would enter text, and then probably look for the existence/nonexistence of the autocomplete dropdown in the DOM. I can point you at some relevant code if you're interested in taking this approach. The benefit to doing it this way is that errors are caught earlier in the process (since eyes test dont run until a DTT). |
|
Now that I have my mochaTests working I can finally write some test for this. I'd like to take the mochaTest approach. Can you point me to relevant code you mentioned? |
|
https://github.com/code-dot-org/code-dot-org/tree/staging/apps/test/solutions/applab ec_design.js might be a good place to start. This is a bit of a hack. The files in solutions/* were originally intended for validating that the given code for a given level returns the right result. Applab is full of freeplay levels. What we essentially do here is load a free play level, drive whatever behaviors we want to test, validate expected behavior, and then claim the level is done, (which results in success because it's freeplay). The bulk of the code lives within runBeforeClick. Let me know if you have questions. |
Levelbuilder:

Mousing over autocompleter:

Mousing over blocks in the toolbocks:
