UNPKG

wix-style-react

Version:
22 lines 943 B
import { baseUniDriverFactory } from '../test-utils/utils/unidriver'; import { dataHooks } from './constants'; import { checkboxUniDriverFactory } from '../Checkbox/Checkbox.uni.driver'; export const tableListHeaderDriverFactory = (base, body) => { const getColumnAt = index => base.$$(`[data-hook="${dataHooks.tableListHeaderValue}"]`).get(index); const getCheckbox = () => checkboxUniDriverFactory(base.$(`[data-hook="${dataHooks.tableListHeaderCheckbox}"]`), body); const getColumnTextAt = async (index) => { const column = await getColumnAt(index); return column.text(); }; const toggleColumnSortAt = async (index) => { const column = await getColumnAt(index); return column.click(); }; return { ...baseUniDriverFactory(base, body), getColumnTextAt, toggleColumnSortAt, getCheckbox, }; }; //# sourceMappingURL=TableListHeader.uni.driver.js.map