From 35c10105aa619e447a73e2d83d4b19bde33d706d Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Wed, 2 Oct 2024 01:00:20 +0200 Subject: [PATCH] [test] Fix Escape event firing event --- .../plugins/useTreeViewLabel/useTreeViewLabel.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/x-tree-view/src/internals/plugins/useTreeViewLabel/useTreeViewLabel.test.tsx b/packages/x-tree-view/src/internals/plugins/useTreeViewLabel/useTreeViewLabel.test.tsx index a89bbdbd8e05a..375cc7a066a13 100644 --- a/packages/x-tree-view/src/internals/plugins/useTreeViewLabel/useTreeViewLabel.test.tsx +++ b/packages/x-tree-view/src/internals/plugins/useTreeViewLabel/useTreeViewLabel.test.tsx @@ -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); @@ -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'));