search: Update search onboarding integration test to test CM
Created by: fkling
Closes: #36525 (closed)
NOTE: Review with whitespace changes disabled
This PR updates the search onboarding integration test to test both Monaco and CodeMirror implementations. I had to make a couple of changes to make it work properly with CodeMirror:
- Both editors are now focused with
.click
instead of.focus
. The tour card wouldn't be shown otherwise (in CodeMirror). My assumption is that.focus
somehow didn't have an effect because the input is already focused (auto focus). - I had to add
await editor.focus()
before the first typing simulation. Clicking on a link in a tour card will remove the focus from the search input, and so key presses are not going to the editor. Interestingly if I manually perform this action then Monaco looses focus as well. I don't know why it works differently for Monaco in the test environment.
Test plan
Integration test passes.
App preview:
Check out the client app preview documentation to learn more.