"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
var _react = _interopRequireDefault(require("react"));
var _react2 = require("../../utils/test-utils/react");
var _SocialPreview = _interopRequireDefault(require("../SocialPreview"));
var _SocialPreviewPrivateUni = require("./SocialPreview.private.uni.driver");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/SocialPreview/test/SocialPreview.spec.jsx",
  _this = void 0;
describe('SocialPreview', function () {
  var render = (0, _react2.createRendererWithUniDriver)(_SocialPreviewPrivateUni.socialPreviewPrivateDriverFactory);
  it('should override with default values', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
    var props, _render, driver;
    return _regenerator["default"].wrap(function _callee$(_context) {
      while (1) switch (_context.prev = _context.next) {
        case 0:
          props = {
            title: 'social-preview',
            previewUrl: 'SOCIAL-PREVIEW.COM',
            description: 'a social preview test',
            skin: 'twitter',
            size: 'small'
          };
          _render = render(/*#__PURE__*/_react["default"].createElement(_SocialPreview["default"], (0, _extends2["default"])({}, props, {
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 17,
              columnNumber: 31
            }
          }))), driver = _render.driver;
          _context.t0 = expect;
          _context.next = 5;
          return driver.exists();
        case 5:
          _context.t1 = _context.sent;
          (0, _context.t0)(_context.t1).toBe(true);
          _context.t2 = expect;
          _context.next = 10;
          return driver.getTitle();
        case 10:
          _context.t3 = _context.sent;
          (0, _context.t2)(_context.t3).toEqual('social-preview');
          _context.t4 = expect;
          _context.next = 15;
          return driver.getPreviewUrl();
        case 15:
          _context.t5 = _context.sent;
          (0, _context.t4)(_context.t5).toEqual('SOCIAL-PREVIEW.COM');
          _context.t6 = expect;
          _context.next = 20;
          return driver.getDescription();
        case 20:
          _context.t7 = _context.sent;
          (0, _context.t6)(_context.t7).toEqual('a social preview test');
          _context.t8 = expect;
          _context.next = 25;
          return driver.getSkin();
        case 25:
          _context.t9 = _context.sent;
          (0, _context.t8)(_context.t9).toEqual('twitter');
          _context.t10 = expect;
          _context.next = 30;
          return driver.getSize();
        case 30:
          _context.t11 = _context.sent;
          (0, _context.t10)(_context.t11).toEqual('small');
        case 32:
        case "end":
          return _context.stop();
      }
    }, _callee);
  })));
});