Skip to content

Commit

Permalink
Send key in keyboard events, because it is used in overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
manolo committed Nov 15, 2017
1 parent a427a95 commit 2690ae1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/vaadin-dialog_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@

describe('no-close-on-esc', () => {
it('should close itself on ESC press by default', () => {
MockInteractions.pressAndReleaseKeyOn(document.body, 27);
MockInteractions.pressAndReleaseKeyOn(document.body, 27, [], 'Escape');
expect(dialog.opened).to.eql(false);
});

it('should not close itself on ESC press when no-close-on-esc is true', () => {
dialog.noCloseOnEsc = true;
MockInteractions.pressAndReleaseKeyOn(document.body, 27);
MockInteractions.pressAndReleaseKeyOn(document.body, 27, [], 'Escape');
expect(dialog.opened).to.eql(true);
});
});
Expand Down

0 comments on commit 2690ae1

Please sign in to comment.