UNPKG

@wix/design-system

Version:

@wix/design-system

17 lines 789 B
import { baseUniDriverFactory, findByHookAtIndex, } from '../utils/test-utils/unidriver'; import { tooltipDriverFactory } from '../Tooltip/Tooltip.uni.driver'; import { dataHooks } from './constants'; export const stackedBarChartDriverFactory = (base, body) => { return { ...baseUniDriverFactory(base), getDataLength: async () => { return base.$$(`[data-hook="${dataHooks.tooltip}"]`).count(); }, getTooltipContentAt: async (index) => { const tooltipElement = await findByHookAtIndex(base, dataHooks.tooltip, index); const tooltipTestkit = tooltipDriverFactory(tooltipElement, body); return await tooltipTestkit.getTooltipText(); }, }; }; //# sourceMappingURL=StackedBarChart.uni.driver.js.map