Skip to content

Commit

Permalink
refactor(app): move useCurrentRunId into resources
Browse files Browse the repository at this point in the history
This is (very) widely used and is better off in a more shared location
than having all these places poke into ProtocolUpload
  • Loading branch information
sfoster1 committed Jul 30, 2024
1 parent 42a0541 commit 45a722f
Show file tree
Hide file tree
Showing 31 changed files with 43 additions and 59 deletions.
2 changes: 1 addition & 1 deletion app/src/organisms/CalibrationTaskList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
useCalibrationTaskList,
useRunHasStarted,
} from '../Devices/hooks'
import { useCurrentRunId } from '../ProtocolUpload/hooks'
import { useCurrentRunId } from '../../resources/runs'

import type { DashboardCalOffsetInvoker } from '../../pages/Devices/CalibrationDashboard/hooks/useDashboardCalibratePipOffset'
import type { DashboardCalTipLengthInvoker } from '../../pages/Devices/CalibrationDashboard/hooks/useDashboardCalibrateTipLength'
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/Devices/InstrumentsAndModules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {

import { Banner } from '../../atoms/Banner'
import { PipetteRecalibrationWarning } from './PipetteCard/PipetteRecalibrationWarning'
import { useCurrentRunId } from '../ProtocolUpload/hooks'
import { useCurrentRunId } from '../../resources/runs'
import { ModuleCard } from '../ModuleCard'
import { useIsFlex, useIsRobotViewable, useRunStatuses } from './hooks'
import { getShowPipetteCalibrationWarning } from './utils'
Expand Down
7 changes: 2 additions & 5 deletions app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ import {
} from '../../../redux/analytics'
import { getIsHeaterShakerAttached } from '../../../redux/config'
import { Tooltip } from '../../../atoms/Tooltip'
import {
useCloseCurrentRun,
useCurrentRunId,
} from '../../../organisms/ProtocolUpload/hooks'
import { useCloseCurrentRun } from '../../../organisms/ProtocolUpload/hooks'
import { ConfirmCancelModal } from '../../../organisms/RunDetails/ConfirmCancelModal'
import { HeaterShakerIsRunningModal } from '../HeaterShakerIsRunningModal'
import {
Expand Down Expand Up @@ -103,7 +100,7 @@ import { getIsFixtureMismatch } from '../../../resources/deck_configuration/util
import { useDeckConfigurationCompatibility } from '../../../resources/deck_configuration/hooks'
import { useMostRecentCompletedAnalysis } from '../../LabwarePositionCheck/useMostRecentCompletedAnalysis'
import { useMostRecentRunId } from '../../ProtocolUpload/hooks/useMostRecentRunId'
import { useNotifyRunQuery } from '../../../resources/runs'
import { useNotifyRunQuery, useCurrentRunId } from '../../../resources/runs'
import {
useErrorRecoveryFlows,
ErrorRecoveryFlows,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ import {

import { renderWithProviders } from '../../../../__testing-utils__'
import { i18n } from '../../../../i18n'
import {
useCloseCurrentRun,
useCurrentRunId,
} from '../../../../organisms/ProtocolUpload/hooks'
import { useCloseCurrentRun } from '../../../../organisms/ProtocolUpload/hooks'
import { ConfirmCancelModal } from '../../../../organisms/RunDetails/ConfirmCancelModal'
import {
useRunTimestamps,
Expand Down Expand Up @@ -87,7 +84,7 @@ import { getIsFixtureMismatch } from '../../../../resources/deck_configuration/u
import { useDeckConfigurationCompatibility } from '../../../../resources/deck_configuration/hooks'
import { useMostRecentCompletedAnalysis } from '../../../LabwarePositionCheck/useMostRecentCompletedAnalysis'
import { useMostRecentRunId } from '../../../ProtocolUpload/hooks/useMostRecentRunId'
import { useNotifyRunQuery } from '../../../../resources/runs'
import { useNotifyRunQuery, useCurrentRunId } from '../../../../resources/runs'
import {
useDropTipWizardFlows,
useTipAttachmentStatus,
Expand Down
3 changes: 1 addition & 2 deletions app/src/organisms/Devices/RecentProtocolRuns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ import {
TYPOGRAPHY,
} from '@opentrons/components'

import { useCurrentRunId } from '../ProtocolUpload/hooks'
import { HistoricalProtocolRun } from './HistoricalProtocolRun'
import { useIsRobotViewable, useRunStatuses } from './hooks'
import { useNotifyAllRunsQuery } from '../../resources/runs'
import { useNotifyAllRunsQuery, useCurrentRunId } from '../../resources/runs'
import { useFeatureFlag } from '../../redux/config'

interface RecentProtocolRunsProps {
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/Devices/RobotOverflowMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { Divider } from '../../atoms/structure'
import { MenuItem } from '../../atoms/MenuList/MenuItem'
import { getTopPortalEl } from '../../App/portal'
import { ChooseProtocolSlideout } from '../ChooseProtocolSlideout'
import { useCurrentRunId } from '../ProtocolUpload/hooks'
import { useCurrentRunId } from '../../resources/runs'
import { ConnectionTroubleshootingModal } from './ConnectionTroubleshootingModal'
import { useMenuHandleClickOutside } from '../../atoms/MenuList/hooks'
import { useIsRobotBusy } from './hooks'
Expand Down
3 changes: 1 addition & 2 deletions app/src/organisms/Devices/RobotOverviewOverflowMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { Tooltip } from '../../atoms/Tooltip'
import { ChooseProtocolSlideout } from '../../organisms/ChooseProtocolSlideout'
import { DisconnectModal } from '../../organisms/Devices/RobotSettings/ConnectNetwork/DisconnectModal'
import { handleUpdateBuildroot } from '../../organisms/Devices/RobotSettings/UpdateBuildroot'
import { useCurrentRunId } from '../../organisms/ProtocolUpload/hooks'
import { getRobotUpdateDisplayInfo } from '../../redux/robot-update'
import { UNREACHABLE, CONNECTABLE, REACHABLE } from '../../redux/discovery'
import { checkShellUpdate } from '../../redux/shell'
Expand All @@ -34,7 +33,7 @@ import { home, ROBOT } from '../../redux/robot-controls'
import { useIsRobotBusy } from './hooks'
import { useCanDisconnect } from '../../resources/networking/hooks'
import { useIsEstopNotDisengaged } from '../../resources/devices/hooks/useIsEstopNotDisengaged'

import { useCurrentRunId } from '../../resources/runs'
import type { DiscoveredRobot } from '../../redux/discovery/types'
import type { Dispatch, State } from '../../redux/types'

Expand Down
3 changes: 1 addition & 2 deletions app/src/organisms/Devices/RobotStatusHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ import {
import { QuaternaryButton } from '../../atoms/buttons'
import { Tooltip } from '../../atoms/Tooltip'
import { useIsFlex } from '../../organisms/Devices/hooks'
import { useCurrentRunId } from '../../organisms/ProtocolUpload/hooks'
import { useCurrentRunStatus } from '../../organisms/RunTimeControl/hooks'
import {
getRobotAddressesByName,
HEALTH_STATUS_OK,
OPENTRONS_USB,
} from '../../redux/discovery'
import { getNetworkInterfaces, fetchStatus } from '../../redux/networking'
import { useNotifyRunQuery } from '../../resources/runs'
import { useNotifyRunQuery, useCurrentRunId } from '../../resources/runs'

import type { IconName, StyleProps } from '@opentrons/components'
import type { DiscoveredRobot } from '../../redux/discovery/types'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
import { i18n } from '../../../i18n'
import { Banner } from '../../../atoms/Banner'
import { mockMagneticModule } from '../../../redux/modules/__fixtures__'
import { useCurrentRunId } from '../../ProtocolUpload/hooks'
import { useIsFlex, useIsRobotViewable, useRunStatuses } from '../hooks'
import { ModuleCard } from '../../ModuleCard'
import { InstrumentsAndModules } from '../InstrumentsAndModules'
Expand All @@ -23,6 +22,7 @@ import { FlexPipetteCard } from '../PipetteCard/FlexPipetteCard'
import { PipetteRecalibrationWarning } from '../PipetteCard/PipetteRecalibrationWarning'
import { getShowPipetteCalibrationWarning } from '../utils'
import { useIsEstopNotDisengaged } from '../../../resources/devices/hooks/useIsEstopNotDisengaged'
import { useCurrentRunId } from '../../../resources/runs'
import type * as Components from '@opentrons/components'

vi.mock('@opentrons/components', async importOriginal => {
Expand All @@ -39,7 +39,7 @@ vi.mock('../../ModuleCard')
vi.mock('../PipetteCard')
vi.mock('../PipetteCard/FlexPipetteCard')
vi.mock('../PipetteCard/PipetteRecalibrationWarning')
vi.mock('../../ProtocolUpload/hooks')
vi.mock('../../../resources/runs')
vi.mock('../../../atoms/Banner')
vi.mock('../utils')
vi.mock('../../RunTimeControl/hooks')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { describe, it, vi, beforeEach, expect } from 'vitest'
import '@testing-library/jest-dom/vitest'
import { renderWithProviders } from '../../../__testing-utils__'
import { i18n } from '../../../i18n'
import { useCurrentRunId } from '../../ProtocolUpload/hooks'
import { useCurrentRunId } from '../../../resources/runs'
import { ChooseProtocolSlideout } from '../../ChooseProtocolSlideout'
import { RobotOverflowMenu } from '../RobotOverflowMenu'
import { getRobotUpdateDisplayInfo } from '../../../redux/robot-update'
Expand All @@ -17,7 +17,7 @@ import {
} from '../../../redux/discovery/__fixtures__'

vi.mock('../../../redux/robot-update/selectors')
vi.mock('../../ProtocolUpload/hooks')
vi.mock('../../../resources/runs')
vi.mock('../../ChooseProtocolSlideout')
vi.mock('../hooks')
vi.mock('../../../resources/devices/hooks/useIsEstopNotDisengaged')
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/Devices/__tests__/RobotOverview.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as DiscoveryClientFixtures from '../../../../../discovery-client/src/fi
import { useAuthorization } from '@opentrons/react-api-client'

import { i18n } from '../../../i18n'
import { useCurrentRunId } from '../../ProtocolUpload/hooks'
import { useCurrentRunId } from '../../../resources/runs'
import { mockConnectableRobot } from '../../../redux/discovery/__fixtures__'
import { getRobotUpdateDisplayInfo } from '../../../redux/robot-update'
import { getConfig, useFeatureFlag } from '../../../redux/config'
Expand Down Expand Up @@ -61,7 +61,7 @@ vi.mock('../../../redux/robot-controls')
vi.mock('../../../redux/robot-update/selectors')
vi.mock('../../../redux/config')
vi.mock('../../../redux/discovery/selectors')
vi.mock('../../ProtocolUpload/hooks')
vi.mock('../../../resources/runs')
vi.mock('../hooks')
vi.mock('../RobotStatusHeader')
vi.mock('../../UpdateRobotBanner')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
import { useCanDisconnect } from '../../../resources/networking/hooks'
import { DisconnectModal } from '../../../organisms/Devices/RobotSettings/ConnectNetwork/DisconnectModal'
import { ChooseProtocolSlideout } from '../../ChooseProtocolSlideout'
import { useCurrentRunId } from '../../ProtocolUpload/hooks'
import { useCurrentRunId } from '../../../resources/runs'
import { useIsRobotBusy } from '../hooks'
import { handleUpdateBuildroot } from '../RobotSettings/UpdateBuildroot'
import { useIsEstopNotDisengaged } from '../../../resources/devices/hooks/useIsEstopNotDisengaged'
Expand All @@ -35,7 +35,7 @@ vi.mock(
'../../../organisms/Devices/RobotSettings/ConnectNetwork/DisconnectModal'
)
vi.mock('../../ChooseProtocolSlideout')
vi.mock('../../ProtocolUpload/hooks')
vi.mock('../../../resources/runs')
vi.mock('../RobotSettings/UpdateBuildroot')
vi.mock('../../../resources/devices/hooks/useIsEstopNotDisengaged')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { renderWithProviders } from '../../../__testing-utils__'
import { useProtocolQuery } from '@opentrons/react-api-client'

import { i18n } from '../../../i18n'
import { useCurrentRunId } from '../../../organisms/ProtocolUpload/hooks'
import { useCurrentRunStatus } from '../../../organisms/RunTimeControl/hooks'
import {
getRobotAddressesByName,
Expand All @@ -19,14 +18,13 @@ import {
import { getNetworkInterfaces } from '../../../redux/networking'
import { useIsFlex } from '../hooks'
import { RobotStatusHeader } from '../RobotStatusHeader'
import { useNotifyRunQuery } from '../../../resources/runs'
import { useNotifyRunQuery, useCurrentRunId } from '../../../resources/runs'

import type { DiscoveryClientRobotAddress } from '../../../redux/discovery/types'
import type { SimpleInterfaceStatus } from '../../../redux/networking/types'
import type { State } from '../../../redux/types'

vi.mock('@opentrons/react-api-client')
vi.mock('../../../organisms/ProtocolUpload/hooks')
vi.mock('../../../organisms/RunTimeControl/hooks')
vi.mock('../../../redux/discovery')
vi.mock('../../../redux/networking')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { useAllSessionsQuery } from '@opentrons/react-api-client'
import { RUN_STATUS_IDLE, RUN_STATUS_RUNNING } from '@opentrons/api-client'
import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest'

import { useCurrentRunId } from '../../../ProtocolUpload/hooks'
import { useCurrentRunId } from '../../../../resources/runs'
import { useRunStatus } from '../../../RunTimeControl/hooks'
import { useRunStartedOrLegacySessionInProgress } from '..'

import type { UseQueryResult } from 'react-query'
import type { Sessions } from '@opentrons/api-client'

vi.mock('@opentrons/react-api-client')
vi.mock('../../../ProtocolUpload/hooks')
vi.mock('../../../../resources/runs')
vi.mock('../../../RunTimeControl/hooks')

describe('useRunStartedOrLegacySessionInProgress', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import {
} from '@opentrons/api-client'
import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest'

import { useCurrentRunId } from '../../../ProtocolUpload/hooks'
import { useCurrentRunId } from '../../../../resources/runs'
import { useRunStatus } from '../../../RunTimeControl/hooks'
import { useRunStatuses } from '..'

vi.mock('../../../ProtocolUpload/hooks')
vi.mock('../../../../resources/runs')
vi.mock('../../../RunTimeControl/hooks')

describe(' useRunStatuses ', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useAllSessionsQuery } from '@opentrons/react-api-client'
import { RUN_STATUS_IDLE } from '@opentrons/api-client'
import { useCurrentRunId } from '../../ProtocolUpload/hooks'
import { useCurrentRunId } from '../../../resources/runs'
import { useRunStatus } from '../../RunTimeControl/hooks'

export function useRunStartedOrLegacySessionInProgress(): boolean {
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/Devices/hooks/useRunStatuses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
RUN_STATUS_PAUSED,
RUN_STATUS_RUNNING,
} from '@opentrons/api-client'
import { useCurrentRunId } from '../../ProtocolUpload/hooks'
import { useCurrentRunId } from '../../../resources/runs'
import { useRunStatus } from '../../RunTimeControl/hooks'

import type { RunStatus } from '@opentrons/api-client'
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/ModuleCard/ModuleOverflowMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import { MenuList } from '../../atoms/MenuList'
import { Tooltip } from '../../atoms/Tooltip'
import { MenuItem } from '../../atoms/MenuList/MenuItem'
import { useCurrentRunId } from '../ProtocolUpload/hooks'
import { useCurrentRunId } from '../../resources/runs'
import {
useIsFlex,
useRunStatuses,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import {
useIsLegacySessionInProgress,
useIsFlex,
} from '../../Devices/hooks'
import { useCurrentRunId } from '../../ProtocolUpload/hooks'
import { useCurrentRunId } from '../../../resources/runs'
import { ModuleOverflowMenu } from '../ModuleOverflowMenu'

import type { TemperatureStatus } from '@opentrons/api-client'

vi.mock('../../Devices/hooks')
vi.mock('../../RunTimeControl/hooks')
vi.mock('../../ProtocolUpload/hooks')
vi.mock('../../../resources/runs')

const render = (props: React.ComponentProps<typeof ModuleOverflowMenu>) => {
return renderWithProviders(<ModuleOverflowMenu {...props} />, {
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/ModuleCard/__tests__/hooks.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from '../../../redux/modules/__fixtures__'
import { useIsRobotBusy, useRunStatuses } from '../../Devices/hooks'
import { useMostRecentCompletedAnalysis } from '../../LabwarePositionCheck/useMostRecentCompletedAnalysis'
import { useCurrentRunId } from '../../ProtocolUpload/hooks'
import { useCurrentRunId } from '../../../resources/runs'
import {
useLatchControls,
useModuleOverflowMenu,
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/ModuleCard/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { useMostRecentCompletedAnalysis } from '../LabwarePositionCheck/useMostRecentCompletedAnalysis'
import { MenuItem } from '../../atoms/MenuList/MenuItem'
import { Tooltip } from '../../atoms/Tooltip'
import { useCurrentRunId } from '../ProtocolUpload/hooks'
import { useCurrentRunId } from '../../resources/runs'

import type {
HeaterShakerCloseLatchCreateCommand,
Expand Down
1 change: 0 additions & 1 deletion app/src/organisms/ProtocolUpload/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export * from './useCloseCurrentRun'
export * from './useCurrentProtocol'
export * from './useCurrentRun'
export * from './useCurrentRunCommands'
export * from './useCurrentRunId'
export * from './useCloneRun'
export * from './useRestartRun'
export * from './useRunCommands'
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react'

import { useDismissCurrentRunMutation } from '@opentrons/react-api-client'
import { useCurrentRunId } from './useCurrentRunId'
import { useCurrentRunId } from '../../../resources/runs'

import type { UseDismissCurrentRunMutationOptions } from '@opentrons/react-api-client/src/runs/useDismissCurrentRunMutation'

Expand Down
3 changes: 1 addition & 2 deletions app/src/organisms/ProtocolUpload/hooks/useCurrentRun.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useCurrentRunId } from './useCurrentRunId'
import { useNotifyRunQuery } from '../../../resources/runs'
import { useNotifyRunQuery, useCurrentRunId } from '../../../resources/runs'

import type { Run } from '@opentrons/api-client'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useCurrentRunId } from './useCurrentRunId'
import { useCurrentRunId } from '../../../resources/runs'
import { useRunCommands } from './useRunCommands'
import type { UseQueryOptions } from 'react-query'
import type {
Expand Down
8 changes: 2 additions & 6 deletions app/src/organisms/RunTimeControl/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ import {
} from '@opentrons/api-client'
import { useRunActionMutations } from '@opentrons/react-api-client'

import {
useCloneRun,
useCurrentRunId,
useRunCommands,
} from '../ProtocolUpload/hooks'
import { useNotifyRunQuery } from '../../resources/runs'
import { useCloneRun, useRunCommands } from '../ProtocolUpload/hooks'
import { useNotifyRunQuery, useCurrentRunId } from '../../resources/runs'
import { useMostRecentCompletedAnalysis } from '../LabwarePositionCheck/useMostRecentCompletedAnalysis'

import type { UseQueryOptions } from 'react-query'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ProtocolRunModuleControls } from '../../../../organisms/Devices/Protoco
import { ProtocolRunSetup } from '../../../../organisms/Devices/ProtocolRun/ProtocolRunSetup'
import { RunPreviewComponent } from '../../../../organisms/RunPreview'
import { ProtocolRunRuntimeParameters } from '../../../../organisms/Devices/ProtocolRun/ProtocolRunRunTimeParameters'
import { useCurrentRunId } from '../../../../organisms/ProtocolUpload/hooks'
import { useCurrentRunId } from '../../../../resources/runs'
import { mockRobotSideAnalysis } from '../../../../molecules/Command/__fixtures__'
import { useFeatureFlag } from '../../../../redux/config'
import { ProtocolRunDetails } from '..'
Expand All @@ -33,7 +33,7 @@ vi.mock('../../../../organisms/Devices/ProtocolRun/ProtocolRunHeader')
vi.mock('../../../../organisms/Devices/ProtocolRun/ProtocolRunSetup')
vi.mock('../../../../organisms/RunPreview')
vi.mock('../../../../organisms/Devices/ProtocolRun/ProtocolRunModuleControls')
vi.mock('../../../../organisms/ProtocolUpload/hooks')
vi.mock('../../../../resources/runs')
vi.mock(
'../../../../organisms/Devices/ProtocolRun/ProtocolRunRunTimeParameters'
)
Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/Devices/ProtocolRunDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { RunPreview } from '../../../organisms/RunPreview'
import { ProtocolRunSetup } from '../../../organisms/Devices/ProtocolRun/ProtocolRunSetup'
import { ProtocolRunModuleControls } from '../../../organisms/Devices/ProtocolRun/ProtocolRunModuleControls'
import { ProtocolRunRuntimeParameters } from '../../../organisms/Devices/ProtocolRun/ProtocolRunRunTimeParameters'
import { useCurrentRunId } from '../../../organisms/ProtocolUpload/hooks'
import { useCurrentRunId } from '../../../resources/runs'
import { OPENTRONS_USB } from '../../../redux/discovery'
import { fetchProtocols } from '../../../redux/protocol-storage'
import { appShellRequestor } from '../../../redux/shell/remote'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { renderHook } from '@testing-library/react'
import { describe, it, afterEach, expect, vi } from 'vitest'

import { useCurrentRunId } from '../useCurrentRunId'
import { useNotifyAllRunsQuery } from '../../../../resources/runs'
import { useNotifyAllRunsQuery } from '../useNotifyAllRunsQuery'

vi.mock('../../../../resources/runs')
vi.mock('../useNotifyAllRunsQuery')

describe('useCurrentRunId hook', () => {
afterEach(() => {
Expand Down
1 change: 1 addition & 0 deletions app/src/resources/runs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export * from './useNotifyAllRunsQuery'
export * from './useNotifyRunQuery'
export * from './useNotifyAllCommandsQuery'
export * from './useNotifyAllCommandsAsPreSerializedList'
export * from './useCurrentRunId'
Loading

0 comments on commit 45a722f

Please sign in to comment.