"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
var _react = _interopRequireDefault(require("react"));
var _index = require("../../utils/test-utils/react/index");
var _TableActionCell = _interopRequireDefault(require("../TableActionCell"));
var _TableActionCellPrivateUni = require("./TableActionCell.private.uni.driver");
var _wixUiIconsCommon = require("@wix/wix-ui-icons-common");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/TableActionCell/test/TableActionCell.spec.jsx",
  _this = void 0;
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
var primaryActionProps = function primaryActionProps() {
  var actionTrigger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
    _ref$disabled = _ref.disabled,
    disabled = _ref$disabled === void 0 ? false : _ref$disabled,
    prefixIcon = _ref.prefixIcon,
    suffixIcon = _ref.suffixIcon,
    as = _ref.as,
    visibility = _ref.visibility,
    disabledDescription = _ref.disabledDescription,
    dataHook = _ref.dataHook,
    tooltipProps = _ref.tooltipProps;
  return {
    primaryAction: {
      text: 'primary action',
      skin: 'standard',
      onClick: actionTrigger,
      disabled: disabled,
      prefixIcon: prefixIcon,
      suffixIcon: suffixIcon,
      as: as,
      dataHook: dataHook,
      disabledDescription: disabledDescription,
      tooltipProps: tooltipProps,
      visibility: visibility
    }
  };
};
var secondaryActionsProps = function secondaryActionsProps() {
  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
    actionTriggers = _ref2.actionTriggers,
    actionDataHooks = _ref2.actionDataHooks,
    _ref2$numOfSecondaryA = _ref2.numOfSecondaryActions,
    numOfSecondaryActions = _ref2$numOfSecondaryA === void 0 ? 4 : _ref2$numOfSecondaryA,
    _ref2$numOfVisibleSec = _ref2.numOfVisibleSecondaryActions,
    numOfVisibleSecondaryActions = _ref2$numOfVisibleSec === void 0 ? 2 : _ref2$numOfVisibleSec;
  var createAction = function createAction(n) {
    return {
      text: "Action ".concat(n),
      dataHook: actionDataHooks && actionDataHooks[n],
      icon: /*#__PURE__*/_react["default"].createElement("span", {
        __self: _this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 48,
          columnNumber: 11
        }
      }, "Icon ".concat(n)),
      // simulate the icon as <span> elements
      onClick: actionTriggers && actionTriggers[n] || function () {}
    };
  };
  return {
    secondaryActions: Array(numOfSecondaryActions).fill(undefined).map(function (val, idx) {
      return createAction(idx);
    }),
    numOfVisibleSecondaryActions: numOfVisibleSecondaryActions
  };
};
describe('Table Action Cell', function () {
  describe('[async]', function () {
    runTests((0, _index.createRendererWithUniDriver)(_TableActionCellPrivateUni.tableActionCellPrivateUniDriverFactory));
  });
  function runTests(render) {
    var _this2 = this;
    afterEach(_index.cleanup);
    it('should have primary action visibility set to "onHover" by default', /*#__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(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 71,
                columnNumber: 33
              }
            }))), driver = _render.driver;
            _context.t0 = expect;
            _context.next = 4;
            return driver.getPrimaryActionButtonVisibility();
          case 4:
            _context.t1 = _context.sent;
            (0, _context.t0)(_context.t1).toBe('onHover');
          case 6:
          case "end":
            return _context.stop();
        }
      }, _callee);
    })));
    it('should allow setting primary action visibility to "always"', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
      var _render2, driver;
      return _regenerator["default"].wrap(function _callee2$(_context2) {
        while (1) switch (_context2.prev = _context2.next) {
          case 0:
            _render2 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(function () {}, {
              visibility: 'always'
            }), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 77,
                columnNumber: 9
              }
            }))), driver = _render2.driver;
            _context2.t0 = expect;
            _context2.next = 4;
            return driver.getPrimaryActionButtonVisibility();
          case 4:
            _context2.t1 = _context2.sent;
            (0, _context2.t0)(_context2.t1).toBe('always');
          case 6:
          case "end":
            return _context2.stop();
        }
      }, _callee2);
    })));
    it("should have a placeholder when there's only a primary action", /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3() {
      var _render3, driver;
      return _regenerator["default"].wrap(function _callee3$(_context3) {
        while (1) switch (_context3.prev = _context3.next) {
          case 0:
            _render3 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 86,
                columnNumber: 33
              }
            }))), driver = _render3.driver;
            _context3.t0 = expect;
            _context3.next = 4;
            return driver.primaryActionPlaceholderExists();
          case 4:
            _context3.t1 = _context3.sent;
            (0, _context3.t0)(_context3.t1).toBe(true);
          case 6:
          case "end":
            return _context3.stop();
        }
      }, _callee3);
    })));
    it('should render without errors when html element is passed', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
      var _render4, driver;
      return _regenerator["default"].wrap(function _callee4$(_context4) {
        while (1) switch (_context4.prev = _context4.next) {
          case 0:
            _render4 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(function () {}, {
              as: 'a'
            }), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 92,
                columnNumber: 9
              }
            }))), driver = _render4.driver;
            _context4.t0 = expect;
            _context4.next = 4;
            return driver.exists();
          case 4:
            _context4.t1 = _context4.sent;
            (0, _context4.t0)(_context4.t1).toBe(true);
          case 6:
          case "end":
            return _context4.stop();
        }
      }, _callee4);
    })));
    it('should render without errors when function reference is passed', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
      var Link, _render5, driver;
      return _regenerator["default"].wrap(function _callee5$(_context5) {
        while (1) switch (_context5.prev = _context5.next) {
          case 0:
            Link = function Link(_ref8) {
              var children = _ref8.children;
              return /*#__PURE__*/_react["default"].createElement("a", {
                __self: _this2,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 98,
                  columnNumber: 38
                }
              }, children);
            };
            _render5 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(function () {}, {
              as: Link
            }), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 100,
                columnNumber: 9
              }
            }))), driver = _render5.driver;
            _context5.t0 = expect;
            _context5.next = 5;
            return driver.exists();
          case 5:
            _context5.t1 = _context5.sent;
            (0, _context5.t0)(_context5.t1).toBe(true);
          case 7:
          case "end":
            return _context5.stop();
        }
      }, _callee5);
    })));
    it('should render without errors when class is passed', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6() {
      var LinkClass, _render6, driver;
      return _regenerator["default"].wrap(function _callee6$(_context6) {
        while (1) switch (_context6.prev = _context6.next) {
          case 0:
            LinkClass = /*#__PURE__*/function (_React$Component) {
              function LinkClass() {
                (0, _classCallCheck2["default"])(this, LinkClass);
                return _callSuper(this, LinkClass, arguments);
              }
              (0, _inherits2["default"])(LinkClass, _React$Component);
              return (0, _createClass2["default"])(LinkClass, [{
                key: "render",
                value: function render() {
                  return /*#__PURE__*/_react["default"].createElement("a", {
                    __self: this,
                    __source: {
                      fileName: _jsxFileName,
                      lineNumber: 108,
                      columnNumber: 18
                    }
                  }, this.props.children);
                }
              }]);
            }(_react["default"].Component);
            _render6 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(function () {}, {
              as: LinkClass
            }), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 113,
                columnNumber: 9
              }
            }))), driver = _render6.driver;
            _context6.t0 = expect;
            _context6.next = 5;
            return driver.exists();
          case 5:
            _context6.t1 = _context6.sent;
            (0, _context6.t0)(_context6.t1).toBe(true);
          case 7:
          case "end":
            return _context6.stop();
        }
      }, _callee6);
    })));
    it("should have a placeholder when there's only a primary action without secondaryActions and numOfVisibleSecondaryActions > 0", /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7() {
      var _render7, driver;
      return _regenerator["default"].wrap(function _callee7$(_context7) {
        while (1) switch (_context7.prev = _context7.next) {
          case 0:
            _render7 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), secondaryActionsProps({
              numOfSecondaryActions: 0,
              numOfVisibleSecondaryActions: 2
            }), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 122,
                columnNumber: 9
              }
            }))), driver = _render7.driver;
            _context7.t0 = expect;
            _context7.next = 4;
            return driver.primaryActionPlaceholderExists();
          case 4:
            _context7.t1 = _context7.sent;
            (0, _context7.t0)(_context7.t1).toBe(true);
          case 6:
          case "end":
            return _context7.stop();
        }
      }, _callee7);
    })));
    it("should have a placeholder when there's a primary action and only visible secondary actions", /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8() {
      var _render8, driver;
      return _regenerator["default"].wrap(function _callee8$(_context8) {
        while (1) switch (_context8.prev = _context8.next) {
          case 0:
            _render8 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), secondaryActionsProps({
              numOfSecondaryActions: 2,
              numOfVisibleSecondaryActions: 2
            }), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 135,
                columnNumber: 9
              }
            }))), driver = _render8.driver;
            _context8.t0 = expect;
            _context8.next = 4;
            return driver.primaryActionPlaceholderExists();
          case 4:
            _context8.t1 = _context8.sent;
            (0, _context8.t0)(_context8.t1).toBe(true);
          case 6:
          case "end":
            return _context8.stop();
        }
      }, _callee8);
    })));
    it('should display the primary action button', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9() {
      var onPrimaryActionTrigger, _render9, driver;
      return _regenerator["default"].wrap(function _callee9$(_context9) {
        while (1) switch (_context9.prev = _context9.next) {
          case 0:
            onPrimaryActionTrigger = vi.fn();
            _render9 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(onPrimaryActionTrigger), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 150,
                columnNumber: 9
              }
            }))), driver = _render9.driver;
            _context9.t0 = expect;
            _context9.next = 5;
            return driver.getPrimaryActionButtonDriver().exists();
          case 5:
            _context9.t1 = _context9.sent;
            (0, _context9.t0)(_context9.t1).toBe(true);
            _context9.t2 = expect;
            _context9.next = 10;
            return driver.getPrimaryActionButtonDriver().getButtonTextContent();
          case 10:
            _context9.t3 = _context9.sent;
            (0, _context9.t2)(_context9.t3).toEqual('primary action');
          case 12:
          case "end":
            return _context9.stop();
        }
      }, _callee9);
    })));
    it('should trigger the primary action on primary button click', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee0() {
      var onPrimaryActionTrigger, _render0, driver;
      return _regenerator["default"].wrap(function _callee0$(_context0) {
        while (1) switch (_context0.prev = _context0.next) {
          case 0:
            onPrimaryActionTrigger = vi.fn();
            _render0 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(onPrimaryActionTrigger), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 163,
                columnNumber: 9
              }
            }))), driver = _render0.driver;
            _context0.next = 4;
            return driver.clickPrimaryActionButton();
          case 4:
            expect(onPrimaryActionTrigger).toHaveBeenCalledTimes(1);
          case 5:
          case "end":
            return _context0.stop();
        }
      }, _callee0);
    })));
    it('should not have a primary action placeholder when there are also secondary actions', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee1() {
      var _render1, driver;
      return _regenerator["default"].wrap(function _callee1$(_context1) {
        while (1) switch (_context1.prev = _context1.next) {
          case 0:
            _render1 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), secondaryActionsProps(), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 172,
                columnNumber: 9
              }
            }))), driver = _render1.driver;
            _context1.t0 = expect;
            _context1.next = 4;
            return driver.primaryActionPlaceholderExists();
          case 4:
            _context1.t1 = _context1.sent;
            (0, _context1.t0)(_context1.t1).toBe(false);
          case 6:
          case "end":
            return _context1.stop();
        }
      }, _callee1);
    })));
    it('should put visible secondary actions in the cell', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee10() {
      var _render10, driver, tooltipDriver1, tooltipDriver2;
      return _regenerator["default"].wrap(function _callee10$(_context10) {
        while (1) switch (_context10.prev = _context10.next) {
          case 0:
            _render10 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), secondaryActionsProps({
              actionDataHooks: [undefined, 'data-hook-for-1']
            }), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 183,
                columnNumber: 9
              }
            }))), driver = _render10.driver;
            _context10.t0 = expect;
            _context10.next = 4;
            return driver.getVisibleActionsCount();
          case 4:
            _context10.t1 = _context10.sent;
            (0, _context10.t0)(_context10.t1).toEqual(2);
            _context10.t2 = expect;
            _context10.next = 9;
            return driver.getVisibleActionButtonDriver(0).getButtonTextContent();
          case 9:
            _context10.t3 = _context10.sent;
            (0, _context10.t2)(_context10.t3).toEqual('Icon 0');
            _context10.t4 = expect;
            _context10.next = 14;
            return driver.getVisibleActionByDataHookButtonDriver('data-hook-for-1').getButtonTextContent();
          case 14:
            _context10.t5 = _context10.sent;
            (0, _context10.t4)(_context10.t5).toEqual('Icon 1');
            _context10.next = 18;
            return driver.getVisibleActionTooltipDriver(0);
          case 18:
            tooltipDriver1 = _context10.sent;
            _context10.next = 21;
            return tooltipDriver1.mouseEnter();
          case 21:
            _context10.t6 = expect;
            _context10.next = 24;
            return tooltipDriver1.getTooltipText();
          case 24:
            _context10.t7 = _context10.sent;
            (0, _context10.t6)(_context10.t7).toEqual('Action 0');
            _context10.next = 28;
            return driver.getVisibleActionByDataHookTooltipDriver('data-hook-for-1');
          case 28:
            tooltipDriver2 = _context10.sent;
            _context10.next = 31;
            return tooltipDriver2.mouseEnter();
          case 31:
            _context10.t8 = expect;
            _context10.next = 34;
            return tooltipDriver2.getTooltipText();
          case 34:
            _context10.t9 = _context10.sent;
            (0, _context10.t8)(_context10.t9).toEqual('Action 1');
          case 36:
          case "end":
            return _context10.stop();
        }
      }, _callee10);
    })));
    it('should put hidden secondary action in a PopoverMenu', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee12() {
      var _render11, driver;
      return _regenerator["default"].wrap(function _callee12$(_context12) {
        while (1) switch (_context12.prev = _context12.next) {
          case 0:
            _render11 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), secondaryActionsProps(), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 215,
                columnNumber: 9
              }
            }))), driver = _render11.driver;
            _context12.t0 = expect;
            _context12.next = 4;
            return driver.getHiddenActionsPopoverMenuDriver().exists();
          case 4:
            _context12.t1 = _context12.sent;
            (0, _context12.t0)(_context12.t1).toEqual(true);
            _context12.next = 8;
            return driver.clickPopoverMenu();
          case 8:
            _context12.next = 10;
            return (0, _index.waitFor)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee11() {
              return _regenerator["default"].wrap(function _callee11$(_context11) {
                while (1) switch (_context11.prev = _context11.next) {
                  case 0:
                    _context11.t0 = expect;
                    _context11.next = 3;
                    return driver.getHiddenActionsCount();
                  case 3:
                    _context11.t1 = _context11.sent;
                    return _context11.abrupt("return", (0, _context11.t0)(_context11.t1).toEqual(2));
                  case 5:
                  case "end":
                    return _context11.stop();
                }
              }, _callee11);
            })));
          case 10:
          case "end":
            return _context12.stop();
        }
      }, _callee12);
    })));
    it.skip('should trigger secondary action on click', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee15() {
      var actionTriggers, _render12, driver;
      return _regenerator["default"].wrap(function _callee15$(_context15) {
        while (1) switch (_context15.prev = _context15.next) {
          case 0:
            actionTriggers = Array(4).fill(undefined).map(function () {
              return vi.fn();
            });
            _render12 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), secondaryActionsProps({
              actionTriggers: actionTriggers,
              actionDataHooks: [undefined, 'data-hook-for-1', undefined, 'data-hook-for-3']
            }), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 237,
                columnNumber: 9
              }
            }))), driver = _render12.driver;
            _context15.next = 4;
            return driver.clickVisibleAction(0);
          case 4:
            _context15.next = 6;
            return driver.clickVisibleActionByDataHook('data-hook-for-1');
          case 6:
            _context15.next = 8;
            return driver.clickPopoverMenu();
          case 8:
            _context15.next = 10;
            return (0, _index.waitFor)(function () {
              return driver.clickHiddenAction(0);
            });
          case 10:
            _context15.next = 12;
            return driver.clickPopoverMenu();
          case 12:
            _context15.next = 14;
            return (0, _index.waitFor)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee13() {
              return _regenerator["default"].wrap(function _callee13$(_context13) {
                while (1) switch (_context13.prev = _context13.next) {
                  case 0:
                    _context13.next = 2;
                    return driver.clickHiddenActionByDataHook('data-hook-for-3');
                  case 2:
                    return _context13.abrupt("return", _context13.sent);
                  case 3:
                  case "end":
                    return _context13.stop();
                }
              }, _callee13);
            })));
          case 14:
            _context15.next = 16;
            return (0, _index.waitFor)(function () {
              return actionTriggers.forEach(/*#__PURE__*/function () {
                var _ref18 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee14(actionTrigger) {
                  return _regenerator["default"].wrap(function _callee14$(_context14) {
                    while (1) switch (_context14.prev = _context14.next) {
                      case 0:
                        _context14.next = 2;
                        return expect(actionTrigger).toHaveBeenCalledTimes(1);
                      case 2:
                      case "end":
                        return _context14.stop();
                    }
                  }, _callee14);
                }));
                return function (_x) {
                  return _ref18.apply(this, arguments);
                };
              }());
            });
          case 16:
          case "end":
            return _context15.stop();
        }
      }, _callee15);
    })));
    it('should render disabled hidden actions', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee17() {
      var actionTrigger, disabledAction, _render13, driver;
      return _regenerator["default"].wrap(function _callee17$(_context17) {
        while (1) switch (_context17.prev = _context17.next) {
          case 0:
            actionTrigger = vi.fn();
            disabledAction = {
              text: "Disabled Action",
              icon: /*#__PURE__*/_react["default"].createElement("span", {
                __self: _this2,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 273,
                  columnNumber: 15
                }
              }, "Icon"),
              onClick: actionTrigger,
              disabled: true
            };
            _render13 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), {
              secondaryActions: [disabledAction],
              numOfVisibleSecondaryActions: 0,
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 278,
                columnNumber: 9
              }
            }))), driver = _render13.driver;
            _context17.next = 5;
            return driver.clickPopoverMenu();
          case 5:
            _context17.next = 7;
            return (0, _index.waitFor)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee16() {
              return _regenerator["default"].wrap(function _callee16$(_context16) {
                while (1) switch (_context16.prev = _context16.next) {
                  case 0:
                    _context16.next = 2;
                    return driver.clickHiddenAction(0);
                  case 2:
                    return _context16.abrupt("return", _context16.sent);
                  case 3:
                  case "end":
                    return _context16.stop();
                }
              }, _callee16);
            })));
          case 7:
            expect(actionTrigger).not.toHaveBeenCalled();
          case 8:
          case "end":
            return _context17.stop();
        }
      }, _callee17);
    })));
    it('should allow to change the number of visible secondary actions', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee19() {
      var _render14, driver;
      return _regenerator["default"].wrap(function _callee19$(_context19) {
        while (1) switch (_context19.prev = _context19.next) {
          case 0:
            _render14 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), secondaryActionsProps(), {
              numOfVisibleSecondaryActions: 3,
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 294,
                columnNumber: 9
              }
            }))), driver = _render14.driver;
            _context19.t0 = expect;
            _context19.next = 4;
            return driver.getVisibleActionsCount();
          case 4:
            _context19.t1 = _context19.sent;
            (0, _context19.t0)(_context19.t1).toEqual(3);
            _context19.next = 8;
            return driver.clickPopoverMenu();
          case 8:
            _context19.next = 10;
            return (0, _index.waitFor)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee18() {
              return _regenerator["default"].wrap(function _callee18$(_context18) {
                while (1) switch (_context18.prev = _context18.next) {
                  case 0:
                    _context18.t0 = expect;
                    _context18.next = 3;
                    return driver.getHiddenActionsCount();
                  case 3:
                    _context18.t1 = _context18.sent;
                    return _context18.abrupt("return", (0, _context18.t0)(_context18.t1).toEqual(1));
                  case 5:
                  case "end":
                    return _context18.stop();
                }
              }, _callee18);
            })));
          case 10:
          case "end":
            return _context19.stop();
        }
      }, _callee19);
    })));
    it('should allow to have no visible secondary actions', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee21() {
      var _render15, driver;
      return _regenerator["default"].wrap(function _callee21$(_context21) {
        while (1) switch (_context21.prev = _context21.next) {
          case 0:
            _render15 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), secondaryActionsProps(), {
              numOfVisibleSecondaryActions: 0,
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 311,
                columnNumber: 9
              }
            }))), driver = _render15.driver;
            _context21.t0 = expect;
            _context21.next = 4;
            return driver.getVisibleActionsCount();
          case 4:
            _context21.t1 = _context21.sent;
            (0, _context21.t0)(_context21.t1).toEqual(0);
            _context21.next = 8;
            return driver.clickPopoverMenu();
          case 8:
            _context21.next = 10;
            return (0, _index.waitFor)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee20() {
              return _regenerator["default"].wrap(function _callee20$(_context20) {
                while (1) switch (_context20.prev = _context20.next) {
                  case 0:
                    _context20.t0 = expect;
                    _context20.next = 3;
                    return driver.getHiddenActionsCount();
                  case 3:
                    _context20.t1 = _context20.sent;
                    return _context20.abrupt("return", (0, _context20.t0)(_context20.t1).toEqual(4));
                  case 5:
                  case "end":
                    return _context20.stop();
                }
              }, _callee20);
            })));
          case 10:
          case "end":
            return _context21.stop();
        }
      }, _callee21);
    })));
    it('should mark the primary action as disabled', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee22() {
      var _render16, driver;
      return _regenerator["default"].wrap(function _callee22$(_context22) {
        while (1) switch (_context22.prev = _context22.next) {
          case 0:
            _render16 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(function () {}, {
              disabled: true
            }), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 328,
                columnNumber: 9
              }
            }))), driver = _render16.driver;
            _context22.t0 = expect;
            _context22.next = 4;
            return driver.getIsPrimaryActionButtonDisabled();
          case 4:
            _context22.t1 = _context22.sent;
            (0, _context22.t0)(_context22.t1).toBe(true);
          case 6:
          case "end":
            return _context22.stop();
        }
      }, _callee22);
    })));
    it('should not add prefix icon to primary action', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee23() {
      var _render17, driver;
      return _regenerator["default"].wrap(function _callee23$(_context23) {
        while (1) switch (_context23.prev = _context23.next) {
          case 0:
            _render17 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(function () {}), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 338,
                columnNumber: 9
              }
            }))), driver = _render17.driver;
            _context23.t0 = expect;
            _context23.next = 4;
            return driver.primaryActionButtonPrefixIconExists();
          case 4:
            _context23.t1 = _context23.sent;
            (0, _context23.t0)(_context23.t1).toBe(false);
          case 6:
          case "end":
            return _context23.stop();
        }
      }, _callee23);
    })));
    it('should add prefix icon to primary action', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee24() {
      var _render18, driver;
      return _regenerator["default"].wrap(function _callee24$(_context24) {
        while (1) switch (_context24.prev = _context24.next) {
          case 0:
            _render18 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(function () {}, {
              prefixIcon: /*#__PURE__*/_react["default"].createElement(_wixUiIconsCommon.Edit, {
                __self: _this2,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 347,
                  columnNumber: 58
                }
              })
            }), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 346,
                columnNumber: 9
              }
            }))), driver = _render18.driver;
            _context24.t0 = expect;
            _context24.next = 4;
            return driver.primaryActionButtonPrefixIconExists();
          case 4:
            _context24.t1 = _context24.sent;
            (0, _context24.t0)(_context24.t1).toBe(true);
          case 6:
          case "end":
            return _context24.stop();
        }
      }, _callee24);
    })));
    it('should not add suffix icon to primary action', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee25() {
      var _render19, driver;
      return _regenerator["default"].wrap(function _callee25$(_context25) {
        while (1) switch (_context25.prev = _context25.next) {
          case 0:
            _render19 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(function () {}), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 356,
                columnNumber: 9
              }
            }))), driver = _render19.driver;
            _context25.t0 = expect;
            _context25.next = 4;
            return driver.primaryActionButtonSuffixIconExists();
          case 4:
            _context25.t1 = _context25.sent;
            (0, _context25.t0)(_context25.t1).toBe(false);
          case 6:
          case "end":
            return _context25.stop();
        }
      }, _callee25);
    })));
    it('should add suffix icon to primary action', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee26() {
      var _render20, driver;
      return _regenerator["default"].wrap(function _callee26$(_context26) {
        while (1) switch (_context26.prev = _context26.next) {
          case 0:
            _render20 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(function () {}, {
              suffixIcon: /*#__PURE__*/_react["default"].createElement(_wixUiIconsCommon.Edit, {
                __self: _this2,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 365,
                  columnNumber: 58
                }
              })
            }), {
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 364,
                columnNumber: 9
              }
            }))), driver = _render20.driver;
            _context26.t0 = expect;
            _context26.next = 4;
            return driver.primaryActionButtonSuffixIconExists();
          case 4:
            _context26.t1 = _context26.sent;
            (0, _context26.t0)(_context26.t1).toBe(true);
          case 6:
          case "end":
            return _context26.stop();
        }
      }, _callee26);
    })));
    describe('when a secondary action is disabled', function () {
      it('should mark the a visible secondary actions as disabled', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee27() {
        var actionTrigger, disabledAction, _render21, driver, firstVisibleActionButton;
        return _regenerator["default"].wrap(function _callee27$(_context27) {
          while (1) switch (_context27.prev = _context27.next) {
            case 0:
              actionTrigger = vi.fn();
              disabledAction = {
                text: "Disabled Action",
                icon: /*#__PURE__*/_react["default"].createElement("span", {
                  __self: _this2,
                  __source: {
                    fileName: _jsxFileName,
                    lineNumber: 378,
                    columnNumber: 17
                  }
                }, "Icon"),
                onClick: actionTrigger,
                disabled: true
              };
              _render21 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), {
                secondaryActions: [disabledAction],
                numOfVisibleSecondaryActions: 1,
                __self: _this2,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 384,
                  columnNumber: 11
                }
              }))), driver = _render21.driver;
              firstVisibleActionButton = driver.getVisibleActionButtonDriver(0);
              _context27.t0 = expect;
              _context27.next = 7;
              return firstVisibleActionButton.isButtonDisabled();
            case 7:
              _context27.t1 = _context27.sent;
              (0, _context27.t0)(_context27.t1).toBe(true);
              _context27.next = 11;
              return firstVisibleActionButton.click();
            case 11:
              expect(actionTrigger).not.toHaveBeenCalled();
            case 12:
            case "end":
              return _context27.stop();
          }
        }, _callee27);
      })));
      describe('when action is disabled', function () {
        describe('when disabledDescription is supplied', function () {
          var disabledDescription = 'disabled item description';
          it('should show the supplied description as tooltip', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee28() {
            var secondaryActions, _render22, driver, tooltipDriver;
            return _regenerator["default"].wrap(function _callee28$(_context28) {
              while (1) switch (_context28.prev = _context28.next) {
                case 0:
                  secondaryActions = [{
                    text: "Disabled Action",
                    icon: /*#__PURE__*/_react["default"].createElement("span", {
                      __self: _this2,
                      __source: {
                        fileName: _jsxFileName,
                        lineNumber: 405,
                        columnNumber: 23
                      }
                    }, "Icon"),
                    onClick: function onClick() {},
                    disabled: true,
                    disabledDescription: disabledDescription
                  }];
                  _render22 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), {
                    secondaryActions: secondaryActions,
                    numOfVisibleSecondaryActions: 1,
                    __self: _this2,
                    __source: {
                      fileName: _jsxFileName,
                      lineNumber: 413,
                      columnNumber: 15
                    }
                  }))), driver = _render22.driver;
                  _context28.next = 4;
                  return driver.getVisibleActionTooltipDriver(0);
                case 4:
                  tooltipDriver = _context28.sent;
                  _context28.next = 7;
                  return tooltipDriver.mouseEnter();
                case 7:
                  _context28.t0 = expect;
                  _context28.next = 10;
                  return tooltipDriver.getTooltipText();
                case 10:
                  _context28.t1 = _context28.sent;
                  (0, _context28.t0)(_context28.t1).toEqual(disabledDescription);
                case 12:
                case "end":
                  return _context28.stop();
              }
            }, _callee28);
          })));
          describe('when overriding tooltip content with tooltipProps', function () {
            it('should show the supplied content as tooltip', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee29() {
              var tooltipContent, secondaryActions, _render23, driver, tooltipDriver;
              return _regenerator["default"].wrap(function _callee29$(_context29) {
                while (1) switch (_context29.prev = _context29.next) {
                  case 0:
                    tooltipContent = 'Some custom tooltip content';
                    secondaryActions = [{
                      text: "Disabled Action",
                      icon: /*#__PURE__*/_react["default"].createElement("span", {
                        __self: _this2,
                        __source: {
                          fileName: _jsxFileName,
                          lineNumber: 434,
                          columnNumber: 25
                        }
                      }, "Icon"),
                      onClick: function onClick() {},
                      disabled: true,
                      disabledDescription: disabledDescription,
                      tooltipProps: {
                        content: tooltipContent
                      }
                    }];
                    _render23 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), {
                      secondaryActions: secondaryActions,
                      numOfVisibleSecondaryActions: 1,
                      __self: _this2,
                      __source: {
                        fileName: _jsxFileName,
                        lineNumber: 443,
                        columnNumber: 17
                      }
                    }))), driver = _render23.driver;
                    _context29.next = 5;
                    return driver.getVisibleActionTooltipDriver(0);
                  case 5:
                    tooltipDriver = _context29.sent;
                    _context29.next = 8;
                    return tooltipDriver.mouseEnter();
                  case 8:
                    _context29.t0 = expect;
                    _context29.next = 11;
                    return tooltipDriver.getTooltipText();
                  case 11:
                    _context29.t1 = _context29.sent;
                    (0, _context29.t0)(_context29.t1).toEqual(tooltipContent);
                  case 13:
                  case "end":
                    return _context29.stop();
                }
              }, _callee29);
            })));
          });
        });
        describe('when disabledDescription is not supplied', function () {
          it('should show action text as tooltip', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee30() {
            var actionText, secondaryActions, _render24, driver, tooltipDriver;
            return _regenerator["default"].wrap(function _callee30$(_context30) {
              while (1) switch (_context30.prev = _context30.next) {
                case 0:
                  actionText = "Disabled Action";
                  secondaryActions = [{
                    text: actionText,
                    icon: /*#__PURE__*/_react["default"].createElement("span", {
                      __self: _this2,
                      __source: {
                        fileName: _jsxFileName,
                        lineNumber: 466,
                        columnNumber: 23
                      }
                    }, "Icon"),
                    onClick: function onClick() {},
                    disabled: true
                  }];
                  _render24 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], (0, _extends2["default"])({}, primaryActionProps(), {
                    secondaryActions: secondaryActions,
                    numOfVisibleSecondaryActions: 1,
                    __self: _this2,
                    __source: {
                      fileName: _jsxFileName,
                      lineNumber: 473,
                      columnNumber: 15
                    }
                  }))), driver = _render24.driver;
                  _context30.next = 5;
                  return driver.getVisibleActionTooltipDriver(0);
                case 5:
                  tooltipDriver = _context30.sent;
                  _context30.next = 8;
                  return tooltipDriver.mouseEnter();
                case 8:
                  _context30.t0 = expect;
                  _context30.next = 11;
                  return tooltipDriver.getTooltipText();
                case 11:
                  _context30.t1 = _context30.sent;
                  (0, _context30.t0)(_context30.t1).toEqual(actionText);
                case 13:
                case "end":
                  return _context30.stop();
              }
            }, _callee30);
          })));
        });
      });
    });
    it('should set `getMoreActionsTooltipText` value [when] given', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee31() {
      var _render25, driver;
      return _regenerator["default"].wrap(function _callee31$(_context31) {
        while (1) switch (_context31.prev = _context31.next) {
          case 0:
            _render25 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], {
              moreActionsTooltipText: "More Actions",
              secondaryActions: [{
                text: 'Text',
                icon: /*#__PURE__*/_react["default"].createElement("span", {
                  __self: _this2,
                  __source: {
                    fileName: _jsxFileName,
                    lineNumber: 496,
                    columnNumber: 21
                  }
                }, "Icon"),
                onClick: function onClick() {}
              }],
              __self: _this2,
              __source: {
                fileName: _jsxFileName,
                lineNumber: 491,
                columnNumber: 9
              }
            })), driver = _render25.driver;
            _context31.t0 = expect;
            _context31.next = 4;
            return driver.getMoreActionsTooltipText();
          case 4:
            _context31.t1 = _context31.sent;
            (0, _context31.t0)(_context31.t1).toBe('More Actions');
          case 6:
          case "end":
            return _context31.stop();
        }
      }, _callee31);
    })));
    describe('primaryAction array format', function () {
      it('should render multiple primary actions when primaryAction is an array', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee32() {
        var _render26, driver;
        return _regenerator["default"].wrap(function _callee32$(_context32) {
          while (1) switch (_context32.prev = _context32.next) {
            case 0:
              _render26 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], {
                primaryAction: [{
                  text: 'Action 1',
                  onClick: function onClick() {},
                  priority: 'primary',
                  dataHook: 'action-1'
                }, {
                  text: 'Action 2',
                  onClick: function onClick() {},
                  priority: 'secondary',
                  dataHook: 'action-2'
                }],
                alwaysShowPrimaryActions: true,
                __self: _this2,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 509,
                  columnNumber: 11
                }
              })), driver = _render26.driver;
              _context32.t0 = expect;
              _context32.next = 4;
              return driver.getPrimaryActionsCount();
            case 4:
              _context32.t1 = _context32.sent;
              (0, _context32.t0)(_context32.t1).toBe(2);
            case 6:
            case "end":
              return _context32.stop();
          }
        }, _callee32);
      })));
      it('should render primary actions with visibility "onHover"', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee33() {
        var _render27, driver;
        return _regenerator["default"].wrap(function _callee33$(_context33) {
          while (1) switch (_context33.prev = _context33.next) {
            case 0:
              _render27 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], {
                primaryAction: [{
                  text: 'Action 1',
                  onClick: function onClick() {},
                  priority: 'primary',
                  dataHook: 'action-1'
                }, {
                  text: 'Action 2',
                  onClick: function onClick() {},
                  priority: 'secondary',
                  dataHook: 'action-2'
                }],
                alwaysShowPrimaryActions: false,
                __self: _this2,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 533,
                  columnNumber: 11
                }
              })), driver = _render27.driver;
              _context33.t0 = expect;
              _context33.next = 4;
              return driver.getPrimaryActionButtonVisibility();
            case 4:
              _context33.t1 = _context33.sent;
              (0, _context33.t0)(_context33.t1).toBe('onHover');
            case 6:
            case "end":
              return _context33.stop();
          }
        }, _callee33);
      })));
      it('should render primary actions with visibility "always"', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee34() {
        var _render28, driver;
        return _regenerator["default"].wrap(function _callee34$(_context34) {
          while (1) switch (_context34.prev = _context34.next) {
            case 0:
              _render28 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], {
                primaryAction: [{
                  text: 'Action 1',
                  onClick: function onClick() {},
                  priority: 'primary',
                  dataHook: 'action-1'
                }],
                alwaysShowPrimaryActions: true,
                __self: _this2,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 557,
                  columnNumber: 11
                }
              })), driver = _render28.driver;
              _context34.t0 = expect;
              _context34.next = 4;
              return driver.getPrimaryActionButtonVisibility();
            case 4:
              _context34.t1 = _context34.sent;
              (0, _context34.t0)(_context34.t1).toBe('always');
            case 6:
            case "end":
              return _context34.stop();
          }
        }, _callee34);
      })));
      it('should trigger primary actions onClick when clicked (array format)', /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee35() {
        var action1Trigger, action2Trigger, _render29, driver;
        return _regenerator["default"].wrap(function _callee35$(_context35) {
          while (1) switch (_context35.prev = _context35.next) {
            case 0:
              action1Trigger = vi.fn();
              action2Trigger = vi.fn();
              _render29 = render(/*#__PURE__*/_react["default"].createElement(_TableActionCell["default"], {
                primaryAction: [{
                  text: 'Action 1',
                  onClick: action1Trigger,
                  priority: 'primary',
                  dataHook: 'action-1'
                }, {
                  text: 'Action 2',
                  onClick: action2Trigger,
                  priority: 'secondary',
                  dataHook: 'action-2'
                }],
                alwaysShowPrimaryActions: true,
                __self: _this2,
                __source: {
                  fileName: _jsxFileName,
                  lineNumber: 578,
                  columnNumber: 11
                }
              })), driver = _render29.driver; // Click first primary action
              _context35.next = 5;
              return driver.clickPrimaryAction(0);
            case 5:
              expect(action1Trigger).toHaveBeenCalledTimes(1);
              expect(action2Trigger).toHaveBeenCalledTimes(0);

              // Click second primary action
              _context35.next = 9;
              return driver.clickPrimaryAction(1);
            case 9:
              expect(action1Trigger).toHaveBeenCalledTimes(1);
              expect(action2Trigger).toHaveBeenCalledTimes(1);
            case 11:
            case "end":
              return _context35.stop();
          }
        }, _callee35);
      })));
    });
  }
});