opitzconsulting / uitest.js

uitest.js is able to load a webpage into a frame, instrument that page and the javascript in that page (e.g. add additional scripts at the end of the document, ...) and execute actions on that page.
MIT License
67 stars 8 forks source link

jQuery 1.9.x : $.animate problem in chrome / safari #14

Closed heiko-hardt closed 11 years ago

heiko-hardt commented 11 years ago

Hi Tobias, the following code works in Firefox and IE 10:

    it('needs to be defined', function() {
        uit.url( relPath + "/index-static.html");
        uit.runs(function(core, window, $){
            fixture = core;
            win     = window;
            jquery  = $;
            expect(fixture.nav).toBeDefined();
        });
    });

    it('needs to open page x', function() {
        runs(function() {
            // function with animate
            fixture.nav.first();
        });
        runs(function(){
            // direct animate
            jquery('#pages').animate({'left':'-200%'});
        });
    });

Chrome and Safari don't animate.

CSS changes works well in all browsers (e.g.: $('#pages').css('left','-200%'); ) Would be great if you can take a look at it

Many thanks in advance Heiko

tbosch commented 11 years ago

Hi, I created a regression test for this. Please have a look into test/ui/regressionSpec.js. $.animate is working in FF and Chrome with the current version of uitest.js.

In your example above, you should use uit.runs instead of runs, and inject the variable $ anew, so that the second tests is able to reload the iframe.

Could you double check?

By the way, I am working on an example to provide a runnable and editable template for issues using http://plnkr.co (see #15).

Tobias

heiko-hardt commented 11 years ago

great, i will check thanks for info (and fix)

Hriko

heiko-hardt commented 11 years ago

Hi Tobias, sorry for the delay. It works for me ... thanks for fixing

kind regads Heiko