UNPKG

@wix/design-system

Version:

@wix/design-system

66 lines (51 loc) 1.61 kB
## AddItem Testkit ### Import - unidriver: `import { AddItemUniDriver } from '@wix/design-system/dist/testkit/unidriver';` - vanilla: `import { AddItemTestkit } from '@wix/design-system/dist/testkit';` - puppeteer: `import { AddItemTestkit } from '@wix/design-system/dist/testkit/puppeteer';` - playwright: `import { AddItemTestkit } 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 ### getText - signature: getText() - returns: Promise<string> - description: Gets AddItem text ### textExists - signature: textExists() - returns: Promise<boolean> - description: Checks whether AddItem text exist ### getTooltipContent - signature: getTooltipContent() - returns: Promise<string | > - description: Gets tooltip text ### getSubtitle - signature: getSubtitle() - returns: Promise<string> - description: Gets AddItem subtitle ### isFocused - signature: isFocused() - returns: Promise<boolean> - description: Checks whether AddItem is focused ### focus - signature: focus() - returns: Promise<void> - description: Sets focus on the element ### blur - signature: blur() - returns: Promise<void> - description: Removes focus on the element