Skip to content

Commit

Permalink
test for #165
Browse files Browse the repository at this point in the history
  • Loading branch information
samthor committed Aug 20, 2018
1 parent 0686827 commit c41b395
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions suite.js
Original file line number Diff line number Diff line change
Expand Up @@ -585,12 +585,18 @@ void function() {
input.value = value;
form.appendChild(input);

var closeCount = 0;
dialog.addEventListener('close', function() {
++closeCount;
});

dialog.show();
input.focus(); // emulate user focus action
input.click();

assert.isFalse(dialog.open);
assert.equal(dialog.returnValue, value);
assert.equal(closeCount, 1);
});
test('dialog with button preventDefault does not trigger submit', function() {
var form = document.createElement('form');
Expand Down

0 comments on commit c41b395

Please sign in to comment.