import { InProductTestCase } from '@atlaskit/in-product-testing';
import { EditorPageObject } from '../../../page-objects/Editor';
import { RendererPageObject } from '../../../page-objects/Renderer';
export var editorTypingTestCase = function editorTypingTestCase(opts) {
  return new InProductTestCase({
    title: 'typing in Editor works',
    id: 'editor-typing',
    assertions: function assertions(cy) {
      var _opts$ui;
      var editor = new EditorPageObject(cy);
      editor.getEditorArea().type('abcdef');
      editor.getEditorArea().contains('abcdef');
      if (!opts || !((_opts$ui = opts.ui) !== null && _opts$ui !== void 0 && _opts$ui.publishButton)) {
        return;
      }
      var publishButton = opts.ui.publishButton;
      var renderer = new RendererPageObject(cy);
      cy.get(publishButton).click();
      renderer.getContent().contains('abcdef');
    }
  });
};