UNPKG

@wix/design-system

Version:

@wix/design-system

128 lines (101 loc) 3.26 kB
## FloatingHelper Testkit ### Import - unidriver: `import { FloatingHelperUniDriver } from '@wix/design-system/dist/testkit/unidriver';` - vanilla: `import { FloatingHelperTestkit } from '@wix/design-system/dist/testkit';` - puppeteer: `import { FloatingHelperTestkit } from '@wix/design-system/dist/testkit/puppeteer';` - playwright: `import { FloatingHelperTestkit } from '@wix/design-system/dist/testkit/playwright';` ### API ### exists - signature: exists() - returns: Promise<boolean> - description: Checks whether the component found with the given data hook ### element - signature: element() - returns: Promise<any> - description: Gets the component root element ### click - signature: click() - returns: Promise<void> - description: Clicks on the component root element ### base - signature: base() - returns: UniDriver - description: Returns UniDriver for the base element ### click - signature: click() - returns: Promise<void> - description: Clicks the trigger element ### getTriggerElement - signature: getTriggerElement() - returns: Promise<any> - description: Gets the trigger element ### getTargetElement - signature: getTargetElement() - returns: Promise<any> - description: Gets the target element - deprecated: true ### triggerExists - signature: triggerExists() - returns: Promise<boolean> - description: Checks whether the trigger element exists ### isTargetElementExists - signature: isTargetElementExists() - returns: Promise<boolean> - description: Checks whether target element exists - deprecated: true ### getPortalElement - signature: getPortalElement() - returns: Promise<any> - description: Gets the portal element - deprecated: true ### getContentElement - signature: getContentElement() - returns: Promise<any> - description: Gets the content element ### isContentElementExists - signature: isContentElementExists() - returns: Promise<boolean> - description: Checks whether content element exists ### mouseEnter - signature: mouseEnter() - returns: Promise<void> - description: Triggers a mouseEnter event ### mouseLeave - signature: mouseLeave() - returns: Promise<void> - description: Triggers a mouseLeave event ### clickOutside - signature: clickOutside() - returns: Promise<void> - description: Clicks outside the target element ### getArrowOffset - signature: getArrowOffset() - returns: Promise<any> - description: Gets the arrow offset ### getContentElementUniDriver - signature: getContentElementUniDriver() - description: Gets content as unidriver element - deprecated: true ### isContentVisible - signature: isContentVisible() - returns: Promise<boolean> - description: Checks whether the content is visible ### isOpened - signature: isOpened() - returns: Promise<boolean> - description: Checks whether the popover's content is open ### hasCloseButton - signature: hasCloseButton() - returns: Promise<boolean> - description: Check whether the helper has a close button ### clickCloseButton - signature: clickCloseButton() - returns: Promise<void> - description: Clicks the close button ### getHelperContentDriver - signature: getHelperContentDriver() - deprecated: true ### getWidth - signature: getWidth() - returns: Promise<string> - description: Gets the width of the content root element