Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smoke test: Flaky search test #49117

Closed
joaomoreno opened this issue May 3, 2018 · 5 comments
Closed

Smoke test: Flaky search test #49117

joaomoreno opened this issue May 3, 2018 · 5 comments
Assignees
Milestone

Comments

@joaomoreno
Copy link
Member

joaomoreno commented May 3, 2018

This search test seldomly fails on Windows. When it does, so does debug, because the code is left in a broken state.

https://vscode.visualstudio.com/VS%20Code/_build/index?buildId=48&_a=summary

2018-05-03T11:05:02.9506795Z   1) Test Search replaces first search result with a replace term:
2018-05-03T11:05:02.9507791Z      Error: Timeout: is active element 'div[id="workbench.view.search"] .search-view .search-widget .search-container .monaco-inputbox input' after 20 seconds.
2018-05-03T11:05:02.9508496Z       at D:\a\1\s\test\smoke\out\vscode\code.js:139:23
2018-05-03T11:05:02.9509006Z       at Generator.next (<anonymous>)
2018-05-03T11:05:02.9523580Z       at fulfilled (D:\a\1\s\test\smoke\out\vscode\code.js:8:58)
2018-05-03T11:05:02.9525954Z       at <anonymous>

smoketest.log
test_search_replaces_first_search_result_with_a_replace_term

@joaomoreno
Copy link
Member Author

joaomoreno commented May 3, 2018

It appears that focus is stolen away from the search viewlet. I've added more logging for when this happens to find out who the focus thief is. Let's wait for the next failing build.

joaomoreno added a commit that referenced this issue May 3, 2018
@joaomoreno joaomoreno changed the title Smoke test: flaky search test Smoke test: Flaky search test May 4, 2018
@joaomoreno
Copy link
Member Author

joaomoreno commented May 4, 2018

Found the thief:

2018-05-04T00:32:39.3284288Z Error: Active element not found. Current active element is 'DIV.monaco.tree.monaco.tree.instance.3.focused'

For some reason, focus seems to be placed on the tree.

@joaomoreno
Copy link
Member Author

@joaomoreno joaomoreno reopened this May 6, 2018
@joaomoreno joaomoreno modified the milestones: May 2018, June 2018 May 31, 2018
@joaomoreno
Copy link
Member Author

This probably fixed it! 3de6951

joaomoreno added a commit that referenced this issue Jun 6, 2018
@joaomoreno
Copy link
Member Author

Finally figured out what was wrong here! In the smoketest we need to click the X action in a file search result, to remove it from the view. The X only shows up if you hover a file result. So we move the mouse over it and then click the X. The problem is that sometimes Chrome isn't fast enough to process the mouse move, enable the :hover pseudo class and show the X. It also happens that the X is always in the DOM, but without the :hover pseudo class, it is just display: none. So, when Chrome is slow enough not to render the X, we go ahead and ask for its top, left coordinates in order to click it, which returns 0, 0. Clicking that origin coordinate shows the Explorer, since that's where the Explorer activity icon lives...

Thanks for the help and patience, @isidorn!

sherlock

@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 20, 2018
lemanschik pushed a commit to code-oss-dev/code that referenced this issue Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant