@wix/design-system
Version:
@wix/design-system
83 lines (62 loc) • 2.07 kB
Markdown
## Checkbox Testkit
### Import
- unidriver: `import { CheckboxUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { CheckboxTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { CheckboxTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { CheckboxTestkit } 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: Click on the component root element.
### focus
- signature: focus()
- description: focuses the component.
### isFocused
- signature: isFocused()
- description: Checks whether the checkbox is focused
### blur
- signature: blur()
- description: blurs off the element.
### isChecked
- signature: isChecked()
- description: Checks whether the checkbox is checked.
### isDisabled
- signature: isDisabled()
- description: Checks whether the checkbox is disabled.
### isRequired
- signature: isRequired()
- description: Checks whether the checkbox is required.
### isIndeterminate
- signature: isIndeterminate()
- description: Checks whether the checkbox's value is indeterminate.
### isTooltipEnabled
- signature: isTooltipEnabled()
- description: Checks whether the checkbox's tooltip is enabled.
### hasError
- signature: hasError()
- description: Checks whether the checkbox hasError prop is true.
### getTooltipContent
- signature: getTooltipContent()
- description: Gets the tooltip message.
### getLabel
- signature: getLabel()
- description: Gets checkbox's label.
### getLabelSize
- signature: getLabelSize()
- description: Gets the label's size.