Skip to content

Commit d0dcbaa

Browse files
committed
🧪 add unit test
1 parent 30c15a8 commit d0dcbaa

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/Tags.test.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,4 +574,14 @@ describe('Select.Tags', () => {
574574
});
575575
expect(onChange).not.toBeCalled();
576576
});
577+
578+
// https://github.com/ant-design/ant-design/issues/56587
579+
it('should not display placeholder', () => {
580+
const { container } = render(<Select mode="tags" placeholder="Select items" open={false} />);
581+
expect(container.querySelector('.rc-select-placeholder')).toBeTruthy();
582+
const input = container.querySelector<HTMLInputElement>('input');
583+
584+
fireEvent.change(input, { target: { value: '2' } });
585+
expect(container.querySelector('.rc-select-placeholder')).toBeFalsy();
586+
});
577587
});

0 commit comments

Comments
 (0)