"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));

var editableFieldTests = function editableFieldTests(EditableComponent) {
  var props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  var EditableComponentWithContext = withContext(EditableComponent);
  var testbed = createTestbed(EditableComponentWithContext, (0, _objectSpread2.default)({
    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']
      });
    });
  });
};

var _default = editableFieldTests;
exports.default = _default;