UNPKG

@wix/design-system

Version:

@wix/design-system

247 lines 6.68 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 '@wix/wix-storybook-utils/dynamic-stories'; import FeatureList from '../FeatureList'; import WixDesignSystemProvider from '../../WixDesignSystemProvider'; import { RTLWrapper } from '../../../stories/utils/RTLWrapper'; var commonProps = { features: [{ image: /*#__PURE__*/React.createElement("img", { width: 60, height: 60, __self: this, __source: { fileName: _jsxFileName, lineNumber: 10, 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: 15, 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: 20, 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: 40, 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: 44, 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: 48, 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: 59, columnNumber: 22 } }), title: 'Remove Wix Ads' }, { image: /*#__PURE__*/React.createElement("img", { width: 60, height: 60, __self: this, __source: { fileName: _jsxFileName, lineNumber: 63, columnNumber: 22 } }), title: 'Connect a Custom Domain' }, { image: /*#__PURE__*/React.createElement("img", { width: 60, height: 60, __self: this, __source: { fileName: _jsxFileName, lineNumber: 67, 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: 113, 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: 123, columnNumber: 7 } }, /*#__PURE__*/React.createElement(FeatureList, _extends({}, commonProps, props, { __self: _this, __source: { fileName: _jsxFileName, lineNumber: 124, columnNumber: 9 } }))); }); }); }); var mobileTests = [{ describe: 'mobile', its: [{ it: 'stacked', props: {} }] }]; mobileTests.forEach(function (_ref5) { var describe = _ref5.describe, its = _ref5.its; its.forEach(function (_ref6) { var it = _ref6.it, props = _ref6.props; storiesOf("".concat(FeatureList.displayName).concat(describe ? '/' + describe : ''), module).add(it, function () { return /*#__PURE__*/React.createElement(WixDesignSystemProvider, { mobile: true, __self: _this, __source: { fileName: _jsxFileName, lineNumber: 148, columnNumber: 7 } }, /*#__PURE__*/React.createElement("div", { style: { width: '375px' }, __self: _this, __source: { fileName: _jsxFileName, lineNumber: 149, columnNumber: 9 } }, /*#__PURE__*/React.createElement(FeatureList, _extends({}, commonProps, props, { __self: _this, __source: { fileName: _jsxFileName, lineNumber: 150, columnNumber: 11 } })))); }); }); });