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

Cypress Tests for -use_frontend_client_polling variant of visdom #896

Merged
merged 4 commits into from Jan 13, 2023

Conversation

da-h
Copy link
Contributor

@da-h da-h commented Dec 6, 2022

Description

Ensuring functionality also using the -use_frontend_client_polling flag.

Motivation and Context

Regarding the recent proxy-users and an upcoming code simplification of the server socket handlers, I suggest to add some testing of the polling-feature.
I have explicitly only added the "functional tests" to be tested against the -use_frontend_client_polling flag, which I though should be sufficient.

In addition, a few minor changes were necessary in the following test cases:

  • the ImagePane tests image_callback and image_callback2 failed now and then for the poller-implementation, but not for the websocket implementation. This was due to two windows being loaded in different orders in both implementation. (The image-panes load slower when using long polling). This PR solves this by adapting all cypress selectors for image panes to use a "pane with an Image" instead of the "first" pane in the list of panes.
  • The test for the view modal did not work due to a similar problem: the image pane loaded slower for the poller-implementation. For sake of consistency, I've added wait(500) commands in between the respective pane-creation commands.
  • The text_callback test failed randomly as well. This is probably due to too a missing order-enforcement of the events when passing incoming events to the callback. (Not sure here. Is this correct?). This PR increases the delay in-between callback keystrokes to 200ms (from previously 50ms) to solve the issue of inconsistent tests.

How Has This Been Tested?

Testing using this very PR-action, which should already include the test.
Also, to test for consistency, I've triggered the exact same action onto 10 branches, see for instance here

Types of changes

  • Test cases
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code refactor or cleanup (changes to existing code for improved readability or performance)

Checklist:

  • I adapted the version number under py/visdom/VERSION according to Semantic Versioning
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@da-h da-h changed the title github: test also -use_polling variant of visdom github: test also -use_frontend_client_polling variant of visdom Dec 6, 2022
@da-h da-h changed the title github: test also -use_frontend_client_polling variant of visdom Cypress Tests for -use_frontend_client_polling variant of visdom Dec 7, 2022
Copy link
Contributor

@JackUrb JackUrb left a comment

Choose a reason for hiding this comment

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

Happy to have more tests here

@da-h da-h mentioned this pull request Jan 7, 2023
8 tasks
@JackUrb JackUrb merged commit bf630b0 into fossasia:master Jan 13, 2023
@da-h da-h deleted the cypress_test_poller branch January 13, 2023 19:41
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.

None yet

2 participants