UNPKG

wix-style-react

Version:
24 lines 1.08 kB
import { buttonCoreDriverFactory } from './ButtonCore/ButtonCore.uni.driver'; import { baseUniDriverFactory } from '../test-utils/utils/unidriver'; export const buttonDriverFactory = (base) => { const buttonCoreDriver = buttonCoreDriverFactory(base); return { ...baseUniDriverFactory(base), // Gets button text getButtonTextContent: buttonCoreDriver.getButtonTextContent, // Checks whether button is focused isFocused: buttonCoreDriver.isFocused, // Checks whether button is disabled isButtonDisabled: buttonCoreDriver.isButtonDisabled, // Checks whether button has a given skin hasSkin: async (skinName) => (await base.attr(`data-skin`)) === skinName, /** * Checks whether button has an icon prefix * @return {Promise<boolean>} */ isPrefixIconExists: buttonCoreDriver.isPrefixIconExists, // Checks whether button has an icon suffix isSuffixIconExists: buttonCoreDriver.isSuffixIconExists, }; }; //# sourceMappingURL=Button.uni.driver.js.map