Skip to content

Commit

Permalink
[test] Fix Escape event firing event (#14797)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Oct 2, 2024
1 parent 588deea commit 98a7511
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ describeTreeView<[UseTreeViewLabelSignature]>(
view.getItemRoot('1').focus();
});
fireEvent.doubleClick(view.getItemLabel('1'));
fireEvent.keyDown(view.getItemLabelInput('1'), { key: 'Esc' });
fireEvent.keyDown(view.getItemLabelInput('1'), { key: 'Escape' });

expect(view.getItemLabelInput('1')).to.equal(null);
expect(view.getItemLabel('1')).not.to.equal(null);
Expand Down Expand Up @@ -215,7 +215,7 @@ describeTreeView<[UseTreeViewLabelSignature]>(
});
fireEvent.doubleClick(view.getItemLabel('1'));
fireEvent.change(view.getItemLabelInput('1'), { target: { value: 'new value' } });
fireEvent.keyDown(view.getItemLabelInput('1'), { key: 'Esc' });
fireEvent.keyDown(view.getItemLabelInput('1'), { key: 'Escape' });
expect(view.getItemLabel('1').textContent).to.equal('test');

fireEvent.doubleClick(view.getItemLabel('1'));
Expand Down

0 comments on commit 98a7511

Please sign in to comment.