/* eslint-disable no-undef */
import React from 'react';
import { cleanup } from '@testing-library/react';
import testWrapper from '../helpers/testWrapper';
import Drawer from '../components/Drawer';
describe('Drawer component', () => {
afterEach(cleanup);
test('drawer content', () => {
const { getByText } = testWrapper(content);
expect(getByText('content').textContent).toBe('content');
});
test('close drawer', () => {
const { getByTestId } = testWrapper(content);
const ele = getByTestId('drawer');
const style = window.getComputedStyle(ele as HTMLElement);
expect(style.transform).toBe('translate(0,267px)');
});
test('open drawer', () => {
const { getByTestId } = testWrapper(content);
const ele = getByTestId('drawer');
const style = window.getComputedStyle(ele as HTMLElement);
expect(style.transform).toBe('translate(0,0)');
});
});