Skip to content

Commit

Permalink
Merge branch 'protocol_designer-migrate-webpack-to-vite' of github.co…
Browse files Browse the repository at this point in the history
…m:Opentrons/opentrons into protocol_designer-migrate-webpack-to-vite
  • Loading branch information
b-cooper committed Feb 28, 2024
2 parents 5f29ad3 + 4e3660d commit b0ebbbb
Show file tree
Hide file tree
Showing 56 changed files with 661 additions and 644 deletions.
24 changes: 13 additions & 11 deletions app/src/organisms/PipetteWizardFlows/__tests__/AttachProbe.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import * as React from 'react'
import { fireEvent, screen, waitFor } from '@testing-library/react'
import { nestedTextMatcher, renderWithProviders } from '@opentrons/components'
import { describe, it, beforeEach, vi, expect } from 'vitest'

import { useDeckConfigurationQuery } from '@opentrons/react-api-client'
import { LEFT, SINGLE_MOUNT_PIPETTES } from '@opentrons/shared-data'

import {
nestedTextMatcher,
renderWithProviders,
} from '../../../__testing-utils__'
import { i18n } from '../../../i18n'
import {
mock8ChannelAttachedPipetteInformation,
Expand All @@ -18,34 +24,30 @@ const render = (props: React.ComponentProps<typeof AttachProbe>) => {
i18nInstance: i18n,
})[0]
}
jest.mock('@opentrons/react-api-client')

const mockUseDeckConfigurationQuery = useDeckConfigurationQuery as jest.MockedFunction<
typeof useDeckConfigurationQuery
>
vi.mock('@opentrons/react-api-client')

describe('AttachProbe', () => {
let props: React.ComponentProps<typeof AttachProbe>
beforeEach(() => {
props = {
mount: LEFT,
goBack: jest.fn(),
proceed: jest.fn(),
chainRunCommands: jest
goBack: vi.fn(),
proceed: vi.fn(),
chainRunCommands: vi
.fn()
.mockImplementationOnce(() => Promise.resolve())
.mockImplementationOnce(() => Promise.resolve()),
maintenanceRunId: RUN_ID_1,
attachedPipettes: { left: mockAttachedPipetteInformation, right: null },
flowType: FLOWS.CALIBRATE,
errorMessage: null,
setShowErrorMessage: jest.fn(),
setShowErrorMessage: vi.fn(),
isRobotMoving: false,
isExiting: false,
selectedPipette: SINGLE_MOUNT_PIPETTES,
isOnDevice: false,
}
mockUseDeckConfigurationQuery.mockReturnValue({
vi.mocked(useDeckConfigurationQuery).mockReturnValue({
data: [
{
cutoutId: 'cutoutD3',
Expand Down
Loading

0 comments on commit b0ebbbb

Please sign in to comment.