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

ViewStack: problems when showing a node immediately after hiding it #594

Open
wkeese opened this issue Feb 17, 2016 · 0 comments
Open

ViewStack: problems when showing a node immediately after hiding it #594

wkeese opened this issue Feb 17, 2016 · 0 comments

Comments

@wkeese
Copy link
Member

wkeese commented Feb 17, 2016

After upgrading to Intern 3 and running the ViewStack unit tests, I get failures in Chrome 48/mac and also other browsers. The first failure is in the Show (reverse, flip) test.

The problem happens when you show a node immediately after hiding it.

ViewStack is supposed to add classes to a node as the transition starts, and then remove the classes when the transition ends 300ms later. The failure is because ViewStack tries to remove the classes before it adds them. It occurs because of two issues:

  • When showing a node immediately after hiding it, the transitionEnd event occurs immediately, rather than in 300ms like it's supposed to. Browser bug? I'm not sure. It occurs on multiple browsers.
  • I don't know why, but ViewStack has a delay before it adds the classes to nodes that are in transition:
this.defer(function () {
    if (target) {
        $(target).addClass("-d-view-stack-transition");
    }
    if (origin) {
        $(origin).addClass("-d-view-stack-transition -d-view-stack-out");
    }
    if (reverse) {
        setReverse(origin);
        setReverse(target);
    }
    if (target) {
        $(target).addClass("-d-view-stack-in");
    }
}, this._timing);

On Chrome this._timing is 20ms.

wkeese added a commit that referenced this issue Feb 17, 2016
Detailed changes:

* Leverage defaultTimeout config parameter rather than setting a timeout for every test.

* For firefox, needed to upgrade from selenium-server 2.44.0 to 2.47.1.

* Installed requirejs via npm to make Intern 3 work,
   because when you install requirejs via bower, you don't get r.js,
   and r.js is what's needed by Node.

* Also required leadfoot directly, since setting loaderOptions.packages
  to map leadfoot --> intern/node_modules/leadfoot doesn't seem to work,
  apparently an Intern bug.

* Remove customRunner since Intern now logs test start and skip by default

Note that there are test failures both before and after this change, but for Chrome/mac
the failure count actually goes down, from 15~19 to 8, including the 5 failures
from #594.
@wkeese wkeese changed the title ViewStack: classes not removed after transition ends ViewStack: problems when showing a node immediately after hiding it Mar 6, 2016
wkeese added a commit to wkeese/deliteful that referenced this issue Mar 7, 2016
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

No branches or pull requests

1 participant