Skip to content

Commit

Permalink
Remove flaky input focus test
Browse files Browse the repository at this point in the history
This test fails in lots of cases where the browser chooses not to place
focus on the put.  For example if any other test has failed then focus
is on the failing test and can't be re-directed.  Or if testing in two
browsers this test will fail because one browser is is not focuses by
the OS.
  • Loading branch information
jrjohnson committed Jul 14, 2016
1 parent fee37c1 commit b11b57b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/integration/components/search-box-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ test('it renders', function(assert) {
assert.equal(this.$('input[type=search]').length, 1);
});

test('clicking search focus input and calls search', function(assert) {
test('clicking search calls search', function(assert) {
this.on('search', function(value){
assert.equal(value, '');
});
this.render(hbs`{{search-box search=(action 'search')}}`);
run(() => {
this.$('span').click();
assert.ok(this.$('input').is(":focus"));
});
const searchBoxIcon = '.search-icon';
this.$(searchBoxIcon).click();
});

test('typing calls search', function(assert) {
Expand Down

0 comments on commit b11b57b

Please sign in to comment.