UNPKG

@wix/design-system

Version:

@wix/design-system

89 lines (67 loc) 2.39 kB
## Accordion Testkit ### Import - unidriver: `import { AccordionUniDriver } from '@wix/design-system/dist/testkit/unidriver';` - vanilla: `import { AccordionTestkit } from '@wix/design-system/dist/testkit';` - puppeteer: `import { AccordionTestkit } from '@wix/design-system/dist/testkit/puppeteer';` - playwright: `import { AccordionTestkit } 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 ### getItemTitleAt - signature: getItemTitleAt(idx) - description: Gets the title by item index ### getItemSubtitleAt - signature: getItemSubtitleAt(idx) - description: Gets the subtitle by item index ### isIconExistsAt - signature: isIconExistsAt(idx) - description: Checks whether an icon exist at item index use 'isPrefixExistsAt' instead - deprecated: true ### isPrefixExistsAt - signature: isPrefixExistsAt(idx) - description: Checks whether prefix exists at item index ### isSuffixExistsAt - signature: isSuffixExistsAt(idx) - description: Checks whether suffix exists at item index ### isItemExpandedAt - signature: isItemExpandedAt(idx) - description: Checks whether an item is expanded at index ### isItemExpandedByTitle - signature: isItemExpandedByTitle(title) - description: Checks whether an item is expanded by title ### clickToggleButtonAt - signature: clickToggleButtonAt(idx) - description: Clicks toggle button at item index ### clickItemAt - signature: clickItemAt(idx) - description: Clicks item at index ### clickItemByTitle - signature: clickItemByTitle(title) - description: Clicks item by title ### getToggleButtonLabelAt - signature: getToggleButtonLabelAt(idx) - description: Gets toggle button label at item index ### getTransitionSpeed - signature: getTransitionSpeed() - description: Gets transition speed ### getSkin - signature: getSkin() - description: Returns skin ### getHorizontalPadding - signature: getHorizontalPadding() - description: Returns size of horizontal padding