wix-storybook-utils
Version:
Utilities for automated component documentation within Storybook
21 lines • 857 B
JavaScript
import { __assign } from "tslib";
import React from 'react';
import { mount } from 'enzyme';
import { Option, Code } from './components';
var AutoExampleTestkit = /** @class */ (function () {
function AutoExampleTestkit(AutoExample) {
var _this = this;
this.when = {
created: function (props) { return (_this.component = mount(React.createElement(_this.AutoExample, __assign({}, props)))); },
};
this.get = {
options: function () { return _this.component.find(Option); },
codeBlock: function () { return _this.component.find(Code); },
exists: function (selector) { return _this.component.exists(selector); },
};
this.AutoExample = AutoExample;
}
return AutoExampleTestkit;
}());
export default AutoExampleTestkit;
//# sourceMappingURL=testkit.js.map