mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-14 10:35:11 +00:00
test: finish TODO for escape key hack
Fix was merged upstream so we can remove the hack.
This commit is contained in:
committed by
David Lechner
parent
9fe62467d5
commit
bb8015eae5
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (c) 2022 The Pybricks Authors
|
||||
|
||||
import { fireEvent, waitFor } from '@testing-library/dom';
|
||||
import { waitFor } from '@testing-library/dom';
|
||||
import { cleanup } from '@testing-library/react';
|
||||
import React from 'react';
|
||||
import { testRender } from '../../../test';
|
||||
@@ -67,15 +67,7 @@ describe('cancel', () => {
|
||||
expect(dialog.getByRole('textbox', { name: 'File name' })).toHaveFocus(),
|
||||
);
|
||||
|
||||
// FIXME: use userEvent instead of fireEvent
|
||||
// blocked by https://github.com/palantir/blueprint/pull/5349
|
||||
// await user.keyboard('{Escape}');
|
||||
user;
|
||||
fireEvent.keyDown(document.activeElement ?? document, {
|
||||
key: 'Escape',
|
||||
keyCode: 27,
|
||||
which: 27,
|
||||
});
|
||||
await user.keyboard('{Escape}');
|
||||
|
||||
expect(dispatch).toHaveBeenCalledWith(newFileWizardDidCancel());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user