@wix/design-system
Version:
@wix/design-system
75 lines (56 loc) • 1.77 kB
Markdown
## Radio Testkit
### Import
- unidriver: `import { RadioUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { RadioTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { RadioTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { RadioTestkit } 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
### keyDown
- signature: keyDown(key)
- description: Triggers a keyDown event on the radio input.
### getValue
- signature: getValue()
- description: Gets value of radio input.
### getName
- signature: getName()
- description: Gets name of radio input.
### getId
- signature: getId()
- description: Gets id of radio input.
### getLabel
- signature: getLabel()
- description: Gets label text of radio.
### iconExists
- signature: iconExists()
- description: Checks if icon of radio exists.
### labelExists
- signature: labelExists()
- description: Checks if label of radio exists.
### isChecked
- signature: isChecked()
- description: Checks if radio is checked.
### isDisabled
- signature: isDisabled()
- description: Checks if radio is disabled.
### mouseEnter
- signature: mouseEnter()
- description: Triggers a mouseEnter event.
### mouseLeave
- signature: mouseLeave()
- description: Triggers a mouseLeave event.