Improve flaky ACE editor spec
The ACE editor JavaScript may not be loaded when the spec runs evaluateScript. Wait for the editor to load before attempting to run ACE-specific JavaScript.
This was failing in https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/30380859.
Edited by Stan Hu