Wait for menu to open in editor test

issue #1287

Fix for https://gist.github.com/ErisDS/54197ef8a9b746e2ddb1

- also contains some misc cleanup