mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
chore: Replaces Icon with Icons component - iteration 1 (#14469)
This commit is contained in:
committed by
GitHub
parent
4e6169e0f9
commit
9deb7aa3c1
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user