@wix/design-system
Version:
@wix/design-system
51 lines (39 loc) • 1.46 kB
Markdown
## NestableListBase Testkit
### Import
- unidriver: `import { NestableListBaseUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { NestableListBaseTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { NestableListBaseTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { NestableListBaseTestkit } 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
### reorder
- signature: reorder({dataHookFrom, dataHookTo})
- returns: Promise<void>
- description: reorder nestable list items by data-hook
### changeItemDepth
- signature: changeItemDepth({dataHook, depthLevel, threshold})
- returns: Promise<void>
- description: change nestable list item depth
### getItemPosition
- signature: getItemPosition({dataHook})
- returns: Promise<void>
- description: get nestable list item position
### getItemDepth
- signature: getItemDepth({dataHook})
- returns: Promise<void>
- description: get nestable list item depth