UNPKG

@wix/design-system

Version:

@wix/design-system

86 lines (67 loc) 2.23 kB
## ColorPicker Testkit ### Import - unidriver: `import { ColorPickerUniDriver } from '@wix/design-system/dist/testkit/unidriver';` - vanilla: `import { ColorPickerTestkit } from '@wix/design-system/dist/testkit';` - puppeteer: `import { ColorPickerTestkit } from '@wix/design-system/dist/testkit/puppeteer';` - playwright: `import { ColorPickerTestkit } 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 ### confirm - signature: confirm() - returns: Promise<Void> - description: Clicks the confirm button ### cancel - signature: cancel() - returns: Promise<Void> - description: Clicks the cancel button ### clickOnPreviousColor - signature: clickOnPreviousColor() - returns: Promise<Void> - description: Clicks the previous color selection ### historyPanelExists - signature: historyPanelExists() - returns: Promise<boolean> - description: Checks whether the history panel exists ### historyCurrentColor - signature: historyCurrentColor() - returns: Promise<string> - description: Gets the current selected color ### historyPreviousColor - signature: historyPreviousColor() - returns: Promise<string> - description: Gets the previous color selected ### clickAddColor - signature: clickAddColor() - returns: Promise<Void> - description: Clicks the add new color button ### selectRgbTab - signature: selectRgbTab() - returns: Promise<Void> - description: Clicks on RGB tab ### selectHsbTab - signature: selectHsbTab() - returns: Promise<Void> - description: Clicks on HSB tab ### hasConverter - signature: hasConverter() - returns: Promise<boolean> - description: Checks whether the converter tabs exist ### eyeDropperExists - signature: eyeDropperExists() - returns: Promise<boolean> - description: Checks whether the eye dropper button exists