Skip to content

Commit

Permalink
Merge pull request #63 from vaadin/fix/opened-when-no-items
Browse files Browse the repository at this point in the history
Add test to check that overlay is not opened when low resolution
  • Loading branch information
manolo authored Jul 27, 2018
2 parents bf0305b + 0f59197 commit 1ecab8b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
21 changes: 12 additions & 9 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"Vaadin Ltd"
],
"description": "vaadin-time-picker",
"main": "vaadin-time-picker.html",
"main": [
"vaadin-time-picker.html",
"theme/material/vaadin-time-picker.html"
],
"keywords": [
"Vaadin",
"vaadin-time-picker",
Expand All @@ -26,21 +29,21 @@
"polymer": "^2.0.0",
"iron-a11y-keys-behavior": "^2.0.0",
"iron-test-helpers": "^2.0.0",
"vaadin-themable-mixin": "vaadin/vaadin-themable-mixin#^1.2.0",
"vaadin-element-mixin": "vaadin/vaadin-element-mixin#^1.1.0",
"vaadin-lumo-styles": "vaadin/vaadin-lumo-styles#^1.1.0",
"vaadin-material-styles": "vaadin/vaadin-material-styles#^1.1.0-alpha2",
"vaadin-text-field": "vaadin/vaadin-text-field#^2.1.0",
"vaadin-combo-box": "vaadin/vaadin-combo-box#^4.1.0",
"vaadin-control-state-mixin": "vaadin/vaadin-control-state-mixin#^2.1.0"
"vaadin-themable-mixin": "vaadin/vaadin-themable-mixin#^1.2.1",
"vaadin-element-mixin": "vaadin/vaadin-element-mixin#^1.1.2",
"vaadin-lumo-styles": "vaadin/vaadin-lumo-styles#^1.1.0-beta1",
"vaadin-material-styles": "vaadin/vaadin-material-styles#^1.1.0-beta1",
"vaadin-text-field": "vaadin/vaadin-text-field#^2.1.0-beta2",
"vaadin-combo-box": "vaadin/vaadin-combo-box#^4.1.0-beta2",
"vaadin-control-state-mixin": "vaadin/vaadin-control-state-mixin#^2.1.1"
},
"devDependencies": {
"iron-component-page": "^3.0.0",
"iron-demo-helpers": "^2.0.0",
"webcomponentsjs": "^1.0.0",
"web-component-tester": "^6.1.5",
"test-fixture": "^3.0.0",
"vaadin-demo-helpers": "vaadin/vaadin-demo-helpers#^2.0.0",
"vaadin-demo-helpers": "vaadin/vaadin-demo-helpers#^2.0.1",
"iron-form": "^2.3.0"
}
}
11 changes: 11 additions & 0 deletions test/keyboard-navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@
arrowUp();
expect(spy.callCount).to.eql(0);
});

it('should open the overlay on arrow up', () => {
arrowUp();
expect(document.querySelector('vaadin-combo-box-overlay')).to.be.ok;
});
});

describe('with millisecond step', () => {
Expand All @@ -217,6 +222,12 @@
arrowUp();
expect(timePicker.__inputElement.value).to.be.equal('00:02:00.000');
});

it('should not open the overlay on arrow up', () => {
timePicker.step = 0.5;
arrowUp();
expect(document.querySelector('vaadin-combo-box-overlay')).not.to.be.ok;
});
});
});
</script>
Expand Down

0 comments on commit 1ecab8b

Please sign in to comment.