@wix/design-system
Version:
@wix/design-system
43 lines (32 loc) • 1.22 kB
Markdown
## Dropzone Testkit
### Import
- unidriver: `import { DropzoneUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { DropzoneTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { DropzoneTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { DropzoneTestkit } 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
### getContentElement
- signature: getContentElement()
- description: Returns the content compound element inside the dropzone.
### getOverlayElement
- signature: getOverlayElement()
- description: Returns the overlay compound element inside the dropzone.
### dropFiles
- signature: dropFiles(files)
- description: fires a drop event with the given files.