@wix/design-system
Version:
@wix/design-system
71 lines (53 loc) • 1.8 kB
Markdown
## Thumbnail Testkit
### Import
- unidriver: `import { ThumbnailUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { ThumbnailTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { ThumbnailTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { ThumbnailTestkit } 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
### getTitle
- signature: getTitle()
- description: Gets thumbnail title
### getDescription
- signature: getDescription()
- description: Gets thumbnail description
### getSelectedIcon
- signature: getSelectedIcon()
- description: Gets selected icon driver
### getBackgroundImage
- signature: getBackgroundImage()
- description: Gets background image driver
### isSelected
- signature: isSelected()
- description: Checks whether Thumbnail is selected
### isDisabled
- signature: isDisabled()
- description: Checks whether Thumbnail is disabled
### getImage
- signature: getImage()
- description: Gets thumbnail image driver
### getWidth
- signature: getWidth()
- description: Gets thumbnail width, if it's set through `width` prop
### getHeight
- signature: getHeight()
- description: Gets thumbnail height, if it's set through `height` prop
### getAriaLabel
- signature: getAriaLabel()
- description: Gets aria-label attribute