UNPKG

@wix/design-system

Version:

@wix/design-system

208 lines (142 loc) 3.64 kB
## Input Testkit ### Import - unidriver: `import { InputUniDriver } from '@wix/design-system/dist/testkit/unidriver';` - vanilla: `import { InputTestkit } from '@wix/design-system/dist/testkit';` - puppeteer: `import { InputTestkit } from '@wix/design-system/dist/testkit/puppeteer';` - playwright: `import { InputTestkit } 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 ### click - signature: click() ### getInputAttribute - signature: getInputAttribute(name) ### getInputElementClasses - signature: getInputElementClasses() ### suffixComponentExists - signature: suffixComponentExists(className) ### getRootElementClasses - signature: getRootElementClasses() ### getAriaDescribedby - signature: getAriaDescribedby() ### getAriaLabel - signature: getAriaLabel() ### getName - signature: getName() ### getMaxLength - signature: getMaxLength() ### getType - signature: getType() ### getAriaControls - signature: getAriaControls() ### clickIconAffix - signature: clickIconAffix() ### clickCustomAffix - signature: clickCustomAffix() ### getCustomAffixText - signature: getCustomAffixText() ### hasSuffix - signature: hasSuffix() ### getClearButtonTooltipContent - signature: getClearButtonTooltipContent() ### prefixComponentExists - signature: prefixComponentExists(style) ### hasPrefix - signature: hasPrefix() ### hasClearButton - signature: hasClearButton() ### clickClear - signature: clickClear() ### getValue - signature: getValue() ### getText - signature: getText() ### getPattern - signature: getPattern() ### getPlaceholder - signature: getPlaceholder() ### isOfSize - signature: isOfSize(size) ### getSize - signature: getSize() ### isDisabled - signature: isDisabled() ### isHoveredStyle - signature: isHoveredStyle() ### isFocusedStyle - signature: isFocusedStyle() ### getRequired - signature: getRequired() ### enterText - signature: enterText(value) ### getAutocomplete - signature: getAutocomplete() ### getDefaultValue - signature: getDefaultValue() ### getTabIndex - signature: getTabIndex() ### isCustomInput - signature: isCustomInput() ### getReadOnly - signature: getReadOnly() ### getDisabled - signature: getDisabled() ### getTextOverflow - signature: getTextOverflow() ### focus - signature: focus() ### blur - signature: blur() ### keyUp - signature: keyUp() ### keyDown - signature: keyDown(eventData) ### pressKey - signature: pressKey(key) ### paste - signature: paste() ### copy - signature: copy() ### wheel - signature: wheel() ### trigger - signature: trigger(eventType, event) ### isFocus - signature: isFocus() ### clickMenuArrow - signature: clickMenuArrow() ### hasMenuArrow - signature: hasMenuArrow() ### isRTL - signature: isRTL() ### getCursorLocation - signature: getCursorLocation() ### clearText - signature: clearText() ### clickOutside - signature: clickOutside() ### isMasked - signature: isMasked() ### isSelected - signature: isSelected() ### hasStatus - signature: hasStatus(status) - description: Status Return true if there's a status ### getStatusMessage - signature: getStatusMessage() - description: If there's a status message, returns its text value