import { Annotations } from '../common/types' ; jest . mock ( '../../sc-size-provider/renderChild' ) ; jest . mock ( '../../sc-webgl-context/webglContext' ) ; import 'webgl-mock-threejs' ; import { newChartSpecPage } from '../../../testing/chartDescriptions/newChartSpecPage' ; import { describeChart } from '../../../testing/chartDescriptions/describeChart' ; const statusTimeline = newChartSpecPage ( 'sc-status-timeline' ) ; describe ( 'status-timeline' , ( ) => { describeChart ( statusTimeline , { yRange : true , viewport : true , trends : true , annotations : true , legend : true , } ) ; } ) ; describe ( 'annotations' , ( ) => { it ( 'is set correctly' , async ( ) => { const ANNOTATIONS = { x : [ { color : 'red' , value : new Date ( ) , } , ] , show : true , } ; const { chart } = await statusTimeline ( { annotations : ANNOTATIONS } ) ; const baseChart = chart . querySelector ( 'sc-webgl-base-chart' ) as HTMLScWebglBaseChartElement ; expect ( baseChart . annotations ) . toMatchObject ( { ... ANNOTATIONS , show : false , thresholdOptions : { showColor : true , } , } ) ; } ) ; } ) ;