UNPKG

wix-style-react

Version:
26 lines (20 loc) 784 B
import { baseUniDriverFactory, countByHook, getDataAttributeValue, } from '../../test/utils/unidriver'; import { dataHooks } from './constants'; export const radarChartDriverFactory = (base, body) => { return { ...baseUniDriverFactory(base, body), /** Returns the number of scale circles */ getScaleLinesCount: () => countByHook(base, dataHooks.radarChartScaleLine), /** Returns the number of data item points */ getDataItemsCount: () => countByHook(base, dataHooks.radarChartDataItem), /** Checks whether the component is in the disabled state */ isDisabled: async () => (await getDataAttributeValue(base, 'data-disabled')) === 'true', getHoverIndex: async () => await getDataAttributeValue(base, 'data-hover-index'), }; };