@wix/design-system
Version:
@wix/design-system
21 lines • 1.23 kB
JavaScript
import { dataHooks } from './LinearProgressBar.constants';
import { linearProgressBarUniDriverFactory as coreLinearProgressBarUniDriverFactory } from './LinearProgressBarCore/LinearProgressBarCore.uni.driver';
import { statusIndicatorDriverFactory } from '../StatusIndicator/StatusIndicator.uni.driver';
export const linearProgressBarDriverFactory = (base, body) => {
const statusIndicatorTestkit = () => statusIndicatorDriverFactory(base.$(`[data-hook="${dataHooks.errorIcon}"]`), body);
const coreProgressBarDriver = coreLinearProgressBarUniDriverFactory(base);
return {
...coreProgressBarDriver,
// Checks whether error icon is shown
isErrorIconShown: () => base.$(`[data-hook=${dataHooks.errorIcon}]`).exists(),
// Checks whether success icon is shown
isSuccessIconShown: () => base.$(`[data-hook=${dataHooks.successIcon}]`).exists(),
// Returns the tooltip error message
getTooltipErrorMessage: statusIndicatorTestkit().getMessage,
// Returns the skin
getSkin: () => base.attr('data-skin'),
// Returns the padding
getPadding: () => base.attr('data-padding'),
};
};
//# sourceMappingURL=LinearProgressBar.uni.driver.js.map