import React from 'react';
import '@testing-library/jest-dom/extend-expect';
import { render } from '@testing-library/react';
import { Link } from '../Link';
import { TabNav, TabNavItem } from '.';
describe('TabNav', function () {
  var wrapper;
  describe('with props', function () {
    beforeEach(function () {
      wrapper = render( /*#__PURE__*/React.createElement(TabNav, null, /*#__PURE__*/React.createElement(TabNavItem, {
        link: /*#__PURE__*/React.createElement(Link, {
          href: "/thing1"
        }, "Thing 1")
      }), /*#__PURE__*/React.createElement(TabNavItem, {
        link: /*#__PURE__*/React.createElement(Link, {
          href: "/thing2"
        }, "Thing 2"),
        isActive: true
      }), /*#__PURE__*/React.createElement(TabNavItem, {
        link: /*#__PURE__*/React.createElement(Link, {
          href: "/thing3"
        }, "Thing 3")
      })));
    });
    it('should render the tabs', function () {
      var tabs = wrapper.queryAllByTestId('tab-nav-tab');
      expect(tabs[0]).toHaveTextContent('Thing 1');
      expect(tabs[1]).toHaveTextContent('Thing 2');
      expect(tabs[2]).toHaveTextContent('Thing 3');
      expect(tabs).toHaveLength(3);
    });
  });
});