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

Problem when running test on yeti that relies on focus listener #81

Open
mairatma opened this issue Apr 25, 2014 · 0 comments
Open

Problem when running test on yeti that relies on focus listener #81

mairatma opened this issue Apr 25, 2014 · 0 comments

Comments

@mairatma
Copy link

I've recently had problems when running tests that wait for a focus event through yeti.

For example, the test below:

    var suite = new Y.Test.Suite('my-suite');
    suite.add(new Y.Test.Case({
        name: 'Automated Tests',
        'should focus': function() {
            var called = false;
            var input = Y.one('#input');

            input.on('focus', function() {
                called = true;
            });

            input.focus();
            Y.Assert.isTrue(called);
        }
    }));
    Y.Test.Runner.add(suite);

This test passes normally as expected when run by opening the html file manually in a browser, but always fails when run by yeti. We suspect that yeti is stealing the focus somehow.

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