Skip to content

Commit

Permalink
render documentation link
Browse files Browse the repository at this point in the history
  • Loading branch information
mgiota committed Apr 13, 2022
1 parent b627b52 commit 55187e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function NoDataPrompt({
/>
</EuiButton>,
<EuiButtonEmpty color="primary">
<EuiLink href={documentationLink} target="_blank">
<EuiLink data-test-subj="documentationLink" href={documentationLink} target="_blank">
Documentation
</EuiLink>
</EuiButtonEmpty>,
Expand Down
11 changes: 8 additions & 3 deletions x-pack/plugins/observability/public/pages/rules/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1502,9 +1502,14 @@ describe('empty RulesPage', () => {
});
it('renders Create rule button', async () => {
await setup();
expect(wrapper.find('[data-test-subj="createFirstRuleButton"]').find('EuiButton')).toHaveLength(
1
);
expect(wrapper.find('EuiButton[data-test-subj="createFirstRuleButton"]')).toHaveLength(1);
});
it('renders Documentation link', async () => {
await setup();
expect(wrapper.find('EuiLink[data-test-subj="documentationLink"]')).toHaveLength(1);
expect(
wrapper.find('EuiLink[data-test-subj="documentationLink"]').getElement().props.href
).toContain('create-and-manage-rules.html');
});
});

Expand Down

0 comments on commit 55187e6

Please sign in to comment.