Skip to content

Commit

Permalink
[test] Fix Escape event firing event
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Oct 1, 2024
1 parent 539a7ba commit 35c1010
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 35c1010

Please sign in to comment.