'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
var editableFieldTests = function editableFieldTests(EditableComponent) {
  var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

  var EditableComponentWithContext = withContext(EditableComponent);
  var testbed = createTestbed(EditableComponentWithContext, Object.assign({
    isValid: true,
    showError: function showError() {},
    hideError: function hideError() {}
  }, props));

  shouldRenderComponent(testbed, {}, EditableComponentWithContext);

  describe('a11y tests', function () {
    it('should meet a11y standards', function (done) {
      testbed.render();
      // ignoring button-name because of the textcolor tinymce plugin
      testbed.checkA11yStandards(done, {
        ignores: ['aria-allowed-role', // TODO: remove this when canvas-rce is fixed
        'button-name']
      });
    });
  });
};

exports.default = editableFieldTests;