UNPKG

@wix/design-system

Version:

@wix/design-system

106 lines (83 loc) 2.78 kB
## SectionHelper Testkit ### Import - unidriver: `import { SectionHelperUniDriver } from '@wix/design-system/dist/testkit/unidriver';` - vanilla: `import { SectionHelperTestkit } from '@wix/design-system/dist/testkit';` - puppeteer: `import { SectionHelperTestkit } from '@wix/design-system/dist/testkit/puppeteer';` - playwright: `import { SectionHelperTestkit } 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 ### titleText - signature: titleText() - returns: Promise<string> - description: Gets the title text ### actionText - signature: actionText() - returns: Promise<string> - description: Gets the action text ### clickAction - signature: clickAction() - returns: Promise<void> - description: Clicks the action ### isActionDisabled - signature: isActionDisabled() - returns: Promise<boolean> - description: Checks whether the action button is disabled ### clickClose - signature: clickClose() - returns: Promise<void> - description: Clicks the close button ### isCloseButtonDisplayed - signature: isCloseButtonDisplayed() - returns: Promise<boolean> - description: Checks whether the close button is displayed ### hasPrefix - signature: hasPrefix() - returns: Promise<boolean> - description: Checks whether the prefix is displayed ### textContent - signature: textContent() - returns: Promise<string> - description: Gets the text content ### isWarning - signature: isWarning() - returns: Promise<boolean> - description: Checks whether the component appears as "warning" ### isStandard - signature: isStandard() - returns: Promise<boolean> - description: Checks whether the component appears as "standard" ### isDanger - signature: isDanger() - returns: Promise<boolean> - description: Checks whether the component appears as "danger" ### isExperimentalDark - signature: isExperimentalDark() - returns: Promise<boolean> - description: Checks whether the component appears as "experimentalDark" ### isSuccess - signature: isSuccess() - returns: Promise<boolean> - description: Checks whether the component appears as "success" ### isPremium - signature: isPremium() - returns: Promise<boolean> - description: Checks whether the component appears as "premium" ### isPreview - signature: isPreview() - returns: Promise<boolean> - description: Checks whether the component appears as "preview"