UNPKG

@wix/design-system

Version:

@wix/design-system

83 lines (62 loc) 2.16 kB
## AddressInput Testkit ### Import - unidriver: `import { AddressInputUniDriver } from '@wix/design-system/dist/testkit/unidriver';` - vanilla: `import { AddressInputTestkit } from '@wix/design-system/dist/testkit';` - puppeteer: `import { AddressInputTestkit } from '@wix/design-system/dist/testkit/puppeteer';` - playwright: `import { AddressInputTestkit } 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 ### getInputValue - signature: getInputValue() - description: Returns value of the input ### enterText - signature: enterText(text) - description: Enters given text to input ### clickClear - signature: clickClear() - description: Clicks on the clear button to clear input text ### isDisabled - signature: isDisabled() - description: Checks if input is disabled ### clickAtOption - signature: clickAtOption(index) - description: Clicks an option at given index ### clickAtOptionWithValue - signature: clickAtOptionWithValue(value) - description: Clicks an option with a given value ### isLoading - signature: isLoading() - description: Whether loader is shown ### clickInput - signature: clickInput() - description: Clicks on input ### getAmountOfItems - signature: getAmountOfItems() - description: Gets amount of dropdown items ### getItemMainLabelAt - signature: getItemMainLabelAt(index) - description: Gets item main label text at given index ### getItemSecondaryLabelAt - signature: getItemSecondaryLabelAt(index) - description: Gets item secondary label text at given index ### pressEnter - signature: pressEnter() - description: Press enter on address input ### isFocused - signature: isFocused() - description: Checks whether the address input is focused