mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-19 13:06:22 +00:00
Updated babel packages and extracted babel config
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { shallow, ShallowWrapper } from 'enzyme';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { Button, ModalHeader } from 'reactstrap';
|
||||
import { Button, FormGroup, ModalHeader } from 'reactstrap';
|
||||
import { ShlinkDomain } from '../../../src/api/types';
|
||||
import { EditDomainRedirectsModal } from '../../../src/domains/helpers/EditDomainRedirectsModal';
|
||||
import { InfoTooltip } from '../../../src/utils/InfoTooltip';
|
||||
@@ -32,7 +32,7 @@ describe('<EditDomainRedirectsModal />', () => {
|
||||
});
|
||||
|
||||
it('expected amount of form groups and tooltips', () => {
|
||||
const formGroups = wrapper.find('FormGroup');
|
||||
const formGroups = wrapper.find(FormGroup);
|
||||
const tooltips = wrapper.find(InfoTooltip);
|
||||
|
||||
expect(formGroups).toHaveLength(3);
|
||||
@@ -50,7 +50,7 @@ describe('<EditDomainRedirectsModal />', () => {
|
||||
});
|
||||
|
||||
it('saves expected values when form is submitted', () => {
|
||||
const formGroups = wrapper.find('FormGroup');
|
||||
const formGroups = wrapper.find(FormGroup);
|
||||
|
||||
expect(editDomainRedirects).not.toHaveBeenCalled();
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { shallow, ShallowWrapper } from 'enzyme';
|
||||
import { FormGroup } from 'reactstrap';
|
||||
import { ServerForm } from '../../../src/servers/helpers/ServerForm';
|
||||
|
||||
describe('<ServerForm />', () => {
|
||||
@@ -13,7 +14,7 @@ describe('<ServerForm />', () => {
|
||||
afterEach(jest.resetAllMocks);
|
||||
|
||||
it('renders components', () => {
|
||||
expect(wrapper.find('FormGroup')).toHaveLength(3);
|
||||
expect(wrapper.find(FormGroup)).toHaveLength(3);
|
||||
expect(wrapper.find('span')).toHaveLength(1);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user