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

Disable yjs connecting status in tests2 #2111 #2453

Conversation

mstrofbass
Copy link
Contributor

Updates the OfflineStatusStore to use a timeout of 0 before going into offline mode, thus hiding the loading screen immediately when we're in the e2e tests. The corresponding sleep time is removed from the e2e tests setup function, shaving a significant amount of time off of their runtime.

Closes #2111

@mstrofbass
Copy link
Contributor Author

I'm not sure how safe the use of navigator.webdriver is here since there may be legitimate reasons that we want to use automation and have the site behave as normal. Maybe we can set a variable on the window that we can check?

Copy link
Contributor

@raineorshine raineorshine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good! You can make isE2E a constant variable rather than a function, since it is always determined synchronously on startup and never changes.

Since we're only using 'navigator.webdriver` for e2e tests now, and it's trivial to search for all instances in the codebase in the future, then I think it's not necessary to create another of abstraction at this time.

Copy link
Contributor

@raineorshine raineorshine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to merge this now since it offers such a dramatic improvement to the test performance, and will help the rest of the team immediately!

@raineorshine raineorshine merged commit 1a8ec08 into cybersemics:main Oct 16, 2024
3 checks passed
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.

Disable YJS connecting status in tests
2 participants