UNPKG

@wix/design-system

Version:

@wix/design-system

203 lines 5.46 kB
import _extends from "@babel/runtime/helpers/extends"; var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/esm/FeatureList/test/FeatureList.visual.jsx", _this = this; import React from 'react'; import { storiesOf } from '@storybook/react'; import FeatureList from '../FeatureList'; import { RTLWrapper } from '../../../stories/utils/RTLWrapper'; var commonProps = { features: [{ image: /*#__PURE__*/React.createElement("img", { width: 60, height: 60, __self: this, __source: { fileName: _jsxFileName, lineNumber: 9, columnNumber: 14 } }), title: 'Remove Wix Ads', text: "Enjoy a website that's completely your own brand by removing Wix ads." }, { image: /*#__PURE__*/React.createElement("img", { width: 60, height: 60, __self: this, __source: { fileName: _jsxFileName, lineNumber: 14, columnNumber: 14 } }), title: 'Connect a Custom Domain', text: 'Get your business found with a custom domain.' }, { image: /*#__PURE__*/React.createElement("img", { width: 60, height: 60, __self: this, __source: { fileName: _jsxFileName, lineNumber: 19, columnNumber: 14 } }), title: 'Accept Online Payment', text: 'Let your customers and clients pay you online at checkout.' }] }; var tests = [{ describe: 'sanity', its: [{ it: 'default', props: {} }, { it: 'no title', props: { features: [{ image: /*#__PURE__*/React.createElement("img", { width: 60, height: 60, __self: this, __source: { fileName: _jsxFileName, lineNumber: 39, columnNumber: 22 } }), text: "Enjoy a website that's completely your own brand by removing Wix ads." }, { image: /*#__PURE__*/React.createElement("img", { width: 60, height: 60, __self: this, __source: { fileName: _jsxFileName, lineNumber: 43, columnNumber: 22 } }), text: 'Get your business found with a custom domain.' }, { image: /*#__PURE__*/React.createElement("img", { width: 60, height: 60, __self: this, __source: { fileName: _jsxFileName, lineNumber: 47, columnNumber: 22 } }), text: 'Let your customers and clients pay you online at checkout.' }] } }, { it: 'no text', props: { features: [{ image: /*#__PURE__*/React.createElement("img", { width: 60, height: 60, __self: this, __source: { fileName: _jsxFileName, lineNumber: 58, columnNumber: 22 } }), title: 'Remove Wix Ads' }, { image: /*#__PURE__*/React.createElement("img", { width: 60, height: 60, __self: this, __source: { fileName: _jsxFileName, lineNumber: 62, columnNumber: 22 } }), title: 'Connect a Custom Domain' }, { image: /*#__PURE__*/React.createElement("img", { width: 60, height: 60, __self: this, __source: { fileName: _jsxFileName, lineNumber: 66, columnNumber: 22 } }), title: 'Accept Online Payment' }] } }, { it: 'no image', props: { features: [{ title: 'Remove Wix Ads', text: "Enjoy a website that's completely your own brand by removing Wix ads." }, { title: 'Connect a Custom Domain', text: 'Get your business found with a custom domain.' }, { title: 'Accept Online Payment', text: 'Let your customers and clients pay you online at checkout.' }] } }] }]; var rtlTests = [{ describe: 'rtl', its: [{ it: 'rtl', props: {} }] }]; tests.forEach(function (_ref) { var describe = _ref.describe, its = _ref.its; its.forEach(function (_ref2) { var it = _ref2.it, props = _ref2.props; storiesOf("".concat(FeatureList.displayName).concat(describe ? '/' + describe : ''), module).add(it, function () { return /*#__PURE__*/React.createElement(FeatureList, _extends({}, commonProps, props, { __self: _this, __source: { fileName: _jsxFileName, lineNumber: 112, columnNumber: 21 } })); }); }); }); rtlTests.forEach(function (_ref3) { var describe = _ref3.describe, its = _ref3.its; its.forEach(function (_ref4) { var it = _ref4.it, props = _ref4.props; storiesOf("".concat(FeatureList.displayName).concat(describe ? '/' + describe : ''), module).add(it, function () { return /*#__PURE__*/React.createElement(RTLWrapper, { rtl: true, __self: _this, __source: { fileName: _jsxFileName, lineNumber: 122, columnNumber: 7 } }, /*#__PURE__*/React.createElement(FeatureList, _extends({}, commonProps, props, { __self: _this, __source: { fileName: _jsxFileName, lineNumber: 123, columnNumber: 9 } }))); }); }); });