Skip to content

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

@mairatma

Description

@mairatma

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions