chore: Replaces Icon with Icons component - iteration 1 (#14469)

This commit is contained in:
Michael S. Molina
2021-05-17 14:24:56 -03:00
committed by GitHub
parent 4e6169e0f9
commit 9deb7aa3c1
9 changed files with 79 additions and 86 deletions

View File

@@ -31,25 +31,25 @@ const defaultProps = {
options: { string: { column_name: 'Column' } },
};
test('renders with default props', () => {
test('renders with default props', async () => {
render(<DndSelectLabel {...defaultProps} />, { useDnd: true });
expect(screen.getByText('Drop columns')).toBeInTheDocument();
expect(await screen.findByText('Drop columns')).toBeInTheDocument();
});
test('renders ghost button when empty', () => {
test('renders ghost button when empty', async () => {
const ghostButtonText = 'Ghost button text';
render(
<DndSelectLabel {...defaultProps} ghostButtonText={ghostButtonText} />,
{ useDnd: true },
);
expect(screen.getByText(ghostButtonText)).toBeInTheDocument();
expect(await screen.findByText(ghostButtonText)).toBeInTheDocument();
});
test('renders values', () => {
test('renders values', async () => {
const values = 'Values';
const valuesRenderer = () => <span>{values}</span>;
render(<DndSelectLabel {...defaultProps} valuesRenderer={valuesRenderer} />, {
useDnd: true,
});
expect(screen.getByText(values)).toBeInTheDocument();
expect(await screen.findByText(values)).toBeInTheDocument();
});