Skip to content

Commit

Permalink
test(Tabs, Input): fix render tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Голубев Олег Игоревич authored and zhzz committed Apr 11, 2021
1 parent 4e3ae41 commit 0e0366e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/react-ui/components/Input/__tests__/Input-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { mount } from 'enzyme';
import MaskedInput from 'react-input-mask';

import { DEFAULT_THEME } from '../../../lib/theming/themes/DefaultTheme';
import { DEFAULT_THEME_8PX } from '../../../lib/theming/themes/DefaultTheme8px';
import { Input, InputProps } from '../Input';
import { jsStyles } from '../Input.styles';

Expand Down Expand Up @@ -46,12 +46,12 @@ describe('<Input />', () => {

it('applies error styles on error prop', () => {
const wrapper = render({ value: '', error: true });
expect(wrapper.find(`.${jsStyles.error(DEFAULT_THEME as any)}`)).toHaveLength(1);
expect(wrapper.find(`.${jsStyles.error(DEFAULT_THEME_8PX as any)}`)).toHaveLength(1);
});

it('applies warning styles on warning prop', () => {
const wrapper = render({ value: '', warning: true });
expect(wrapper.find(`.${jsStyles.warning(DEFAULT_THEME as any)}`)).toHaveLength(1);
expect(wrapper.find(`.${jsStyles.warning(DEFAULT_THEME_8PX as any)}`)).toHaveLength(1);
});

it('applies borderless styles on borderless prop', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-ui/components/Tabs/__tests__/Tabs-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('Tabs', () => {
</Tabs>,
);

expect(wrapper.find(Indicator).instance().state).toMatchObject({ styles: { top: -3, left: 0 } });
expect(wrapper.find(Indicator).instance().state).toMatchObject({ styles: { top: -2, left: 0 } });
});
});

Expand Down

0 comments on commit 0e0366e

Please sign in to comment.