Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@
import React from 'react';
import { shallow } from 'enzyme';

import { EuiCallOut, EuiButton } from '@elastic/eui';
import { EuiCallOut } from '@elastic/eui';

import { EuiLinkTo } from '../react_router_helpers';
import { EuiButtonTo } from '../react_router_helpers';

import { IndexingStatusErrors } from './indexing_status_errors';

describe('IndexingStatusErrors', () => {
it('renders', () => {
const wrapper = shallow(<IndexingStatusErrors viewLinkPath="/path" />);

expect(wrapper.find(EuiButton)).toHaveLength(1);
expect(wrapper.find(EuiCallOut)).toHaveLength(1);
expect(wrapper.find(EuiLinkTo)).toHaveLength(1);
expect(wrapper.find(EuiLinkTo).prop('to')).toEqual('/path');
expect(wrapper.find(EuiButtonTo)).toHaveLength(1);
expect(wrapper.find(EuiButtonTo).prop('to')).toEqual('/path');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import React from 'react';

import { EuiButton, EuiCallOut } from '@elastic/eui';
import { EuiCallOut } from '@elastic/eui';

import { EuiLinkTo } from '../react_router_helpers';
import { EuiButtonTo } from '../react_router_helpers';

import { INDEXING_STATUS_HAS_ERRORS_TITLE, INDEXING_STATUS_HAS_ERRORS_BUTTON } from './constants';

Expand All @@ -24,8 +24,9 @@ export const IndexingStatusErrors: React.FC<IIndexingStatusErrorsProps> = ({ vie
data-test-subj="IndexingStatusErrors"
>
<p>{INDEXING_STATUS_HAS_ERRORS_TITLE}</p>
<EuiButton color="danger" fill={true} size="s" data-test-subj="ViewErrorsButton">
<EuiLinkTo to={viewLinkPath}>{INDEXING_STATUS_HAS_ERRORS_BUTTON}</EuiLinkTo>
</EuiButton>

<EuiButtonTo to={viewLinkPath} color="danger" fill size="s" data-test-subj="ViewErrorsButton">
{INDEXING_STATUS_HAS_ERRORS_BUTTON}
</EuiButtonTo>
</EuiCallOut>
);