diff --git a/src/toolbar/buttons/bluetooth/BluetoothButton.test.tsx b/src/toolbar/buttons/bluetooth/BluetoothButton.test.tsx index 36644bd69..a86dd915f 100644 --- a/src/toolbar/buttons/bluetooth/BluetoothButton.test.tsx +++ b/src/toolbar/buttons/bluetooth/BluetoothButton.test.tsx @@ -3,6 +3,7 @@ import { act, cleanup } from '@testing-library/react'; import React from 'react'; +import { FocusScope } from 'react-aria'; import { testRender } from '../../../../test'; import { toggleBluetooth } from '../../../ble/actions'; import BluetoothButton from './BluetoothButton'; @@ -13,7 +14,9 @@ afterEach(() => { it('should dispatch action when clicked', async () => { const [user, button, dispatch] = testRender( - , + + + , ); await act(() => user.click(button.getByRole('button', { name: 'Bluetooth' }))); diff --git a/src/toolbar/buttons/repl/ReplButton.test.tsx b/src/toolbar/buttons/repl/ReplButton.test.tsx index a1ebf1b4a..78553921b 100644 --- a/src/toolbar/buttons/repl/ReplButton.test.tsx +++ b/src/toolbar/buttons/repl/ReplButton.test.tsx @@ -3,6 +3,7 @@ import { act, cleanup } from '@testing-library/react'; import React from 'react'; +import { FocusScope } from 'react-aria'; import { testRender } from '../../../../test'; import { hubStartRepl } from '../../../hub/actions'; import { HubRuntimeState } from '../../../hub/reducers'; @@ -13,9 +14,14 @@ afterEach(() => { }); it('should dispatch action when clicked', async () => { - const [user, button, dispatch] = testRender(, { - hub: { hasRepl: true, runtime: HubRuntimeState.Idle }, - }); + const [user, button, dispatch] = testRender( + + + , + { + hub: { hasRepl: true, runtime: HubRuntimeState.Idle }, + }, + ); await act(() => user.click(button.getByRole('button', { name: 'REPL' }))); diff --git a/src/toolbar/buttons/run/RunButton.test.tsx b/src/toolbar/buttons/run/RunButton.test.tsx index 6e2277c4a..7f82a59ab 100644 --- a/src/toolbar/buttons/run/RunButton.test.tsx +++ b/src/toolbar/buttons/run/RunButton.test.tsx @@ -3,6 +3,7 @@ import { act, cleanup } from '@testing-library/react'; import React from 'react'; +import { FocusScope } from 'react-aria'; import { testRender, uuid } from '../../../../test'; import { FileFormat } from '../../../ble-pybricks-service/protocol'; import { downloadAndRun } from '../../../hub/actions'; @@ -14,13 +15,18 @@ afterEach(() => { }); it('should dispatch action when clicked', async () => { - const [user, button, dispatch] = testRender(, { - editor: { activeFileUuid: uuid(0) }, - hub: { - runtime: HubRuntimeState.Idle, - preferredFileFormat: FileFormat.MultiMpy6, + const [user, button, dispatch] = testRender( + + + , + { + editor: { activeFileUuid: uuid(0) }, + hub: { + runtime: HubRuntimeState.Idle, + preferredFileFormat: FileFormat.MultiMpy6, + }, }, - }); + ); await act(() => user.click(button.getByRole('button', { name: 'Run' }))); diff --git a/src/toolbar/buttons/stop/StopButton.test.tsx b/src/toolbar/buttons/stop/StopButton.test.tsx index e87b11229..86ca26b8c 100644 --- a/src/toolbar/buttons/stop/StopButton.test.tsx +++ b/src/toolbar/buttons/stop/StopButton.test.tsx @@ -3,6 +3,7 @@ import { act, cleanup } from '@testing-library/react'; import React from 'react'; +import { FocusScope } from 'react-aria'; import { testRender } from '../../../../test'; import { hubStopUserProgram } from '../../../hub/actions'; import { HubRuntimeState } from '../../../hub/reducers'; @@ -13,9 +14,14 @@ afterEach(() => { }); it('should dispatch action when clicked', async () => { - const [user, button, dispatch] = testRender(, { - hub: { runtime: HubRuntimeState.Running }, - }); + const [user, button, dispatch] = testRender( + + + , + { + hub: { runtime: HubRuntimeState.Running }, + }, + ); await act(() => user.click(button.getByRole('button', { name: 'Stop' })));