import React from 'react';
import { render, screen } from '@testing-library/react';
import { NoData as NoDataIcon } from '../icons';
import { SidePanelEmptyState } from './SidePanelEmptyState';
describe('SidePanelEmptyState test', function () {
    it('should render correct default state', function () {
        render(React.createElement(SidePanelEmptyState, { text: "test" }));
        expect(screen.getByText('test')).toBeInTheDocument();
        expect(screen.getByTestId('SvgAttributesList')).toBeInTheDocument();
        expect(screen.queryByTestId('empty-state-secondary-text')).not.toBeInTheDocument();
    });
    it('should render icon passed in IconRenderer', function () {
        render(React.createElement(SidePanelEmptyState, { IconRenderer: NoDataIcon, text: "test" }));
        expect(screen.getByText('test')).toBeInTheDocument();
        expect(screen.getByTestId('SvgNoData')).toBeInTheDocument();
        expect(screen.queryByTestId('empty-state-secondary-text')).not.toBeInTheDocument();
    });
    it('should render secondary text', function () {
        render(React.createElement(SidePanelEmptyState, { text: "test", secondaryText: "secondaryTest" }));
        expect(screen.getByText('test')).toBeInTheDocument();
        expect(screen.getByText('secondaryTest')).toBeInTheDocument();
        expect(screen.getByTestId('SvgAttributesList')).toBeInTheDocument();
    });
});
