Skip to content

Commit

Permalink
modify a component name
Browse files Browse the repository at this point in the history
  • Loading branch information
koji committed Dec 13, 2024
1 parent d79b7ee commit 9b88d76
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import { ThermocyclerProfileSubsteps } from './ThermocyclerProfileSubsteps'
import type { SubstepIdentifier } from '../../../../steplist'
import type { HoverOnSubstepAction } from '../../../../ui/steps'

interface SubstepsToolboxProps {
interface SubStepsToolboxProps {
stepId: string
}

export function SubstepsToolbox(
props: SubstepsToolboxProps
export function SubStepsToolbox(
props: SubStepsToolboxProps
): JSX.Element | null {
const { stepId } = props
const { t, i18n } = useTranslation([
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './SubstepsToolbox'
export * from './SubStepsToolbox'

Check failure on line 1 in protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/index.ts

View workflow job for this annotation

GitHub Actions / js checks

Cannot find module './SubStepsToolbox' or its corresponding type declarations.

Check failure on line 1 in protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/index.ts

View workflow job for this annotation

GitHub Actions / js checks

Cannot find module './SubStepsToolbox' or its corresponding type declarations.
export * from './TimelineToolbox'
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ import {
import { getEnableHotKeysDisplay } from '../../../../feature-flags/selectors'
import { DeckSetupContainer } from '../../DeckSetup'
import { OffDeck } from '../../Offdeck'
import { SubStepsToolbox } from '../Timeline'

Check failure on line 22 in protocol-designer/src/pages/Designer/ProtocolSteps/__tests__/ProtocolSteps.test.tsx

View workflow job for this annotation

GitHub Actions / js checks

Module '"../Timeline"' has no exported member 'SubStepsToolbox'.

Check failure on line 22 in protocol-designer/src/pages/Designer/ProtocolSteps/__tests__/ProtocolSteps.test.tsx

View workflow job for this annotation

GitHub Actions / js checks

Module '"../Timeline"' has no exported member 'SubStepsToolbox'.
import { ProtocolSteps } from '..'
import { SubstepsToolbox, TimelineToolbox } from '../Timeline'

import type { SavedStepFormState } from '../../../../step-forms'

vi.mock('../../Offdeck')
Expand Down Expand Up @@ -64,15 +65,15 @@ describe('ProtocolSteps', () => {
timeline: [],
errors: [],
})
vi.mocked(TimelineToolbox).mockReturnValue(<div>mock TimelineToolbox</div>)
// vi.mocked(TimelineToolbox).mockReturnValue(<div>mock TimelineToolbox</div>)
vi.mocked(DeckSetupContainer).mockReturnValue(
<div>mock DeckSetupContainer</div>
)
vi.mocked(getSelectedTerminalItemId).mockReturnValue(null)
vi.mocked(OffDeck).mockReturnValue(<div>mock OffDeck</div>)
vi.mocked(getUnsavedForm).mockReturnValue(null)
vi.mocked(getSelectedSubstep).mockReturnValue(null)
vi.mocked(SubstepsToolbox).mockReturnValue(<div>mock SubstepsToolbox</div>)
vi.mocked(SubStepsToolbox).mockReturnValue(<div>mock SubStepsToolbox</div>)
vi.mocked(getEnableHotKeysDisplay).mockReturnValue(true)
vi.mocked(getSavedStepForms).mockReturnValue(
MOCK_STEP_FORMS as SavedStepFormState
Expand All @@ -84,7 +85,7 @@ describe('ProtocolSteps', () => {

it('renders each component in ProtocolSteps', () => {
render()
screen.getByText('mock TimelineToolbox')
// screen.getByText('mock TimelineToolbox')
screen.getByText('mock DeckSetupContainer')
})

Expand All @@ -98,7 +99,7 @@ describe('ProtocolSteps', () => {
it('renders the substepToolbox when selectedSubstep is not null', () => {
vi.mocked(getSelectedSubstep).mockReturnValue('mockId')
render()
screen.getByText('mock SubstepsToolbox')
screen.getByText('mock SubStepsToolbox')
})

it('renders the hot keys display', () => {
Expand Down
4 changes: 2 additions & 2 deletions protocol-designer/src/pages/Designer/ProtocolSteps/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
} from '../../../ui/steps/selectors'
import { DeckSetupContainer } from '../DeckSetup'
import { OffDeck } from '../Offdeck'
import { SubstepsToolbox } from './Timeline'
import { SubStepsToolbox } from './Timeline'

Check failure on line 35 in protocol-designer/src/pages/Designer/ProtocolSteps/index.tsx

View workflow job for this annotation

GitHub Actions / js checks

Module '"./Timeline"' has no exported member 'SubStepsToolbox'.

Check failure on line 35 in protocol-designer/src/pages/Designer/ProtocolSteps/index.tsx

View workflow job for this annotation

GitHub Actions / js checks

Module '"./Timeline"' has no exported member 'SubStepsToolbox'.
import { StepForm } from './StepForm'
import { StepSummary } from './StepSummary'
import { BatchEditToolbox } from './BatchEditToolbox'
Expand Down Expand Up @@ -173,7 +173,7 @@ export function ProtocolSteps(): JSX.Element {
) : null}
</Flex>
{formData == null && selectedSubstep ? (
<SubstepsToolbox stepId={selectedSubstep} />
<SubStepsToolbox stepId={selectedSubstep} />
) : null}
<StepForm />
{isMultiSelectMode ? <BatchEditToolbox /> : null}
Expand Down

0 comments on commit 9b88d76

Please sign in to comment.