import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/esm/FeatureList/test/FeatureList.spec.jsx",
  _this = this;
import _regeneratorRuntime from "@babel/runtime/regenerator";
import React from 'react';
import { createRendererWithUniDriver, cleanup } from '../../utils/test-utils/unit';
import FeatureList from '../FeatureList';
import { featureListPrivateDriverFactory } from './FeatureList.private.uni.driver';
describe(FeatureList.displayName, function () {
  var render = createRendererWithUniDriver(featureListPrivateDriverFactory);
  afterEach(function () {
    cleanup();
  });
  it('should render', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
    var _render, driver;
    return _regeneratorRuntime.wrap(function _callee$(_context) {
      while (1) switch (_context.prev = _context.next) {
        case 0:
          _render = render(/*#__PURE__*/React.createElement(FeatureList, {
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 18,
              columnNumber: 31
            }
          })), driver = _render.driver;
          _context.t0 = expect;
          _context.next = 4;
          return driver.exists();
        case 4:
          _context.t1 = _context.sent;
          (0, _context.t0)(_context.t1).toBe(true);
        case 6:
        case "end":
          return _context.stop();
      }
    }, _callee);
  })));
  it('should render 3 features', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
    var _render2, driver;
    return _regeneratorRuntime.wrap(function _callee2$(_context2) {
      while (1) switch (_context2.prev = _context2.next) {
        case 0:
          _render2 = render(/*#__PURE__*/React.createElement(FeatureList, {
            features: [{
              image: /*#__PURE__*/React.createElement("img", {
                width: 60,
                height: 60,
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 28,
                  columnNumber: 20
                }
              }),
              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: 33,
                  columnNumber: 20
                }
              }),
              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: 38,
                  columnNumber: 20
                }
              }),
              title: 'Accept Online Payment',
              text: 'Let your customers and clients pay you online at checkout.'
            }],
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 25,
              columnNumber: 7
            }
          })), driver = _render2.driver;
          _context2.t0 = expect;
          _context2.next = 4;
          return driver.getNumberOfFeatures();
        case 4:
          _context2.t1 = _context2.sent;
          (0, _context2.t0)(_context2.t1).toEqual(3);
        case 6:
        case "end":
          return _context2.stop();
      }
    }, _callee2);
  })));
  describe('Feature', function () {
    describe('title', function () {
      it('should display title', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
        var _render3, driver;
        return _regeneratorRuntime.wrap(function _callee3$(_context3) {
          while (1) switch (_context3.prev = _context3.next) {
            case 0:
              _render3 = render(/*#__PURE__*/React.createElement(FeatureList, {
                features: [{
                  image: /*#__PURE__*/React.createElement("img", {
                    width: 60,
                    height: 60,
                    __self: _this,
                    __source: {
                      fileName: _jsxFileName,
                      lineNumber: 56,
                      columnNumber: 24
                    }
                  }),
                  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: 61,
                      columnNumber: 24
                    }
                  }),
                  title: 'Accept Online Payment',
                  text: 'Let your customers and clients pay you online at checkout.'
                }],
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 53,
                  columnNumber: 11
                }
              })), driver = _render3.driver;
              _context3.t0 = expect;
              _context3.next = 4;
              return driver.hasFeatureTitle(1);
            case 4:
              _context3.t1 = _context3.sent;
              (0, _context3.t0)(_context3.t1).toEqual(true);
              _context3.t2 = expect;
              _context3.next = 9;
              return driver.getFeatureTitle(1);
            case 9:
              _context3.t3 = _context3.sent;
              (0, _context3.t2)(_context3.t3).toEqual('Accept Online Payment');
            case 11:
            case "end":
              return _context3.stop();
          }
        }, _callee3);
      })));
      it('should not display title', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
        var _render4, driver;
        return _regeneratorRuntime.wrap(function _callee4$(_context4) {
          while (1) switch (_context4.prev = _context4.next) {
            case 0:
              _render4 = render(/*#__PURE__*/React.createElement(FeatureList, {
                features: [{
                  image: /*#__PURE__*/React.createElement("img", {
                    width: 60,
                    height: 60,
                    __self: _this,
                    __source: {
                      fileName: _jsxFileName,
                      lineNumber: 80,
                      columnNumber: 24
                    }
                  }),
                  text: "Enjoy a website that's completely your own brand by removing Wix ads."
                }],
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 77,
                  columnNumber: 11
                }
              })), driver = _render4.driver;
              _context4.t0 = expect;
              _context4.next = 4;
              return driver.hasFeatureTitle(0);
            case 4:
              _context4.t1 = _context4.sent;
              (0, _context4.t0)(_context4.t1).toEqual(false);
            case 6:
            case "end":
              return _context4.stop();
          }
        }, _callee4);
      })));
    });
    describe('text', function () {
      it('should display text', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
        var _render5, driver;
        return _regeneratorRuntime.wrap(function _callee5$(_context5) {
          while (1) switch (_context5.prev = _context5.next) {
            case 0:
              _render5 = render(/*#__PURE__*/React.createElement(FeatureList, {
                features: [{
                  image: /*#__PURE__*/React.createElement("img", {
                    width: 60,
                    height: 60,
                    __self: _this,
                    __source: {
                      fileName: _jsxFileName,
                      lineNumber: 97,
                      columnNumber: 24
                    }
                  }),
                  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: 102,
                      columnNumber: 24
                    }
                  }),
                  title: 'Accept Online Payment',
                  text: 'Let your customers and clients pay you online at checkout.'
                }],
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 94,
                  columnNumber: 11
                }
              })), driver = _render5.driver;
              _context5.t0 = expect;
              _context5.next = 4;
              return driver.hasFeatureText(1);
            case 4:
              _context5.t1 = _context5.sent;
              (0, _context5.t0)(_context5.t1).toEqual(true);
              _context5.t2 = expect;
              _context5.next = 9;
              return driver.getFeatureText(1);
            case 9:
              _context5.t3 = _context5.sent;
              (0, _context5.t2)(_context5.t3).toEqual('Let your customers and clients pay you online at checkout.');
            case 11:
            case "end":
              return _context5.stop();
          }
        }, _callee5);
      })));
      it('should not display text', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
        var _render6, driver;
        return _regeneratorRuntime.wrap(function _callee6$(_context6) {
          while (1) switch (_context6.prev = _context6.next) {
            case 0:
              _render6 = render(/*#__PURE__*/React.createElement(FeatureList, {
                features: [{
                  image: /*#__PURE__*/React.createElement("img", {
                    width: 60,
                    height: 60,
                    __self: _this,
                    __source: {
                      fileName: _jsxFileName,
                      lineNumber: 121,
                      columnNumber: 24
                    }
                  }),
                  title: 'Remove Wix Ads'
                }],
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 118,
                  columnNumber: 11
                }
              })), driver = _render6.driver;
              _context6.t0 = expect;
              _context6.next = 4;
              return driver.hasFeatureText(0);
            case 4:
              _context6.t1 = _context6.sent;
              (0, _context6.t0)(_context6.t1).toEqual(false);
            case 6:
            case "end":
              return _context6.stop();
          }
        }, _callee6);
      })));
    });
    describe('image', function () {
      it('should display image', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
        var imgSrc, _render7, driver;
        return _regeneratorRuntime.wrap(function _callee7$(_context7) {
          while (1) switch (_context7.prev = _context7.next) {
            case 0:
              imgSrc = 'https://static.wixstatic.com/media/c78d05b79ede429fb77c9d8ec4443b93.jpg/v1/fit/w_300,h_200/c78d05b79ede429fb77c9d8ec4443b93.jpg';
              _render7 = render(/*#__PURE__*/React.createElement(FeatureList, {
                features: [{
                  image: /*#__PURE__*/React.createElement("img", {
                    "data-hook": "feature-image-node",
                    src: imgSrc,
                    __self: _this,
                    __source: {
                      fileName: _jsxFileName,
                      lineNumber: 141,
                      columnNumber: 24
                    }
                  }),
                  title: 'Remove Wix Ads',
                  text: "Enjoy a website that's completely your own brand by removing Wix ads."
                }],
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 138,
                  columnNumber: 11
                }
              })), driver = _render7.driver;
              _context7.t0 = expect;
              _context7.next = 5;
              return driver.hasFeatureImage(0, '[data-hook="feature-image-node"]');
            case 5:
              _context7.t1 = _context7.sent;
              (0, _context7.t0)(_context7.t1).toEqual(true);
            case 7:
            case "end":
              return _context7.stop();
          }
        }, _callee7);
      })));
      it('should not display image', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
        var _render8, driver;
        return _regeneratorRuntime.wrap(function _callee8$(_context8) {
          while (1) switch (_context8.prev = _context8.next) {
            case 0:
              _render8 = render(/*#__PURE__*/React.createElement(FeatureList, {
                features: [{
                  title: 'Remove Wix Ads',
                  text: "Enjoy a website that's completely your own brand by removing Wix ads."
                }],
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 156,
                  columnNumber: 11
                }
              })), driver = _render8.driver;
              _context8.t0 = expect;
              _context8.next = 4;
              return driver.hasFeatureImage(0);
            case 4:
              _context8.t1 = _context8.sent;
              (0, _context8.t0)(_context8.t1).toEqual(false);
            case 6:
            case "end":
              return _context8.stop();
          }
        }, _callee8);
      })));
    });
  });
});