-
Notifications
You must be signed in to change notification settings - Fork 236
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
Update qunit/jquery and fix several console erros in Firefox at Windows #172
Comments
I'm not sure I follow the issue you're describing but this part definitely looks incorrect: current.idleTimeout = setTimeout(function() {
callCallback.call(this, 'idle', delegated, callbackData);
}, Math.max(1, settings.transitionDuration - 100));
Why can't you send a pull request? You can create a pr off a branch with |
I found something else that may or may not be related: At window resize, jmpress triggers the undocumented (probably internal) "reselect" method. The reselect method calls select method without using What is the purpose of this reselect call upon resize? This call doesn't seems to be working, but I need to understand what this is about to test it correctly. |
@shama I updated qunit and jquery in order to start analyzing the tests. After updating qunit and fixing some of the deprecated features (like After reviewing the tests I realized the assertions were being called inside the callbacks. That's not ideal for the following reasons:
Those are not useful informations to catch callback/events regressions because they do not hold any meaning. To ensure regressions are catch easly, one should specify a clear message to why a test failed. In case of callbacks and events, you should print how many times that event was supposed to execute using a counter with a message. That enables you to rapidly spot failures without having to inspect the test code or debug it. Since using a counter fixed the test failures, I opted to not dig deeper to the root cause of this problem and just rewrite the callback/events tests. It didn't actually "fixed" the problem, it served as a workaround which, as a consequence, also updated jquery and qunit to the latest version and suppressed the test failures while debugging in the browser using Firefox/Windows. So that's why this issue (as the title says) updated qunit/jquery and fixed several console erros in Firefox at Windows. |
When opening firebug, the window resize make some tested events execute asynchrounously outside the test context, causing unexpected errors.
To workaround this I tested against a counter value modified by the callbacks instead of executing the assertions inside each events callback.
While debugging, I managed to find the offending code that executes the events asynchrounously (
jmpress.js/src/components/core.js
Line 395 in 05603b2
(Can't send a pull request because everything is in master branch)
web-stories@011c1f6
The text was updated successfully, but these errors were encountered: