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

Tests: Increase robustness of a draggable revert test #2230

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

mgol
Copy link
Member

@mgol mgol commented Apr 4, 2024

One of the changes is increasing revertDuration from 200 to 300. For some reason, when jQuery 3.1 is used in an iframe (which TestSwarm uses) the timings are lower than expected and setTimeout too slow and the check for animation happens too late.

One of the changes is increasing `revertDuration` from 200 to 300. For some
reason, when jQuery 3.1 is used in an iframe (which TestSwarm uses) the timings
are lower than expected and `setTimeout` too slow and the check for animation
happens too late.
@mgol mgol added this to the 1.13.3 milestone Apr 4, 2024
@mgol mgol requested review from fnagel and timmywil April 4, 2024 22:56
@mgol mgol self-assigned this Apr 4, 2024
@@ -1045,6 +1045,7 @@ QUnit.test( "revert and revertDuration", function( assert ) {
testHelper.move( element, 50, 50 );
setTimeout( function() {
assert.ok( $( "#draggable2" ).is( ":animated" ), "revert: true with revertDuration should animate" );
ready();
Copy link
Member

Choose a reason for hiding this comment

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

Is this added on purpose?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I wanted the test to wait for this as well - that's why the call assert.async() now takes 2 as an argument - it means ready() needs to be called twice before the test is marked as finished.

@mgol mgol merged commit e7a0da6 into jquery:main Apr 12, 2024
22 checks passed
@mgol mgol deleted the draggable-core-3.1-fix branch April 12, 2024 13:23
@mgol mgol removed the Needs review label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants