@wix/design-system
Version:
@wix/design-system
76 lines (59 loc) • 1.97 kB
Markdown
## AutoCompleteWithLabel Testkit
### Import
- unidriver: `import { AutoCompleteWithLabelUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { AutoCompleteWithLabelTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { AutoCompleteWithLabelTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { AutoCompleteWithLabelTestkit } 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
### getLabelText
- signature: getLabelText()
- returns: Promise<string>
- description: Gets label text
### getValue
- signature: getValue()
- returns: Promise<string>
- description: Gets input value
### enterText
- signature: enterText(text)
- returns: Promise<void>
- description: Enters given text to input
### clickAtOption
- signature: clickAtOption(index)
- returns: Promise<void>
- description: Clicks an option at given index
### clickAtOptionWithValue
- signature: clickAtOptionWithValue(value)
- returns: Promise<void>
- description: Clicks an option with a given value
### clickMenuArrow
- signature: clickMenuArrow()
- returns: Promise<void>
- description: Clicks the menu arrow
### isDisabled
- signature: isDisabled()
- returns: Promise<boolean>
- description: Checks if input is disabled
### blur
- signature: blur()
- returns: Promise<void>
- description: Triggers blur event on the input element
### hasError
- signature: hasError()
- returns: Promise<boolean>
- description: Checks whether there's a visible error icon