@wix/design-system
Version:
@wix/design-system
55 lines (41 loc) • 1.3 kB
Markdown
## Badge Testkit
### Import
- unidriver: `import { BadgeUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { BadgeTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { BadgeTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { BadgeTestkit } 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
### text
- signature: text()
- description: Gets badge text
### getType
- signature: getType()
- description: Gets badge type
### getSkin
- signature: getSkin()
- description: Gets badge type
### getSize
- signature: getSize()
- description: Gets badge size
### isUppercase
- signature: isUppercase()
- description: Checks whether the text is uppercase
### hasClickCursor
- signature: hasClickCursor()
- description: Checks whether badge is clickable