mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-05-08 20:50:14 +03:00
Extracted logic to render horizontal form groups to their own components
This commit is contained in:
parent
f6baedc655
commit
0aebaa4da1
3 changed files with 40 additions and 27 deletions
test/servers
|
@ -2,6 +2,7 @@ import React from 'react';
|
|||
import { shallow } from 'enzyme';
|
||||
import { identity } from 'ramda';
|
||||
import createServerConstruct from '../../src/servers/CreateServer';
|
||||
import { HorizontalFormGroup } from '../../src/utils/HorizontalFormGroup';
|
||||
|
||||
describe('<CreateServer />', () => {
|
||||
let wrapper;
|
||||
|
@ -28,9 +29,7 @@ describe('<CreateServer />', () => {
|
|||
it('renders components', () => {
|
||||
const wrapper = createWrapper();
|
||||
|
||||
expect(wrapper.find('#name')).toHaveLength(1);
|
||||
expect(wrapper.find('#url')).toHaveLength(1);
|
||||
expect(wrapper.find('#apiKey')).toHaveLength(1);
|
||||
expect(wrapper.find(HorizontalFormGroup)).toHaveLength(3);
|
||||
expect(wrapper.find(ImportServersBtn)).toHaveLength(1);
|
||||
expect(wrapper.find('.create-server__import-success-msg')).toHaveLength(0);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue