-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Implement a preferences UI editor smoke test for Preferences turns off editor line numbers and verifies the live change
#141054
Comments
I yield because I think this is somewhere in preferences/configuration land. Analyzing what goes on, evidence by the screenshot is that line numbers are indeed not off: As such, this is a correct test failure. However, the smoke-test-runner.log shows that the steps for writing to the settings file have been followed:
So I end up being puzzled how this change could have not traveled to the editor. Is this depending on file events? Full runner log: smoke-test-runner.log.zip |
I pushed a change to skip this test for now as it failed more in the past 24h. |
Oh, I had to skip the entire suite because I think the second test depends on the first (?) |
@bpasero I cant repro it and I cannot speculate what would have gone wrong. I can see that setting was changed and got updated but editor did not pick it. There could be many reasons like change events or could be editor issue. May I know what is recommended for such scenarios? |
How about some temporary logging only for this case? We could also temporarily expose a method on the |
I can add more logs for sure, but I do not know how the Can I enable these tests again and I will have this issue open to add more logs? Since we rely on automated smoke tests and it would be important to have as less skipped tests as possible during the release so that we don't miss some real obvious bugs? |
If you search for
Yes, please do. |
I can reproduce it locally but not consistently. Here is the screenshot. It seems, settings got saved but the editor has not picked up the setting. Looks like the editor has missed the event. @bpasero Is there any logging in the workbench editor while listening and updating the settings? |
@sandy081 no logging at the moment, the code is here: vscode/src/vs/workbench/browser/parts/editor/textEditor.ts Lines 67 to 72 in c8e2fd7
We rely on a |
@bpasero Is it possible to get the recorded screenshots for this test from the build? I remember we used to have this before? |
I can confirm that when this test is failing, the configuration service is triggering the change event and the line numbers settings is off - I added a log statement in the location @bpasero pointed TBH, I do not understand the consistency of this failure. One thing I observed is that, it is failing when I am switching focus from the editor. I am also not sure exactly at which point of time the focus has to be switched. It seems vscode/src/vs/workbench/browser/parts/editor/textEditor.ts Lines 84 to 90 in c8e2fd7
This seems to be causing it too |
Only from the web smoke tests that use Playwright unfortunately.
Can you send me over the steps you use to reproduce locally? |
As said, it was non trivial to repro this consistently. I have to say I am lucky to repro it locally after many trials and playing around with switching the focus, I could repro it and confirm that change event is being triggered. (I logged the configuration object during these trials). I will probably do more trials to understand more. I mentioned it here so that you might get a hunch of what is happening in editor land. |
Yeah please continue to log if you have a repro, the idea of the I wonder if we switch to the editor too soon after the configuration change has happened and then fail to apply it? But I wonder: isn't the setting applied to the opened settings file as well? Why do we open another editor? Can we not just drop that part? |
Update
This was originally a test failure, but my suggestion in the end would be to come up with a settings smoke test that leverages the settings UI editor if possible.
Original:
https://dev.azure.com/monacotools/Monaco/_build/results?buildId=151025&view=logs&j=672276a2-8d3a-5fab-615d-090c51352f92&t=0699ae84-7245-5a45-5eee-80b086af2725&l=71
//cc @sandy081
The text was updated successfully, but these errors were encountered: