"use strict";

var _jsxRuntime = require("react/jsx-runtime");

var _enzyme = require("enzyme");

var _Drawer = require("../Drawer");

describe('Drawer specs', function () {
  test('should be rendered opened if open is set to true', function () {
    var drawer = (0, _enzyme.mount)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Drawer.Drawer, {
      open: true,
      children: "Hello!"
    }));
    var expected = true;
    var actual = drawer.prop('open');
    expect(actual).toBe(expected);
  });
  test('should not be rendered if open is set to false', function () {
    var drawer = (0, _enzyme.mount)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Drawer.Drawer, {
      open: false,
      children: "Hello!"
    }));
    var expected = false;
    var actual = drawer.prop('open');
    expect(actual).toBe(expected);
  });
  test('should apply \'shown\' class when visible', function () {
    var subject = (0, _enzyme.mount)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Drawer.DrawerBase, {
      open: true
    }));
    var expected = 'shown';
    var actual = subject.find('div').at(0).prop('className');
    expect(actual).toContain(expected);
  });
  test('should apply \'ease-in-out\' class when noAnimation is false', function () {
    var subject = (0, _enzyme.mount)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Drawer.DrawerBase, {
      open: true,
      noAnimation: false
    }));
    var expected = 'ease-in-out';
    var actual = subject.find('div').at(0).prop('className');
    expect(actual).toContain(expected);
  });
});