UNPKG

wix-style-react

Version:
19 lines (14 loc) 605 B
import { selectableAccordionDriverFactory as publicDriverFactory } from '../SelectableAccordion.uni.driver'; import { dataHooks } from '../constants'; import { getItemAt } from '../utils'; import { findByHook, countByHook } from '../../../test/utils/unidriver'; export const selectableAccordionPrivateDriverFactory = (base, body) => { return { ...publicDriverFactory(base, body), getItemsCount: () => countByHook(base, dataHooks.item), hoverOnItem: async idx => { const item = await getItemAt(base, idx); return findByHook(item, dataHooks.itemHeader).hover(); }, }; };