@wix/design-system
Version:
@wix/design-system
61 lines (47 loc) • 1.5 kB
Markdown
## Range Testkit
### Import
- unidriver: `import { RangeUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { RangeTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { RangeTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { RangeTestkit } 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
### getInput
- signature: getInput()
- returns: Promise<HTMLElement>
- description: Gets the input wrapper
### clickFirstInput
- signature: clickFirstInput()
- returns: Promise<void>
- description: Clicks on the first input
### clickLastInput
- signature: clickLastInput()
- returns: Promise<void>
- description: Clicks on the last input
### hasInput
- signature: hasInput()
- returns: Promise<boolean>
- description: Checks if both inputs exist
### getLabel
- signature: getLabel()
- returns: Promise<HTMLElement>
- description: Gets the label
### hasLabel
- signature: hasLabel()
- returns: Promise<boolean>
- description: Checks if label exists