/**
* External dependencies
*/
import { render } from '@testing-library/react';
/**
* Internal dependencies
*/
import SetupNotice, { setupErrorTypes } from '../';
describe( 'SetupNotice', () => {
it( 'should be hidden for no error', () => {
const { container } = render( );
expect( container ).toBeEmptyDOMElement();
} );
it( 'should show default message for unset error', () => {
const { getByText } = render( );
expect(
getByText(
'Unable to set up the plugin. Refresh the page and try again.'
)
).toHaveClass( 'wc-admin-shipping-banner-install-error' );
} );
it( 'should show download message for download error', () => {
const { getByText } = render(
);
expect(
getByText(
'Unable to download the plugin. Refresh the page and try again.'
)
).toHaveClass( 'wc-admin-shipping-banner-install-error' );
} );
} );