@wix/design-system
Version:
@wix/design-system
60 lines (45 loc) • 1.55 kB
Markdown
## Tooltip Testkit
### Import
- unidriver: `import { TooltipUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { TooltipTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { TooltipTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { TooltipTestkit } 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()
- description: Clicks on the target element
### tooltipExists
- signature: tooltipExists()
- description: returns true if tooltip element exists on the DOM
### mouseEnter
- signature: mouseEnter()
- description: mouse over the target element
### mouseLeave
- signature: mouseLeave()
- description: mouse leaves the target element
### clickOutside
- signature: clickOutside()
- description: clicks outside the tooltip target
### getTooltipText
- signature: getTooltipText()
- description: returns tooltips content value in string
### hasSize
- signature: hasSize(sizeName)
- returns: Promise<boolean>
- description: Checks whether tooltip has a given size