@wix/design-system
Version:
@wix/design-system
224 lines (154 loc) • 4.04 kB
Markdown
## NumberInput Testkit
### Import
- unidriver: `import { NumberInputUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { NumberInputTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { NumberInputTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { NumberInputTestkit } 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
### clickOnIncrement
- signature: clickOnIncrement()
- description: Click on ticker up
### clickOnDecrement
- signature: clickOnDecrement()
- description: Click on ticker down
### isDownDisabled
- signature: isDownDisabled()
- description: Check if ticker down is disabled
### isUpDisabled
- signature: isUpDisabled()
- description: Check if ticker up is disabled