import { UniDriver } from '@wix/wix-ui-test-utils/unidriver';
import { baseUniDriverFactory } from '../../../../unidriver';

export function RichTextEditUniDriver(base: UniDriver, _body: UniDriver) {
  return {
    ...baseUniDriverFactory(base),
    /** Returns true when the rich text editor popover is present in the DOM */
    isPopoverOpen: () => base.$('[data-hook="rich-text"]').exists(),
  };
}
