2020-08-16 00:27:22 +03:00
|
|
|
import React from 'react';
|
2024-04-08 00:04:45 +03:00
|
|
|
import TestRenderer from 'react-test-renderer/shallow';
|
|
|
|
import Dock from '../src/Dock.js';
|
2020-08-16 00:27:22 +03:00
|
|
|
|
|
|
|
describe('Dock component', function () {
|
|
|
|
it('should have shallow rendering', function () {
|
2024-04-08 00:04:45 +03:00
|
|
|
const renderer = TestRenderer.createRenderer();
|
2020-08-16 00:27:22 +03:00
|
|
|
const DockEl = <Dock />;
|
2020-08-24 07:37:43 +03:00
|
|
|
renderer.render(DockEl);
|
2020-08-16 00:27:22 +03:00
|
|
|
|
2020-08-24 07:37:43 +03:00
|
|
|
const result = renderer.getRenderOutput();
|
2020-08-16 00:27:22 +03:00
|
|
|
|
|
|
|
expect(DockEl.props).toEqual({
|
|
|
|
position: 'left',
|
|
|
|
zIndex: 99999999,
|
|
|
|
fluid: true,
|
|
|
|
defaultSize: 0.3,
|
|
|
|
dimMode: 'opaque',
|
|
|
|
duration: 200,
|
|
|
|
});
|
|
|
|
expect(result.type).toBe('div');
|
|
|
|
});
|
|
|
|
});
|