@wix/design-system
Version:
@wix/design-system
71 lines (53 loc) • 1.95 kB
Markdown
## EmptyState Testkit
### Import
- unidriver: `import { EmptyStateUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { EmptyStateTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { EmptyStateTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { EmptyStateTestkit } 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
### element
- signature: element()
- description: Returns the element
### getTitleText
- signature: getTitleText()
- description: Returns the text of the title
### getSubtitleText
- signature: getSubtitleText()
- description: Returns the text of the subtitle
### hasTheme
- signature: hasTheme(themeName)
- description: Returns true if the component was configured with given skin
- deprecated: true
### hasSkin
- signature: hasSkin(skinName)
- description: Returns true if the component was configured with given skin
### getImageUrl
- signature: getImageUrl()
- description: Returns the URL of the image element (if persist)
### getImageContainerClassName
- signature: getImageContainerClassName()
### imageNodeExists
- signature: imageNodeExists()
- description: Returns `true` if a node passed via the `image` prop exists
### childrenContentExists
- signature: childrenContentExists()
- description: Returns `true` if children content exists
### hasAlign
- signature: hasAlign(align)
- description: Returns true if the component was configured with given align