UNPKG

@wix/design-system

Version:

@wix/design-system

87 lines (65 loc) 2.17 kB
## Loader Testkit ### Import - unidriver: `import { LoaderUniDriver } from '@wix/design-system/dist/testkit/unidriver';` - vanilla: `import { LoaderTestkit } from '@wix/design-system/dist/testkit';` - puppeteer: `import { LoaderTestkit } from '@wix/design-system/dist/testkit/puppeteer';` - playwright: `import { LoaderTestkit } 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 ### component - signature: component() - deprecated: true ### getColor - signature: getColor() - description: returns the loader color ('blue' or 'white') ### getText - signature: getText() - description: returns the element text ### hasText - signature: hasText() - description: true if the element has text ### statusIndicatorExists - signature: statusIndicatorExists() - description: true if the status indicator is rendered ### isLarge - signature: isLarge() - description: true when using the large loader ### isMedium - signature: isMedium() - description: true when using the medium loader ### isSmall - signature: isSmall() - description: true when using the small loader ### isTiny - signature: isTiny() - description: true when using the tiny loader ### isLoading - signature: isLoading() - description: true when loader is in loading status ### isLoadingWithErrors - signature: isLoadingWithErrors() - description: true when loader is in loading-with-errors status ### isError - signature: isError() - description: true when loader is in error status ### isSuccess - signature: isSuccess() - description: true when loader is in success status ### getStatusMessage - signature: getStatusMessage() - description: trigger the tooltip and returns the value of the tooltip message (async function)