fossasia / visdom

A flexible tool for creating, organizing, and sharing visualizations of live, rich data. Supports Torch and Numpy.
Apache License 2.0
9.99k stars 1.14k forks source link

Fix ImagePane tests #908

Closed da-h closed 1 year ago

da-h commented 1 year ago

Description

This PR fixes the failing ImagePane cypress tests.

Motivation and Context

Tests started to fail after #900 & #902 were merged, although both were succeeding when tested separately.

How Has This Been Tested?

Types of changes

Checklist:

da-h commented 1 year ago

Note: The "Initialize Visual Regression Test" will fail here, although no visual changes should occur as this PR changes only functional tests.

The test is failing here, because

I should probably submit a PR for that someday. :sweat_smile: ~Note to future-contributor or future-self: this requires to checkout only the devDependencies of package.json not the actual dependencies as we want to test against the previous version, e.g. when there is a npm update.~ I am not sure how to tackle this, though. Only installing devDependencies is not a good solution, as it would fail to detect bugs or other changes due to an update in the testing framework. (Like the one we had not long time ago, where a cypress update lead to text being rendered a bit differently).

da-h commented 1 year ago

Resolved any conflict (in file yarn.lock) by rebasing onto master.

The failing (polling) test suggests that I need to look into this once more, but more thoroughly. :sweat_smile:

da-h commented 1 year ago

LGTM now. It seems it has been a timing issue with the polling variant. I've just added a short delay in the test before the second click in the callback-test.