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

Ensure TextEditorComponent was resized before asserting on its contents #19487

Merged
merged 1 commit into from Jun 11, 2019

Conversation

@as-cii
Copy link
Contributor

commented Jun 11, 2019

Fixes #19443

Previously, we would wait for the next update promise after resizing the editor as an indicator of when the resize occurred. Unfortunately, resize events are unreliable and may not be emitted right away. This could cause the test code to wait for an update promise that was unrelated to the resize event (e.g., cursor blinking).

This pull request uses a condition-based promise that ensures the rendered rows have changed as a result of the resize. This seems to fix the issue locally when introducing artificial timeouts in the resize event.

Antonio Scandurra
Ensure TextEditorComponent was resized before asserting on its contents
Previously, we would wait for the next update promise after resizing the 
editor as an indicator of when the resize occurred. Unfortunately, 
resize events are unreliable and may not be emitted right away. This 
could cause the test code to wait for an update promise that was 
unrelated to the resize event (e.g., cursor blinking).

This commit uses a condition-based promise that ensures the rendered 
rows have changed as a result of the resize. This seems to fix the issue 
locally when introducing artificial timeouts in the resize event.

@as-cii as-cii merged commit a028eca into master Jun 11, 2019

2 checks passed

Atom Pull Requests #20190611.3 succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@as-cii as-cii deleted the as/text-editor-component-flakiness branch Jun 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.