Files
remark42/frontend/app/components/input/input.test.tsx
T
Pavel MineevandUmputun c69e375e45 Add "simple view" mode (#502)
* Add "simple view" mode support

It just hide elements from view when SIMPLE_VIEW recived from server

* Fix typing and add ts check before push

* proper input styling

* Changes for frontend dev compose

* remove SIMPLE_VIEW from default settings for forntend dev
* add private compose to gitignore

* Added simpleView mode for replay and edit modes.

* `simpleView` changed to required param

* FIx border-width in reply form

* Fix border-width in editing mode
2020-01-04 01:31:06 -06:00

16 lines
564 B
TypeScript

/** @jsx createElement */
import { createElement } from 'preact';
import { shallow } from 'enzyme';
import { Input, Props } from './input';
describe('<Input />', () => {
it('shoud render without control panel, preview button, and rss links in "simple view" mode', () => {
const element = shallow(<Input {...({ simpleView: true } as Props)} />);
expect(element.exists('.input__control-panel')).toEqual(false);
expect(element.exists('.input__button_type_preview')).toEqual(false);
expect(element.exists('.input__rss')).toEqual(false);
});
});