import { describe, expect, it } from 'vitest' import { PROTOCOL_STEP_TYPE_COLORS, PROTOCOL_STEP_TYPE_ICONS, formatProtocolDuration, } from '../../components/ProtocolStep.presentation' describe('ProtocolStep presentation helpers', () => { it('formats protocol durations for editor and timeline displays', () => { expect(formatProtocolDuration(undefined)).toBe('') expect(formatProtocolDuration(15)).toBe('15m') expect(formatProtocolDuration(60)).toBe('1h') expect(formatProtocolDuration(95)).toBe('1h 35m') }) it('keeps icons and colors available for every protocol step type', () => { expect(Object.keys(PROTOCOL_STEP_TYPE_ICONS).sort()).toEqual([ 'addition', 'centrifuge', 'custom', 'incubation', 'measurement', 'mix', 'transfer', 'wash', ]) expect(PROTOCOL_STEP_TYPE_COLORS.measurement).toBe('#8B5CF6') expect(PROTOCOL_STEP_TYPE_ICONS.custom).toContain('M10.325') }) })