wix-style-react
Version:
wix-style-react
19 lines • 960 B
JavaScript
import { findByHook } from '../test-utils/utils/unidriver';
import { badgeSelectUniDriverFactory } from './BadgeSelect.uni.driver';
import { popoverUniDriverFactory } from '../Popover/Popover.uni.driver';
import { badgeUniDriverFactory } from '../Badge/Badge.uni.driver';
import * as DATA_ATTR from './DataAttr';
export const badgeSelectPrivateUniDriverFactory = (base, body) => {
const popoverDriver = popoverUniDriverFactory(base, body);
const badgeDriver = badgeUniDriverFactory(findByHook(base, DATA_ATTR.DATA_BADGE));
return {
...badgeSelectUniDriverFactory(base, body),
/** Performs a click outside the component */
clickOutside: popoverDriver.clickOutside,
/** Clicks on the badge */
clickOnBadge: () => badgeDriver.click(),
/** Whether the dropdown is shown */
isDropdownShown: popoverDriver.isContentElementExists,
};
};
//# sourceMappingURL=BadgeSelect.private.uni.driver.js.map