Skip to content

Commit

Permalink
Fix crawler documentation link
Browse files Browse the repository at this point in the history
  • Loading branch information
byronhulcher committed Jun 1, 2021
1 parent 0f3730b commit 5f5ef18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import React from 'react';

import { shallow, ShallowWrapper } from 'enzyme';

import { docLinks } from '../../../shared/doc_links';

import { CrawlerLanding } from './crawler_landing';

describe('CrawlerLanding', () => {
Expand All @@ -29,7 +31,7 @@ describe('CrawlerLanding', () => {
const externalDocumentationLink = wrapper.find('[data-test-subj="CrawlerDocumentationLink"]');

expect(externalDocumentationLink.prop('href')).toBe(
'https://www.elastic.co/guide/en/app-search/current/web-crawler.html'
`${docLinks.appSearchBase}/web-crawler.html`

This comment has been minimized.

Copy link
@cee-chen

cee-chen Jun 1, 2021

Contributor

[General testing best practice comment, not a change request at all] On a less static view with more actual logic going on, I might suggest just ditching this assertion altogether. Generally with straight pass-through stuff like this that isn't crucial to how the page actually works, I'd say it's not worth representing in a test. That being said the page is so simple that this doc link arguably is crucial to the page right now, so I'm definitely fine keeping it in - just wanted to mention it since it crossed my mind and I love talking about tests too much haha.

);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
import { i18n } from '@kbn/i18n';

import { getAppSearchUrl } from '../../../shared/enterprise_search_url';
import { ENGINE_CRAWLER_PATH } from '../../routes';
import { DOCS_PREFIX, ENGINE_CRAWLER_PATH } from '../../routes';
import { generateEnginePath } from '../engine';

import './crawler_landing.scss';
Expand Down Expand Up @@ -49,9 +49,8 @@ export const CrawlerLanding: React.FC = () => (
}
)}{' '}
<EuiLink
external
target="_blank"
href="https://www.elastic.co/guide/en/app-search/current/web-crawler.html"
href={`${DOCS_PREFIX}/web-crawler.html`}
data-test-subj="CrawlerDocumentationLink"
>
{i18n.translate(
Expand Down

0 comments on commit 5f5ef18

Please sign in to comment.