import React from 'react';
import { screen } from '@testing-library/react';
import { renderInAppContext } from '@theorchard/suite-testing';
import EntityBulkEditApplyButton from 'src/components/contract-bulk-edit/common/entity-bulk-edit-apply-button';

describe('<EntityBulkEditApplyButton>', () => {
    const renderComponent = (
        p: React.ComponentProps<typeof EntityBulkEditApplyButton>
    ) => renderInAppContext(<EntityBulkEditApplyButton {...p} />);

    it('should render the Apply button', () => {
        renderComponent({ onApply: jest.fn(), isLoading: false });
        expect(
            screen.getByRole('button', { name: 'Apply' })
        ).toBeInTheDocument();
    });
});
