Skip to content

Add the ability to not show droplet tooltips on a per level basis - #4235

Closed
trevorb wants to merge 2 commits into
stagingfrom
autocomplete-tooltips
Closed

Add the ability to not show droplet tooltips on a per level basis#4235
trevorb wants to merge 2 commits into
stagingfrom
autocomplete-tooltips

Conversation

@trevorb

@trevorb trevorb commented Sep 28, 2015

Copy link
Copy Markdown

Levelbuilder:
screenshot 2015-09-28 16 13 40

Mousing over autocompleter:
screenshot 2015-09-28 16 13 29

Mousing over blocks in the toolbocks:
screenshot 2015-09-28 16 13 23

@trevorb

trevorb commented Sep 28, 2015

Copy link
Copy Markdown
Author

@Bjvanminnen Any suggestions on the best way to write tests for this?

@Bjvanminnen

Copy link
Copy Markdown
Contributor

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).

@trevorb

trevorb commented Oct 6, 2015

Copy link
Copy Markdown
Author

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?

@Bjvanminnen

Copy link
Copy Markdown
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants