Skip to content

Commit

Permalink
Merge pull request #432 from iCHEF/release/7.1.0
Browse files Browse the repository at this point in the history
Release/7.1.0
  • Loading branch information
Orcus2021 committed Apr 12, 2024
2 parents b0e3564 + bf37148 commit bf636c7
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 185 deletions.
13 changes: 12 additions & 1 deletion packages/core/src/mixins/__tests__/rowComp.test.js
@@ -1,5 +1,5 @@
import React from 'react';
import { render } from '@testing-library/react';
import { render, screen } from '@testing-library/react';
import { shallow } from 'enzyme';

import Icon from 'src/Icon';
Expand Down Expand Up @@ -146,3 +146,14 @@ it('takes defaults to its <RowComp> wrapper-component', () => {
expect(Comp.defaultProps.align).toBe('center');
expect(Comp.defaultProps.minified).toBeTruthy();
});

it('pass down disabled prop to wrapped component', () => {
const Input = ({ children, ...props }) => <input {...props} />;
const RowInput = rowComp()(Input);

render(<RowInput disabled />);

const wrapper = screen.getByRole('textbox');

expect(wrapper).toHaveAttribute('disabled');
});

0 comments on commit bf636c7

Please sign in to comment.