import _defineProperty from "@babel/runtime/helpers/defineProperty";
import _extends from "@babel/runtime/helpers/extends";
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/esm/ModalPreviewLayout/test/ModalPreviewLayout.spec.jsx",
  _this = this;
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
import _regeneratorRuntime from "@babel/runtime/regenerator";
import React from 'react';
import { cleanup, createRendererWithUniDriver } from '../../utils/test-utils/unit';
import Box from '../../Box';
import { skins } from '../constants';
import ModalPreviewLayout from '../ModalPreviewLayout';
import { modalPreviewLayoutPrivateDriverFactory } from './ModalPreviewLayout.private.uni.driver';
var requiredProps = {
  children: /*#__PURE__*/React.createElement("div", {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 13,
      columnNumber: 13
    }
  }),
  onClose: function onClose() {}
};
describe('ModalPreviewLayout', function () {
  var render = createRendererWithUniDriver(modalPreviewLayoutPrivateDriverFactory);
  afterEach(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(ModalPreviewLayout, _extends({}, requiredProps, {
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 25,
              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 call onClose when clicking outside by default', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
    var props, _render2, driver;
    return _regeneratorRuntime.wrap(function _callee2$(_context2) {
      while (1) switch (_context2.prev = _context2.next) {
        case 0:
          props = _objectSpread(_objectSpread({}, requiredProps), {}, {
            onClose: vi.fn()
          });
          _render2 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, props, {
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 35,
              columnNumber: 31
            }
          }))), driver = _render2.driver;
          _context2.next = 4;
          return driver.clickOverlay();
        case 4:
          expect(props.onClose).toHaveBeenCalled();
        case 5:
        case "end":
          return _context2.stop();
      }
    }, _callee2);
  })));
  it('should not call onClose when shouldCloseOnOverlayClick set to false', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
    var props, _render3, driver;
    return _regeneratorRuntime.wrap(function _callee3$(_context3) {
      while (1) switch (_context3.prev = _context3.next) {
        case 0:
          props = _objectSpread(_objectSpread({}, requiredProps), {}, {
            shouldCloseOnOverlayClick: false,
            onClose: vi.fn()
          });
          _render3 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, props, {
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 48,
              columnNumber: 31
            }
          }))), driver = _render3.driver;
          _context3.next = 4;
          return driver.clickOverlay();
        case 4:
          expect(props.onClose).not.toHaveBeenCalled();
        case 5:
        case "end":
          return _context3.stop();
      }
    }, _callee3);
  })));
  it('should call onClose when clicking on the close button', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
    var props, _render4, driver;
    return _regeneratorRuntime.wrap(function _callee4$(_context4) {
      while (1) switch (_context4.prev = _context4.next) {
        case 0:
          props = _objectSpread(_objectSpread({}, requiredProps), {}, {
            onClose: vi.fn()
          });
          _render4 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, props, {
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 60,
              columnNumber: 31
            }
          }))), driver = _render4.driver;
          _context4.next = 4;
          return driver.clickClose();
        case 4:
          expect(props.onClose).toHaveBeenCalled();
        case 5:
        case "end":
          return _context4.stop();
      }
    }, _callee4);
  })));
  it('should render tooltip text when given "closeButtonTooltipText"', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
    var closeButtonTooltipText, _render5, driver, closeTooltip;
    return _regeneratorRuntime.wrap(function _callee5$(_context5) {
      while (1) switch (_context5.prev = _context5.next) {
        case 0:
          closeButtonTooltipText = 'Cerrado';
          _render5 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, {
            closeButtonTooltipText: closeButtonTooltipText,
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 70,
              columnNumber: 7
            }
          }))), driver = _render5.driver;
          closeTooltip = driver.closeTooltip;
          _context5.t0 = expect;
          _context5.next = 6;
          return closeTooltip.getTooltipText();
        case 6:
          _context5.t1 = _context5.sent;
          (0, _context5.t0)(_context5.t1).toBe(closeButtonTooltipText);
        case 8:
        case "end":
          return _context5.stop();
      }
    }, _callee5);
  })));
  it('should not render tooltip when not given "closeButtonTooltipText"', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
    var _render6, driver, closeTooltip;
    return _regeneratorRuntime.wrap(function _callee6$(_context6) {
      while (1) switch (_context6.prev = _context6.next) {
        case 0:
          _render6 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, {
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 82,
              columnNumber: 31
            }
          }))), driver = _render6.driver;
          closeTooltip = driver.closeTooltip;
          _context6.t0 = expect;
          _context6.next = 5;
          return closeTooltip.tooltipExists();
        case 5:
          _context6.t1 = _context6.sent;
          (0, _context6.t0)(_context6.t1).toBe(false);
        case 7:
        case "end":
          return _context6.stop();
      }
    }, _callee6);
  })));
  it('should render close button with aria-label when given "closeButtonAriaLabel"', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
    var closeButtonAriaLabel, _render7, driver;
    return _regeneratorRuntime.wrap(function _callee7$(_context7) {
      while (1) switch (_context7.prev = _context7.next) {
        case 0:
          closeButtonAriaLabel = 'Close preview';
          _render7 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, {
            closeButtonAriaLabel: closeButtonAriaLabel,
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 91,
              columnNumber: 7
            }
          }))), driver = _render7.driver;
          _context7.t0 = expect;
          _context7.next = 5;
          return driver.getCloseButtonAriaLabel();
        case 5:
          _context7.t1 = _context7.sent;
          (0, _context7.t0)(_context7.t1).toBe(closeButtonAriaLabel);
        case 7:
        case "end":
          return _context7.stop();
      }
    }, _callee7);
  })));
  it('should render the preview content', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
    var previewContent, props, _render8, driver;
    return _regeneratorRuntime.wrap(function _callee8$(_context8) {
      while (1) switch (_context8.prev = _context8.next) {
        case 0:
          previewContent = 'preview-content';
          props = _objectSpread(_objectSpread({}, requiredProps), {}, {
            children: /*#__PURE__*/React.createElement("div", {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 104,
                columnNumber: 17
              }
            }, previewContent)
          });
          _render8 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, props, {
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 106,
              columnNumber: 31
            }
          }))), driver = _render8.driver;
          _context8.t0 = expect;
          _context8.next = 6;
          return driver.getPreviewContent().text();
        case 6:
          _context8.t1 = _context8.sent;
          (0, _context8.t0)(_context8.t1).toBe(previewContent);
        case 8:
        case "end":
          return _context8.stop();
      }
    }, _callee8);
  })));
  it('should render the title', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
    var previewTitle, props, _render9, driver;
    return _regeneratorRuntime.wrap(function _callee9$(_context9) {
      while (1) switch (_context9.prev = _context9.next) {
        case 0:
          previewTitle = 'Dashing Title';
          props = _objectSpread(_objectSpread({}, requiredProps), {}, {
            title: previewTitle
          });
          _render9 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, props, {
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 117,
              columnNumber: 31
            }
          }))), driver = _render9.driver;
          _context9.t0 = expect;
          _context9.next = 6;
          return driver.getPreviewTitle().text();
        case 6:
          _context9.t1 = _context9.sent;
          (0, _context9.t0)(_context9.t1).toBe(previewTitle);
        case 8:
        case "end":
          return _context9.stop();
      }
    }, _callee9);
  })));
  it('should render the actions', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee0() {
    var previewActions, props, _render0, driver;
    return _regeneratorRuntime.wrap(function _callee0$(_context0) {
      while (1) switch (_context0.prev = _context0.next) {
        case 0:
          previewActions = 'Dashing Actions';
          props = _objectSpread(_objectSpread({}, requiredProps), {}, {
            actions: /*#__PURE__*/React.createElement("div", {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 126,
                columnNumber: 16
              }
            }, previewActions)
          });
          _render0 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, props, {
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 128,
              columnNumber: 31
            }
          }))), driver = _render0.driver;
          _context0.t0 = expect;
          _context0.next = 6;
          return driver.getPreviewActions().text();
        case 6:
          _context0.t1 = _context0.sent;
          (0, _context0.t0)(_context0.t1).toBe(previewActions);
        case 8:
        case "end":
          return _context0.stop();
      }
    }, _callee0);
  })));
  describe('skin', function () {
    it("default skin should be 'dark'", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee1() {
      var _render1, driver;
      return _regeneratorRuntime.wrap(function _callee1$(_context1) {
        while (1) switch (_context1.prev = _context1.next) {
          case 0:
            _render1 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 135,
                columnNumber: 33
              }
            }))), driver = _render1.driver;
            _context1.t0 = expect;
            _context1.next = 4;
            return driver.getSkin();
          case 4:
            _context1.t1 = _context1.sent;
            (0, _context1.t0)(_context1.t1).toBe(skins.dark);
          case 6:
          case "end":
            return _context1.stop();
        }
      }, _callee1);
    })));
    it("should set 'light' skin", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
      var _render10, driver;
      return _regeneratorRuntime.wrap(function _callee10$(_context10) {
        while (1) switch (_context10.prev = _context10.next) {
          case 0:
            _render10 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, {
              skin: skins.light,
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 141,
                columnNumber: 9
              }
            }))), driver = _render10.driver;
            _context10.t0 = expect;
            _context10.next = 4;
            return driver.getSkin();
          case 4:
            _context10.t1 = _context10.sent;
            (0, _context10.t0)(_context10.t1).toBe(skins.light);
          case 6:
          case "end":
            return _context10.stop();
        }
      }, _callee10);
    })));
  });
  describe('NavigationButton', function () {
    var props = {
      children: ['first', 'second', 'third'].map(function (ordinalNum) {
        return /*#__PURE__*/React.createElement(Box, {
          width: "90vw",
          height: "95vh",
          align: "center",
          verticalAlign: "middle",
          backgroundColor: "D80",
          children: "This is the ".concat(ordinalNum, " content page"),
          __self: _this,
          __source: {
            fileName: _jsxFileName,
            lineNumber: 150,
            columnNumber: 9
          }
        });
      })
    };
    it('should show the first child node', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11() {
      var _render11, driver;
      return _regeneratorRuntime.wrap(function _callee11$(_context11) {
        while (1) switch (_context11.prev = _context11.next) {
          case 0:
            _render11 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, props, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 163,
                columnNumber: 9
              }
            }))), driver = _render11.driver;
            _context11.t0 = expect;
            _context11.next = 4;
            return driver.getCurrentChildIndex();
          case 4:
            _context11.t1 = _context11.sent;
            (0, _context11.t0)(_context11.t1).toBe(0);
          case 6:
          case "end":
            return _context11.stop();
        }
      }, _callee11);
    })));
    it('should show the start at specific child node if startDisplayingAtChildIndex is given', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12() {
      var _render12, driver;
      return _regeneratorRuntime.wrap(function _callee12$(_context12) {
        while (1) switch (_context12.prev = _context12.next) {
          case 0:
            _render12 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, props, {
              startDisplayingAtChildIndex: 1,
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 170,
                columnNumber: 9
              }
            }))), driver = _render12.driver;
            _context12.t0 = expect;
            _context12.next = 4;
            return driver.getCurrentChildIndex();
          case 4:
            _context12.t1 = _context12.sent;
            (0, _context12.t0)(_context12.t1).toBe(1);
          case 6:
          case "end":
            return _context12.stop();
        }
      }, _callee12);
    })));
    it('should switch to the next child node when clicking on right navigation button', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
      var _render13, driver;
      return _regeneratorRuntime.wrap(function _callee13$(_context13) {
        while (1) switch (_context13.prev = _context13.next) {
          case 0:
            _render13 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, props, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 181,
                columnNumber: 9
              }
            }))), driver = _render13.driver;
            _context13.next = 3;
            return driver.clickNextNavigationButton();
          case 3:
            _context13.t0 = expect;
            _context13.next = 6;
            return driver.getCurrentChildIndex();
          case 6:
            _context13.t1 = _context13.sent;
            (0, _context13.t0)(_context13.t1).toBe(1);
          case 8:
          case "end":
            return _context13.stop();
        }
      }, _callee13);
    })));
    it('should switch to the previous child node when clicking on left navigation button', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
      var _render14, driver;
      return _regeneratorRuntime.wrap(function _callee14$(_context14) {
        while (1) switch (_context14.prev = _context14.next) {
          case 0:
            _render14 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, props, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 189,
                columnNumber: 9
              }
            }))), driver = _render14.driver;
            _context14.next = 3;
            return driver.clickNextNavigationButton();
          case 3:
            _context14.t0 = expect;
            _context14.next = 6;
            return driver.getCurrentChildIndex();
          case 6:
            _context14.t1 = _context14.sent;
            (0, _context14.t0)(_context14.t1).toBe(1);
            _context14.next = 10;
            return driver.clickPrevNavigationButton();
          case 10:
            _context14.t2 = expect;
            _context14.next = 13;
            return driver.getCurrentChildIndex();
          case 13:
            _context14.t3 = _context14.sent;
            (0, _context14.t2)(_context14.t3).toBe(0);
          case 15:
          case "end":
            return _context14.stop();
        }
      }, _callee14);
    })));
    describe('"nextButtonProps" prop', function () {
      it('should not render tooltip when nextButtonProps is undefined', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15() {
        var _render15, driver, tooltipDriver;
        return _regeneratorRuntime.wrap(function _callee15$(_context15) {
          while (1) switch (_context15.prev = _context15.next) {
            case 0:
              _render15 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, props, {
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 200,
                  columnNumber: 11
                }
              }))), driver = _render15.driver;
              tooltipDriver = driver.nextTooltip;
              _context15.t0 = expect;
              _context15.next = 5;
              return tooltipDriver.tooltipExists();
            case 5:
              _context15.t1 = _context15.sent;
              (0, _context15.t0)(_context15.t1).toBe(false);
            case 7:
            case "end":
              return _context15.stop();
          }
        }, _callee15);
      })));
      it('should render tooltip text when given "tooltipText"', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16() {
        var nextButtonProps, _render16, driver, tooltipDriver;
        return _regeneratorRuntime.wrap(function _callee16$(_context16) {
          while (1) switch (_context16.prev = _context16.next) {
            case 0:
              nextButtonProps = {
                tooltipText: 'Siguiente'
              };
              _render16 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, props, {
                nextButtonProps: nextButtonProps,
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 212,
                  columnNumber: 11
                }
              }))), driver = _render16.driver;
              tooltipDriver = driver.nextTooltip;
              _context16.t0 = expect;
              _context16.next = 6;
              return tooltipDriver.getTooltipText();
            case 6:
              _context16.t1 = _context16.sent;
              (0, _context16.t0)(_context16.t1).toBe(nextButtonProps.tooltipText);
            case 8:
            case "end":
              return _context16.stop();
          }
        }, _callee16);
      })));
      it('should execute onClick function when given', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17() {
        var nextButtonProps, _render17, driver, childIndexDisplayed;
        return _regeneratorRuntime.wrap(function _callee17$(_context17) {
          while (1) switch (_context17.prev = _context17.next) {
            case 0:
              nextButtonProps = {
                onClick: vi.fn()
              };
              _render17 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, props, {
                nextButtonProps: nextButtonProps,
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 230,
                  columnNumber: 11
                }
              }))), driver = _render17.driver;
              _context17.next = 4;
              return driver.clickNextNavigationButton();
            case 4:
              _context17.next = 6;
              return driver.getCurrentChildIndex();
            case 6:
              childIndexDisplayed = _context17.sent;
              expect(nextButtonProps.onClick).toHaveBeenCalledWith(childIndexDisplayed);
            case 8:
            case "end":
              return _context17.stop();
          }
        }, _callee17);
      })));
    });
    describe('"prevButtonProps" prop', function () {
      it('should not render tooltip when prevButtonProps is undefined', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {
        var _render18, driver, tooltipDriver;
        return _regeneratorRuntime.wrap(function _callee18$(_context18) {
          while (1) switch (_context18.prev = _context18.next) {
            case 0:
              _render18 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, props, {
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 249,
                  columnNumber: 11
                }
              }))), driver = _render18.driver;
              _context18.next = 3;
              return driver.clickNextNavigationButton();
            case 3:
              tooltipDriver = driver.prevTooltip;
              _context18.t0 = expect;
              _context18.next = 7;
              return tooltipDriver.tooltipExists();
            case 7:
              _context18.t1 = _context18.sent;
              (0, _context18.t0)(_context18.t1).toBe(false);
            case 9:
            case "end":
              return _context18.stop();
          }
        }, _callee18);
      })));
      it('should render tooltip text when given "tooltipText"', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19() {
        var prevButtonProps, _render19, driver, tooltipDriver;
        return _regeneratorRuntime.wrap(function _callee19$(_context19) {
          while (1) switch (_context19.prev = _context19.next) {
            case 0:
              prevButtonProps = {
                tooltipText: 'Previo'
              };
              _render19 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, props, {
                prevButtonProps: prevButtonProps,
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 262,
                  columnNumber: 11
                }
              }))), driver = _render19.driver;
              _context19.next = 4;
              return driver.clickNextNavigationButton();
            case 4:
              tooltipDriver = driver.prevTooltip;
              _context19.t0 = expect;
              _context19.next = 8;
              return tooltipDriver.getTooltipText();
            case 8:
              _context19.t1 = _context19.sent;
              (0, _context19.t0)(_context19.t1).toBe(prevButtonProps.tooltipText);
            case 10:
            case "end":
              return _context19.stop();
          }
        }, _callee19);
      })));
      it('should execute onClick function when given', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20() {
        var prevButtonProps, _render20, driver, childIndexDisplayed;
        return _regeneratorRuntime.wrap(function _callee20$(_context20) {
          while (1) switch (_context20.prev = _context20.next) {
            case 0:
              prevButtonProps = {
                onClick: vi.fn()
              };
              _render20 = render(/*#__PURE__*/React.createElement(ModalPreviewLayout, _extends({}, requiredProps, props, {
                prevButtonProps: prevButtonProps,
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 282,
                  columnNumber: 11
                }
              }))), driver = _render20.driver;
              _context20.next = 4;
              return driver.clickNextNavigationButton();
            case 4:
              _context20.next = 6;
              return driver.clickPrevNavigationButton();
            case 6:
              _context20.next = 8;
              return driver.getCurrentChildIndex();
            case 8:
              childIndexDisplayed = _context20.sent;
              expect(prevButtonProps.onClick).toHaveBeenCalledWith(childIndexDisplayed);
            case 10:
            case "end":
              return _context20.stop();
          }
        }, _callee20);
      })));
    });
  });
});