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

chore(browser-tests): Refactor waiting for editor ready state #308

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

insmac
Copy link
Contributor

@insmac insmac commented Jul 16, 2024

This PR is aimed to further reduce the possible flakiness on CI, which, although rare, sometimes manifests itself when the tests start to run before the editor is fully ready UI wise.

Changes:

  • Introduced the window.editor_ready global flag, which is set at the very end of the editor initialization process, when all the completion providers finish setup. This is in contrast to checking for mere textarea presence, which can happen much earlier.
  • Added waitForEditorLoad Cypress command to use in before and beforeEach hooks.
  • Converted "service" queries (DDLs, warning simulation) to cy.request() instead of typing them manually in the editor - there is zero user value in the latter, and it significantly slows down the text execution time, as they are usually quite long.
  • Configured a slightly longer keystroke delay for typing inside the editor to prevent occasional test hiccups (very rare, but still) when using multi line queries, various cursor keys, etc.

@insmac insmac marked this pull request as draft July 16, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant