"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
var _react = _interopRequireDefault(require("react"));
var _unit = require("../../utils/test-utils/unit");
var _SidePanel = _interopRequireDefault(require("../SidePanel"));
var _SidePanelPrivateUni = require("./SidePanel.private.uni.driver");
var _WixDesignSystemProvider = _interopRequireDefault(require("../../WixDesignSystemProvider"));
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/SidePanel/test/SidePanel.spec.jsx",
  _this = void 0;
describe('SidePanel', function () {
  var render = (0, _unit.createRendererWithUniDriver)(_SidePanelPrivateUni.sidePanelPrivateDriverFactory);
  afterEach(function () {
    (0, _unit.cleanup)();
  });
  it('should render', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
    var _render, driver;
    return _regenerator["default"].wrap(function _callee$(_context) {
      while (1) switch (_context.prev = _context.next) {
        case 0:
          _render = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
            __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 pass the class name', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
    var expectedClassName, _render2, driver;
    return _regenerator["default"].wrap(function _callee2$(_context2) {
      while (1) switch (_context2.prev = _context2.next) {
        case 0:
          expectedClassName = 'some-selector';
          _render2 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
            className: expectedClassName,
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 24,
              columnNumber: 31
            }
          })), driver = _render2.driver;
          _context2.t0 = expect;
          _context2.next = 5;
          return driver.hasClass(expectedClassName);
        case 5:
          _context2.t1 = _context2.sent;
          (0, _context2.t0)(_context2.t1).toBe(true);
        case 7:
        case "end":
          return _context2.stop();
      }
    }, _callee2);
  })));
  describe('SidePanel.Content', function () {
    it('should have content', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3() {
      var content, _render3, driver;
      return _regenerator["default"].wrap(function _callee3$(_context3) {
        while (1) switch (_context3.prev = _context3.next) {
          case 0:
            content = 'Any Content';
            _render3 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 32,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Content, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 33,
                columnNumber: 11
              }
            }, content))), driver = _render3.driver;
            _context3.t0 = expect;
            _context3.next = 5;
            return driver.content.exists();
          case 5:
            _context3.t1 = _context3.sent;
            (0, _context3.t0)(_context3.t1).toBe(true);
          case 7:
          case "end":
            return _context3.stop();
        }
      }, _callee3);
    })));
    it('should expose content', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
      var content, _render4, driver;
      return _regenerator["default"].wrap(function _callee4$(_context4) {
        while (1) switch (_context4.prev = _context4.next) {
          case 0:
            content = 'Any Content';
            _render4 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 43,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Content, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 44,
                columnNumber: 11
              }
            }, /*#__PURE__*/_react["default"].createElement("div", {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 45,
                columnNumber: 13
              }
            }, content)))), driver = _render4.driver;
            _context4.t0 = expect;
            _context4.next = 5;
            return driver.getContent();
          case 5:
            _context4.t1 = _context4.sent.textContent;
            (0, _context4.t0)(_context4.t1).toBe(content);
          case 7:
          case "end":
            return _context4.stop();
        }
      }, _callee4);
    })));
    it('should use scroll ref when passed', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
      var content, testRef;
      return _regenerator["default"].wrap(function _callee5$(_context5) {
        while (1) switch (_context5.prev = _context5.next) {
          case 0:
            content = 'Any Content';
            testRef = /*#__PURE__*/_react["default"].createRef();
            render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 58,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Content, {
              scrollElementRef: testRef,
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 59,
                columnNumber: 11
              }
            }, /*#__PURE__*/_react["default"].createElement("div", {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 60,
                columnNumber: 13
              }
            }, content))));
            expect(testRef.current.textContent).toEqual(content);
          case 4:
          case "end":
            return _context5.stop();
        }
      }, _callee5);
    })));
  });
  describe('SidePanel.Header', function () {
    it('should have header', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6() {
      var _render5, driver;
      return _regenerator["default"].wrap(function _callee6$(_context6) {
        while (1) switch (_context6.prev = _context6.next) {
          case 0:
            _render5 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 72,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 73,
                columnNumber: 11
              }
            }))), driver = _render5.driver;
            _context6.t0 = expect;
            _context6.next = 4;
            return driver.header.exists();
          case 4:
            _context6.t1 = _context6.sent;
            (0, _context6.t0)(_context6.t1).toBe(true);
          case 6:
          case "end":
            return _context6.stop();
        }
      }, _callee6);
    })));
    it('should have string title', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7() {
      var title, _render6, driver;
      return _regenerator["default"].wrap(function _callee7$(_context7) {
        while (1) switch (_context7.prev = _context7.next) {
          case 0:
            title = 'some text';
            _render6 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 83,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              title: title,
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 84,
                columnNumber: 11
              }
            }))), driver = _render6.driver;
            _context7.t0 = expect;
            _context7.next = 5;
            return driver.getTitleText();
          case 5:
            _context7.t1 = _context7.sent;
            (0, _context7.t0)(_context7.t1).toBe(title);
          case 7:
          case "end":
            return _context7.stop();
        }
      }, _callee7);
    })));
    it('should have string title with infoTooltipContent ', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8() {
      var infoTooltipContent, _render7, driver;
      return _regenerator["default"].wrap(function _callee8$(_context8) {
        while (1) switch (_context8.prev = _context8.next) {
          case 0:
            infoTooltipContent = 'infoTooltipContent';
            _render7 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 94,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              title: "title",
              infoTooltipContent: infoTooltipContent,
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 95,
                columnNumber: 11
              }
            }))), driver = _render7.driver;
            _context8.t0 = expect;
            _context8.next = 5;
            return driver.getTooltipContent();
          case 5:
            _context8.t1 = _context8.sent;
            (0, _context8.t0)(_context8.t1).toBe(infoTooltipContent);
          case 7:
          case "end":
            return _context8.stop();
        }
      }, _callee8);
    })));
    it('should have custom node title', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9() {
      var title, _render8, driver;
      return _regenerator["default"].wrap(function _callee9$(_context9) {
        while (1) switch (_context9.prev = _context9.next) {
          case 0:
            title = 'some text';
            _render8 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 107,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              title: /*#__PURE__*/_react["default"].createElement("div", {
                "data-hook": "custom-node",
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 109,
                  columnNumber: 20
                }
              }, title),
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 108,
                columnNumber: 11
              }
            }))), driver = _render8.driver;
            _context9.t0 = expect;
            _context9.next = 5;
            return driver.header.getCustomNodeText();
          case 5:
            _context9.t1 = _context9.sent;
            (0, _context9.t0)(_context9.t1).toBe(title);
          case 7:
          case "end":
            return _context9.stop();
        }
      }, _callee9);
    })));
    it('should have custom node prefix', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee0() {
      var prefix, _render9, driver;
      return _regenerator["default"].wrap(function _callee0$(_context0) {
        while (1) switch (_context0.prev = _context0.next) {
          case 0:
            prefix = /*#__PURE__*/_react["default"].createElement("div", {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 118,
                columnNumber: 22
              }
            }, "Custom Prefix");
            _render9 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 120,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              prefix: prefix,
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 121,
                columnNumber: 11
              }
            }))), driver = _render9.driver;
            _context0.t0 = expect;
            _context0.next = 5;
            return driver.getPrefix();
          case 5:
            _context0.t1 = _context0.sent.textContent;
            (0, _context0.t0)(_context0.t1).toBe('Custom Prefix');
          case 7:
          case "end":
            return _context0.stop();
        }
      }, _callee0);
    })));
    it('should have custom node suffix', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee1() {
      var suffix, _render0, driver;
      return _regenerator["default"].wrap(function _callee1$(_context1) {
        while (1) switch (_context1.prev = _context1.next) {
          case 0:
            suffix = /*#__PURE__*/_react["default"].createElement("div", {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 129,
                columnNumber: 22
              }
            }, "Custom Suffix");
            _render0 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 131,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              suffix: suffix,
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 132,
                columnNumber: 11
              }
            }))), driver = _render0.driver;
            _context1.t0 = expect;
            _context1.next = 5;
            return driver.getSuffix();
          case 5:
            _context1.t1 = _context1.sent.textContent;
            (0, _context1.t0)(_context1.t1).toBe('Custom Suffix');
          case 7:
          case "end":
            return _context1.stop();
        }
      }, _callee1);
    })));
    it('should have string subtitle', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10() {
      var subtitle, _render1, driver;
      return _regenerator["default"].wrap(function _callee10$(_context10) {
        while (1) switch (_context10.prev = _context10.next) {
          case 0:
            subtitle = 'some subtitle text';
            _render1 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 142,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              subtitle: subtitle,
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 143,
                columnNumber: 11
              }
            }))), driver = _render1.driver;
            _context10.t0 = expect;
            _context10.next = 5;
            return driver.getSubtitleText();
          case 5:
            _context10.t1 = _context10.sent;
            (0, _context10.t0)(_context10.t1).toBe(subtitle);
          case 7:
          case "end":
            return _context10.stop();
        }
      }, _callee10);
    })));
    it('should have custom node subtitle', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee11() {
      var subtitle, _render10, driver;
      return _regenerator["default"].wrap(function _callee11$(_context11) {
        while (1) switch (_context11.prev = _context11.next) {
          case 0:
            subtitle = 'some subtitle text';
            _render10 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 153,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              subtitle: /*#__PURE__*/_react["default"].createElement("div", {
                "data-hook": "custom-node",
                __self: _this,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 155,
                  columnNumber: 23
                }
              }, subtitle),
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 154,
                columnNumber: 11
              }
            }))), driver = _render10.driver;
            _context11.t0 = expect;
            _context11.next = 5;
            return driver.header.getCustomNodeText();
          case 5:
            _context11.t1 = _context11.sent;
            (0, _context11.t0)(_context11.t1).toBe(subtitle);
          case 7:
          case "end":
            return _context11.stop();
        }
      }, _callee11);
    })));
    it('should show divider by default', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee12() {
      var title, _render11, driver;
      return _regenerator["default"].wrap(function _callee12$(_context12) {
        while (1) switch (_context12.prev = _context12.next) {
          case 0:
            title = 'some text';
            _render11 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 166,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              title: title,
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 167,
                columnNumber: 11
              }
            }))), driver = _render11.driver;
            _context12.t0 = expect;
            _context12.next = 5;
            return driver.isHeaderDividerExists();
          case 5:
            _context12.t1 = _context12.sent;
            (0, _context12.t0)(_context12.t1).toBe(true);
          case 7:
          case "end":
            return _context12.stop();
        }
      }, _callee12);
    })));
    it('should show divider', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee13() {
      var title, _render12, driver;
      return _regenerator["default"].wrap(function _callee13$(_context13) {
        while (1) switch (_context13.prev = _context13.next) {
          case 0:
            title = 'some text';
            _render12 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 177,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              title: title,
              showDivider: true,
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 178,
                columnNumber: 11
              }
            }))), driver = _render12.driver;
            _context13.t0 = expect;
            _context13.next = 5;
            return driver.isHeaderDividerExists();
          case 5:
            _context13.t1 = _context13.sent;
            (0, _context13.t0)(_context13.t1).toBe(true);
          case 7:
          case "end":
            return _context13.stop();
        }
      }, _callee13);
    })));
    it('should not show divider', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee14() {
      var title, _render13, driver;
      return _regenerator["default"].wrap(function _callee14$(_context14) {
        while (1) switch (_context14.prev = _context14.next) {
          case 0:
            title = 'some text';
            _render13 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 188,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              title: title,
              showDivider: false,
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 189,
                columnNumber: 11
              }
            }))), driver = _render13.driver;
            _context14.t0 = expect;
            _context14.next = 5;
            return driver.isHeaderDividerExists();
          case 5:
            _context14.t1 = _context14.sent;
            (0, _context14.t0)(_context14.t1).toBe(false);
          case 7:
          case "end":
            return _context14.stop();
        }
      }, _callee14);
    })));
    it('should NOT render help button when `helpButtonProps.onClick` is undefined', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee15() {
      var _render14, driver;
      return _regenerator["default"].wrap(function _callee15$(_context15) {
        while (1) switch (_context15.prev = _context15.next) {
          case 0:
            _render14 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 198,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 199,
                columnNumber: 11
              }
            }))), driver = _render14.driver;
            _context15.t0 = expect;
            _context15.next = 4;
            return driver.isHelpButtonExists();
          case 4:
            _context15.t1 = _context15.sent;
            (0, _context15.t0)(_context15.t1).toBe(false);
          case 6:
          case "end":
            return _context15.stop();
        }
      }, _callee15);
    })));
    it('should render help button when `helpButtonProps.onClick` is provided', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee16() {
      var _render15, driver;
      return _regenerator["default"].wrap(function _callee16$(_context16) {
        while (1) switch (_context16.prev = _context16.next) {
          case 0:
            _render15 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              helpButtonProps: {
                onClick: function onClick() {}
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 207,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 208,
                columnNumber: 11
              }
            }))), driver = _render15.driver;
            _context16.t0 = expect;
            _context16.next = 4;
            return driver.isHelpButtonExists();
          case 4:
            _context16.t1 = _context16.sent;
            (0, _context16.t0)(_context16.t1).toBe(true);
          case 6:
          case "end":
            return _context16.stop();
        }
      }, _callee16);
    })));
    it('should fire callback when help button is clicked', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee17() {
      var onHelpButtonClickSpy, _render16, driver;
      return _regenerator["default"].wrap(function _callee17$(_context17) {
        while (1) switch (_context17.prev = _context17.next) {
          case 0:
            onHelpButtonClickSpy = vi.fn();
            _render16 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              helpButtonProps: {
                onClick: onHelpButtonClickSpy
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 217,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 218,
                columnNumber: 11
              }
            }))), driver = _render16.driver;
            _context17.next = 4;
            return driver.clickHelp();
          case 4:
            expect(onHelpButtonClickSpy).toHaveBeenCalledTimes(1);
          case 5:
          case "end":
            return _context17.stop();
        }
      }, _callee17);
    })));
    it('should fire callback when help button is mouse down', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee18() {
      var onMouseDown, _render17, driver;
      return _regenerator["default"].wrap(function _callee18$(_context18) {
        while (1) switch (_context18.prev = _context18.next) {
          case 0:
            onMouseDown = vi.fn();
            _render17 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              helpButtonProps: {
                onMouseDown: onMouseDown,
                onClick: function onClick() {}
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 228,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 229,
                columnNumber: 11
              }
            }))), driver = _render17.driver;
            _context18.next = 4;
            return driver.mouseDownHelp();
          case 4:
            expect(onMouseDown).toHaveBeenCalledTimes(1);
          case 5:
          case "end":
            return _context18.stop();
        }
      }, _callee18);
    })));
    it('should NOT have close button if `closeButtonProps.onClick` is undefined', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee19() {
      var _render18, driver;
      return _regenerator["default"].wrap(function _callee19$(_context19) {
        while (1) switch (_context19.prev = _context19.next) {
          case 0:
            _render18 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 240,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 241,
                columnNumber: 11
              }
            }))), driver = _render18.driver;
            _context19.t0 = expect;
            _context19.next = 4;
            return driver.isCloseButtonExists();
          case 4:
            _context19.t1 = _context19.sent;
            (0, _context19.t0)(_context19.t1).toBe(false);
          case 6:
          case "end":
            return _context19.stop();
        }
      }, _callee19);
    })));
    it('should have close button by default', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee20() {
      var _render19, driver;
      return _regenerator["default"].wrap(function _callee20$(_context20) {
        while (1) switch (_context20.prev = _context20.next) {
          case 0:
            _render19 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              closeButtonProps: {
                onClick: function onClick() {}
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 250,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 251,
                columnNumber: 11
              }
            }))), driver = _render19.driver;
            _context20.t0 = expect;
            _context20.next = 4;
            return driver.isCloseButtonExists();
          case 4:
            _context20.t1 = _context20.sent;
            (0, _context20.t0)(_context20.t1).toBe(true);
          case 6:
          case "end":
            return _context20.stop();
        }
      }, _callee20);
    })));
    it('should call `closeButtonProps.onClick` when close button clicked', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee21() {
      var onCloseButtonClick, _render20, driver;
      return _regenerator["default"].wrap(function _callee21$(_context21) {
        while (1) switch (_context21.prev = _context21.next) {
          case 0:
            onCloseButtonClick = vi.fn();
            _render20 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              closeButtonProps: {
                onClick: onCloseButtonClick
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 261,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 262,
                columnNumber: 11
              }
            }))), driver = _render20.driver;
            _context21.next = 4;
            return driver.clickClose();
          case 4:
            expect(onCloseButtonClick).toHaveBeenCalled();
          case 5:
          case "end":
            return _context21.stop();
        }
      }, _callee21);
    })));
    it('should call `closeButtonProps.onMouseDown` when close button mouse down', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee22() {
      var onMouseDown, _render21, driver;
      return _regenerator["default"].wrap(function _callee22$(_context22) {
        while (1) switch (_context22.prev = _context22.next) {
          case 0:
            onMouseDown = vi.fn();
            _render21 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              closeButtonProps: {
                onMouseDown: onMouseDown,
                onClick: function onClick() {}
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 274,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 275,
                columnNumber: 11
              }
            }))), driver = _render21.driver;
            _context22.next = 4;
            return driver.mouseDownClose();
          case 4:
            expect(onMouseDown).toHaveBeenCalled();
          case 5:
          case "end":
            return _context22.stop();
        }
      }, _callee22);
    })));
    it('should update `closeButtonProps.onClick` when rerendering', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee23() {
      var onCloseButtonClick, onCloseButtonClick2, _render22, driver, rerender;
      return _regenerator["default"].wrap(function _callee23$(_context23) {
        while (1) switch (_context23.prev = _context23.next) {
          case 0:
            onCloseButtonClick = vi.fn();
            onCloseButtonClick2 = vi.fn();
            _render22 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              closeButtonProps: {
                onClick: onCloseButtonClick
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 288,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 289,
                columnNumber: 11
              }
            }))), driver = _render22.driver, rerender = _render22.rerender;
            rerender(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              closeButtonProps: {
                onClick: onCloseButtonClick2
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 293,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 294,
                columnNumber: 11
              }
            })));
            _context23.next = 6;
            return driver.clickClose();
          case 6:
            expect(onCloseButtonClick).not.toHaveBeenCalled();
            expect(onCloseButtonClick2).toHaveBeenCalled();
          case 8:
          case "end":
            return _context23.stop();
        }
      }, _callee23);
    })));
    it('should have children', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee24() {
      var title, _render23, driver;
      return _regenerator["default"].wrap(function _callee24$(_context24) {
        while (1) switch (_context24.prev = _context24.next) {
          case 0:
            title = 'some text';
            _render23 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 307,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 308,
                columnNumber: 11
              }
            }, /*#__PURE__*/_react["default"].createElement("div", {
              "data-hook": "custom-node",
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 309,
                columnNumber: 13
              }
            }, title)))), driver = _render23.driver;
            _context24.t0 = expect;
            _context24.next = 5;
            return driver.header.getCustomNodeText();
          case 5:
            _context24.t1 = _context24.sent;
            (0, _context24.t0)(_context24.t1).toBe(title);
          case 7:
          case "end":
            return _context24.stop();
        }
      }, _callee24);
    })));
    it('should NOT have back button if `backButtonProps.onClick` is undefined', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee25() {
      var _render24, driver;
      return _regenerator["default"].wrap(function _callee25$(_context25) {
        while (1) switch (_context25.prev = _context25.next) {
          case 0:
            _render24 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 319,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 320,
                columnNumber: 11
              }
            }))), driver = _render24.driver;
            _context25.t0 = expect;
            _context25.next = 4;
            return driver.isBackButtonExists();
          case 4:
            _context25.t1 = _context25.sent;
            (0, _context25.t0)(_context25.t1).toBe(false);
          case 6:
          case "end":
            return _context25.stop();
        }
      }, _callee25);
    })));
    it('should call `backButtonProps.onClick` when back button clicked', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee26() {
      var onBackButtonClick, _render25, driver;
      return _regenerator["default"].wrap(function _callee26$(_context26) {
        while (1) switch (_context26.prev = _context26.next) {
          case 0:
            onBackButtonClick = vi.fn();
            _render25 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              backButtonProps: {
                onClick: onBackButtonClick
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 330,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 331,
                columnNumber: 11
              }
            }))), driver = _render25.driver;
            _context26.next = 4;
            return driver.clickBack();
          case 4:
            expect(onBackButtonClick).toHaveBeenCalled();
          case 5:
          case "end":
            return _context26.stop();
        }
      }, _callee26);
    })));
    it('should call `backButtonProps.onMouseDown` when back button mouse down', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee27() {
      var onMouseDown, _render26, driver;
      return _regenerator["default"].wrap(function _callee27$(_context27) {
        while (1) switch (_context27.prev = _context27.next) {
          case 0:
            onMouseDown = vi.fn();
            _render26 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              backButtonProps: {
                onMouseDown: onMouseDown,
                onClick: function onClick() {}
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 343,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 344,
                columnNumber: 11
              }
            }))), driver = _render26.driver;
            _context27.next = 4;
            return driver.mouseDownBack();
          case 4:
            expect(onMouseDown).toHaveBeenCalled();
          case 5:
          case "end":
            return _context27.stop();
        }
      }, _callee27);
    })));
    it('should update `backButtonProps.onClick` when rerendering', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee28() {
      var onBackButtonClick, onBackButtonClick2, _render27, driver, rerender;
      return _regenerator["default"].wrap(function _callee28$(_context28) {
        while (1) switch (_context28.prev = _context28.next) {
          case 0:
            onBackButtonClick = vi.fn();
            onBackButtonClick2 = vi.fn();
            _render27 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              backButtonProps: {
                onClick: onBackButtonClick
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 357,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 358,
                columnNumber: 11
              }
            }))), driver = _render27.driver, rerender = _render27.rerender;
            rerender(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              backButtonProps: {
                onClick: onBackButtonClick2
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 362,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 363,
                columnNumber: 11
              }
            })));
            _context28.next = 6;
            return driver.clickBack();
          case 6:
            expect(onBackButtonClick).not.toHaveBeenCalled();
            expect(onBackButtonClick2).toHaveBeenCalled();
          case 8:
          case "end":
            return _context28.stop();
        }
      }, _callee28);
    })));
    it('tooltip should NOT appear when `backButtonProps.description` is undefined', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee29() {
      var _render28, driver;
      return _regenerator["default"].wrap(function _callee29$(_context29) {
        while (1) switch (_context29.prev = _context29.next) {
          case 0:
            _render28 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              backButtonProps: {
                onClick: function onClick() {}
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 375,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 376,
                columnNumber: 11
              }
            }))), driver = _render28.driver;
            _context29.t0 = expect;
            _context29.next = 4;
            return driver.header.isBackButtonTooltipExists();
          case 4:
            _context29.t1 = _context29.sent;
            (0, _context29.t0)(_context29.t1).toBe(false);
          case 6:
          case "end":
            return _context29.stop();
        }
      }, _callee29);
    })));
    it('tooltip should appear when `backButtonProps.description` is defined', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee30() {
      var content, _render29, driver;
      return _regenerator["default"].wrap(function _callee30$(_context30) {
        while (1) switch (_context30.prev = _context30.next) {
          case 0:
            content = 'back';
            _render29 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              backButtonProps: {
                onClick: function onClick() {},
                description: content
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 386,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 389,
                columnNumber: 11
              }
            }))), driver = _render29.driver;
            _context30.t0 = expect;
            _context30.next = 5;
            return driver.getBackButtonTooltipContent();
          case 5:
            _context30.t1 = _context30.sent;
            (0, _context30.t0)(_context30.t1).toBe(content);
          case 7:
          case "end":
            return _context30.stop();
        }
      }, _callee30);
    })));
  });
  describe('SidePanel.Footer', function () {
    it('should have footer', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee31() {
      var content, _render30, driver;
      return _regenerator["default"].wrap(function _callee31$(_context31) {
        while (1) switch (_context31.prev = _context31.next) {
          case 0:
            content = 'Any Content';
            _render30 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 401,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Footer, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 402,
                columnNumber: 11
              }
            }, content))), driver = _render30.driver;
            _context31.t0 = expect;
            _context31.next = 5;
            return driver.footer.exists();
          case 5:
            _context31.t1 = _context31.sent;
            (0, _context31.t0)(_context31.t1).toBe(true);
          case 7:
          case "end":
            return _context31.stop();
        }
      }, _callee31);
    })));
    it('should show divider by default', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee32() {
      var _render31, driver;
      return _regenerator["default"].wrap(function _callee32$(_context32) {
        while (1) switch (_context32.prev = _context32.next) {
          case 0:
            _render31 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 411,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Footer, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 412,
                columnNumber: 11
              }
            }))), driver = _render31.driver;
            _context32.t0 = expect;
            _context32.next = 4;
            return driver.isFooterDividerExists();
          case 4:
            _context32.t1 = _context32.sent;
            (0, _context32.t0)(_context32.t1).toBe(true);
          case 6:
          case "end":
            return _context32.stop();
        }
      }, _callee32);
    })));
    it('should show divider', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee33() {
      var _render32, driver;
      return _regenerator["default"].wrap(function _callee33$(_context33) {
        while (1) switch (_context33.prev = _context33.next) {
          case 0:
            _render32 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 421,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Footer, {
              showDivider: true,
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 422,
                columnNumber: 11
              }
            }))), driver = _render32.driver;
            _context33.t0 = expect;
            _context33.next = 4;
            return driver.isFooterDividerExists();
          case 4:
            _context33.t1 = _context33.sent;
            (0, _context33.t0)(_context33.t1).toBe(true);
          case 6:
          case "end":
            return _context33.stop();
        }
      }, _callee33);
    })));
    it('should not show divider', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee34() {
      var _render33, driver;
      return _regenerator["default"].wrap(function _callee34$(_context34) {
        while (1) switch (_context34.prev = _context34.next) {
          case 0:
            _render33 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 431,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Footer, {
              showDivider: false,
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 432,
                columnNumber: 11
              }
            }))), driver = _render33.driver;
            _context34.t0 = expect;
            _context34.next = 4;
            return driver.isFooterDividerExists();
          case 4:
            _context34.t1 = _context34.sent;
            (0, _context34.t0)(_context34.t1).toBe(false);
          case 6:
          case "end":
            return _context34.stop();
        }
      }, _callee34);
    })));
  });
  describe('accessibility', function () {
    it('should set back button aria-label [when] `backButtonProps.ariaLabel` is provided', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee35() {
      var _render34, driver;
      return _regenerator["default"].wrap(function _callee35$(_context35) {
        while (1) switch (_context35.prev = _context35.next) {
          case 0:
            _render34 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              backButtonProps: {
                ariaLabel: 'Go back!',
                onClick: function onClick() {}
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 443,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 446,
                columnNumber: 11
              }
            }))), driver = _render34.driver;
            _context35.t0 = expect;
            _context35.next = 4;
            return driver.getBackButtonAriaLabel();
          case 4:
            _context35.t1 = _context35.sent;
            (0, _context35.t0)(_context35.t1).toBe('Go back!');
          case 6:
          case "end":
            return _context35.stop();
        }
      }, _callee35);
    })));
    it('should set help button aria-label [when] `helpButtonProps.ariaLabel` is provided', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee36() {
      var _render35, driver;
      return _regenerator["default"].wrap(function _callee36$(_context36) {
        while (1) switch (_context36.prev = _context36.next) {
          case 0:
            _render35 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              helpButtonProps: {
                ariaLabel: 'Help me!',
                onClick: function onClick() {}
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 454,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 457,
                columnNumber: 11
              }
            }))), driver = _render35.driver;
            _context36.t0 = expect;
            _context36.next = 4;
            return driver.getHelpButtonAriaLabel();
          case 4:
            _context36.t1 = _context36.sent;
            (0, _context36.t0)(_context36.t1).toBe('Help me!');
          case 6:
          case "end":
            return _context36.stop();
        }
      }, _callee36);
    })));
    it('should set close button aria-label [when] `closeButtonProps.ariaLabel` is provided', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee37() {
      var _render36, driver;
      return _regenerator["default"].wrap(function _callee37$(_context37) {
        while (1) switch (_context37.prev = _context37.next) {
          case 0:
            _render36 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              closeButtonProps: {
                ariaLabel: 'Close me!',
                onClick: function onClick() {}
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 465,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 468,
                columnNumber: 11
              }
            }))), driver = _render36.driver;
            _context37.t0 = expect;
            _context37.next = 4;
            return driver.getCloseButtonAriaLabel();
          case 4:
            _context37.t1 = _context37.sent;
            (0, _context37.t0)(_context37.t1).toBe('Close me!');
          case 6:
          case "end":
            return _context37.stop();
        }
      }, _callee37);
    })));
  });
  describe('deprecated props', function () {
    it('should override `onBackButtonClick` [when] `backButtonProps.onClick` is provided', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee38() {
      var onBackButtonClick, onBackButtonClickOverride, _render37, driver;
      return _regenerator["default"].wrap(function _callee38$(_context38) {
        while (1) switch (_context38.prev = _context38.next) {
          case 0:
            onBackButtonClick = vi.fn();
            onBackButtonClickOverride = vi.fn();
            _render37 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              onBackButtonClick: onBackButtonClick,
              backButtonProps: {
                onClick: onBackButtonClickOverride
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 480,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 484,
                columnNumber: 11
              }
            }))), driver = _render37.driver;
            _context38.next = 5;
            return driver.clickBack();
          case 5:
            expect(onBackButtonClickOverride).toHaveBeenCalled();
            expect(onBackButtonClick).not.toHaveBeenCalled();
          case 7:
          case "end":
            return _context38.stop();
        }
      }, _callee38);
    })));
    it('should override `backButtonDescription` [when] `backButtonProps.description` is provided', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee39() {
      var backButtonDescription, backButtonDescriptionOverride, _render38, driver;
      return _regenerator["default"].wrap(function _callee39$(_context39) {
        while (1) switch (_context39.prev = _context39.next) {
          case 0:
            backButtonDescription = 'Back';
            backButtonDescriptionOverride = 'Back Override';
            _render38 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              backButtonDescription: backButtonDescription,
              backButtonProps: {
                onClick: function onClick() {},
                description: backButtonDescriptionOverride
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 498,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 505,
                columnNumber: 11
              }
            }))), driver = _render38.driver;
            _context39.t0 = expect;
            _context39.next = 6;
            return driver.getBackButtonTooltipContent();
          case 6:
            _context39.t1 = _context39.sent;
            (0, _context39.t0)(_context39.t1).toBe(backButtonDescriptionOverride);
          case 8:
          case "end":
            return _context39.stop();
        }
      }, _callee39);
    })));
    it('should override `onHelpButtonClick` [when] `helpButtonProps.onClick` is provided', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee40() {
      var onHelpButtonClick, onHelpButtonClickOverride, _render39, driver;
      return _regenerator["default"].wrap(function _callee40$(_context40) {
        while (1) switch (_context40.prev = _context40.next) {
          case 0:
            onHelpButtonClick = vi.fn();
            onHelpButtonClickOverride = vi.fn();
            _render39 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              onHelpButtonClick: onHelpButtonClick,
              helpButtonProps: {
                onClick: onHelpButtonClickOverride
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 518,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 522,
                columnNumber: 11
              }
            }))), driver = _render39.driver;
            _context40.next = 5;
            return driver.clickHelp();
          case 5:
            expect(onHelpButtonClickOverride).toHaveBeenCalled();
            expect(onHelpButtonClick).not.toHaveBeenCalled();
          case 7:
          case "end":
            return _context40.stop();
        }
      }, _callee40);
    })));
    it('should override `onCloseButtonClick` [when] `closeButtonProps.onClick` is provided', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee41() {
      var onCloseButtonClick, onCloseButtonClickOverride, _render40, driver;
      return _regenerator["default"].wrap(function _callee41$(_context41) {
        while (1) switch (_context41.prev = _context41.next) {
          case 0:
            onCloseButtonClick = vi.fn();
            onCloseButtonClickOverride = vi.fn();
            _render40 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              onCloseButtonClick: onCloseButtonClick,
              closeButtonProps: {
                onClick: onCloseButtonClickOverride
              },
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 536,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Header, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 540,
                columnNumber: 11
              }
            }))), driver = _render40.driver;
            _context41.next = 5;
            return driver.clickClose();
          case 5:
            expect(onCloseButtonClickOverride).toHaveBeenCalled();
            expect(onCloseButtonClick).not.toHaveBeenCalled();
          case 7:
          case "end":
            return _context41.stop();
        }
      }, _callee41);
    })));
  });
  describe('contextClassName', function () {
    it('should set class on root element [when] contextClassName is provided via WixDesignSystemProvider', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee42() {
      var contextClassName, sidePanelElement;
      return _regenerator["default"].wrap(function _callee42$(_context42) {
        while (1) switch (_context42.prev = _context42.next) {
          case 0:
            contextClassName = 'custom-context-class';
            render(/*#__PURE__*/_react["default"].createElement(_WixDesignSystemProvider["default"], {
              contextClassName: contextClassName,
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 556,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              dataHook: "side-panel",
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 557,
                columnNumber: 11
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Content, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 558,
                columnNumber: 13
              }
            }, "Content"))));
            sidePanelElement = document.querySelector('[data-hook="side-panel"]');
            expect(sidePanelElement).not.toBeNull();
            expect(sidePanelElement.classList.contains(contextClassName)).toBe(true);
          case 5:
          case "end":
            return _context42.stop();
        }
      }, _callee42);
    })));
    it('should not set class on root element [when] contextClassName is empty', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee43() {
      var sidePanelElement;
      return _regenerator["default"].wrap(function _callee43$(_context43) {
        while (1) switch (_context43.prev = _context43.next) {
          case 0:
            render(/*#__PURE__*/_react["default"].createElement(_WixDesignSystemProvider["default"], {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 572,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              dataHook: "side-panel",
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 573,
                columnNumber: 11
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Content, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 574,
                columnNumber: 13
              }
            }, "Content"))));
            sidePanelElement = document.querySelector('[data-hook="side-panel"]');
            expect(sidePanelElement).not.toBeNull();
            expect(sidePanelElement.classList.contains('custom-context-class')).toBeFalsy();
          case 4:
          case "end":
            return _context43.stop();
        }
      }, _callee43);
    })));
    it('should not have contextClassName class [when] no WixDesignSystemProvider is used', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee44() {
      var _render41, driver, rootElement;
      return _regenerator["default"].wrap(function _callee44$(_context44) {
        while (1) switch (_context44.prev = _context44.next) {
          case 0:
            _render41 = render(/*#__PURE__*/_react["default"].createElement(_SidePanel["default"], {
              dataHook: "side-panel",
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 590,
                columnNumber: 9
              }
            }, /*#__PURE__*/_react["default"].createElement(_SidePanel["default"].Content, {
              __self: _this,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 591,
                columnNumber: 11
              }
            }, "Content"))), driver = _render41.driver;
            _context44.t0 = expect;
            _context44.next = 4;
            return driver.exists();
          case 4:
            _context44.t1 = _context44.sent;
            (0, _context44.t0)(_context44.t1).toBe(true);
            _context44.next = 8;
            return driver.element();
          case 8:
            rootElement = _context44.sent;
            expect(rootElement.classList.contains('custom-context-class')).toBeFalsy();
          case 10:
          case "end":
            return _context44.stop();
        }
      }, _callee44);
    })));
  });
});