@wix/design-system
Version:
@wix/design-system
46 lines (35 loc) • 1.24 kB
Markdown
## ComposerButton Testkit
### Import
- unidriver: `import { ComposerButtonUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { ComposerButtonTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { ComposerButtonTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { ComposerButtonTestkit } 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
### isDisabled
- signature: isDisabled()
- returns: Promise<boolean>
- description: Checks whether button is disabled
### getLabelValue
- signature: getLabelValue()
- returns: Promise<string>
- description: Returns button label value
### isFocused
- signature: isFocused()
- returns: Promise<boolean>
- description: Checks whether button is focused