Skip to content

Commit

Permalink
test: jest case for #33692
Browse files Browse the repository at this point in the history
  • Loading branch information
hydraZty committed Jan 13, 2022
1 parent c59097a commit 9c1f39a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions components/input/__tests__/index.test.js
Expand Up @@ -97,6 +97,18 @@ describe('prefix and suffix', () => {
expect(wrapper.getDOMNode().className.includes('my-class-name')).toBe(true);
expect(wrapper.find('input').getDOMNode().className.includes('my-class-name')).toBe(false);
});

it('should support hidden when has prefix or suffix', () => {
const wrapper = mount(
<>
<Input prefix="prefix" hidden className="prefix-with-hidden" />
<Input suffix="suffix" hidden className="suffix-with-hidden" />
</>,
);

expect(wrapper.find('.prefix-with-hidden').at(0).getDOMNode().hidden).toBe(true);
expect(wrapper.find('.suffix-with-hidden').at(0).getDOMNode().hidden).toBe(true);
});
});

describe('As Form Control', () => {
Expand Down

0 comments on commit 9c1f39a

Please sign in to comment.