Test: add test for opening help window on articleForm (#4237)
This commit is contained in:
parent
580fd11bb9
commit
14c9adefd5
1 changed files with 9 additions and 0 deletions
|
|
@ -60,6 +60,15 @@ describe('<ArticleForm />', () => {
|
|||
form.find('.clear').simulate('click');
|
||||
expect(form.state().bodyMarkdown).toBe('');
|
||||
});
|
||||
|
||||
it('toggles help on help button press', () => {
|
||||
const form = deep(getArticleForm());
|
||||
global.scrollTo = jest.fn();
|
||||
form.find('.articleform__buttons--small').simulate('click', { preventDefault: () => {} });
|
||||
expect(form.state().helpShowing).toBe(true);
|
||||
form.find('.articleform__buttons--small').simulate('click', { preventDefault: () => {} });
|
||||
expect(form.state().helpShowing).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
const getArticleForm = () => (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue