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
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ pageLoadAssetSize:
screenshotMode: 2351
screenshotting: 3252
searchAssistant: 6150
searchGettingStarted: 6600
searchGettingStarted: 7327
searchHomepage: 7962
searchIndices: 9991
searchInferenceEndpoints: 8071
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ export const CodeBox = ({ selectedLanguage, codeBlockLanguage }: Props) => {
}, [selectedExample, codeParams]);

return (
<EuiCodeBlock isCopyable fontSize="m" language={codeBlockLanguage} overflowHeight={700}>
<EuiCodeBlock
isCopyable
fontSize="m"
language={codeBlockLanguage}
overflowHeight={700}
data-test-subj="gettingStartedExampleCode"
>
{codeExample}
</EuiCodeBlock>
);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,82 @@ import {
EuiSpacer,
useCurrentEuiBreakpoint,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';

import { DocCallouts } from './doc_callouts';
import { footerLinks } from './footer_links';
import { docLinks } from '../../common/doc_links';
interface DocLinkItem {
id: string;
title: string;
description: string;
buttonLabel: string;
buttonHref: string;
dataTestSubj: string;
}

export const GettingStartedFooter = () => {
const currentBreakpoint = useCurrentEuiBreakpoint();

const footerLinks: DocLinkItem[] = [
{
id: 'searchLabs',
title: i18n.translate('xpack.gettingStarted.searchLabs.title', {
defaultMessage: 'Search Labs',
}),
description: i18n.translate('xpack.gettingStarted.searchLabs.description', {
defaultMessage:
'Explore the latest articles and tutorials on using Elasticsearch for AI/ML-powered search experiences.',
}),
buttonLabel: i18n.translate('xpack.gettingStarted.searchLabs.buttonText', {
defaultMessage: 'Visit Elasticsearch Labs',
}),
buttonHref: docLinks.visitSearchLabs,
dataTestSubj: 'gettingStartedSearchLabs',
},
{
id: 'pythonNotebooks',
title: i18n.translate('xpack.gettingStarted.pythonNotebooks.title', {
defaultMessage: 'Python notebooks',
}),
description: i18n.translate('xpack.gettingStarted.pythonNotebooks.description', {
defaultMessage:
'A range of executable Python notebooks available to easily test features in a virtual environment.',
}),
buttonLabel: i18n.translate('xpack.gettingStarted.pythonNotebooks.buttonText', {
defaultMessage: 'Browse our notebooks',
}),
buttonHref: docLinks.notebooksExamples,
dataTestSubj: 'gettingStartedOpenNotebooks',
},
{
id: 'elasticsearchDocs',
title: i18n.translate('xpack.gettingStarted.elasticsearchDocs.title', {
defaultMessage: 'Elasticsearch documentation',
}),
description: i18n.translate('xpack.gettingStarted.elasticsearchDocumentation.description', {
defaultMessage:
'Comprehensive reference material to help you learn, build, and deploy search solutions with Elasticsearch.',
}),
buttonLabel: i18n.translate('xpack.gettingStarted.elasticsearchDocumentation.buttonText', {
defaultMessage: 'View documentation',
}),
buttonHref: docLinks.elasticsearchDocs,
dataTestSubj: 'gettingStartedViewDocumentation',
},
];
return (
<>
<EuiHorizontalRule />
<EuiSpacer size="xxl" />
<EuiFlexGroup direction={currentBreakpoint === 'xl' ? 'row' : 'column'}>
{footerLinks.map((item) => (
<EuiFlexItem key={item.id} data-test-subj={`${item.id}Section`}>
<EuiFlexItem key={item.dataTestSubj} data-test-subj={item.dataTestSubj}>
<DocCallouts
title={item.title}
description={item.description}
buttonHref={item.buttonHref}
buttonLabel={item.buttonLabel}
dataTestSubj={item.dataTestSubj}
dataTestSubj={`${item.dataTestSubj}-btn`}
/>
</EuiFlexItem>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const SearchGettingStartedHeader: React.FC = () => {
<EuiFlexItem grow={false}>
<EuiButtonEmpty
aria-label={skipAndGoHomeLabel}
data-test-subj="elasticLLMCostsTourCloseBtn"
data-test-subj="skipAndGoHomeBtn"
onClick={() => {
application.navigateToApp(SEARCH_HOMEPAGE);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ export const SearchGettingStartedPage: React.FC = () => {

return (
<SearchGettingStartedPageTemplate>
<EuiPageTemplate.Section paddingSize="xl" grow={false}>
<EuiPageTemplate.Section data-test-subj="gettingStartedHeader" paddingSize="xl" grow={false}>
<SearchGettingStartedHeader />
</EuiPageTemplate.Section>
<EuiPageTemplate.Section paddingSize="xl">
<EuiPageTemplate.Section data-test-subj="gettingStartedConsoleTutorials" paddingSize="xl">
<ConsoleTutorialsGroup />
</EuiPageTemplate.Section>
<EuiPageTemplate.Section data-test-subj="gettingStartedCodeExamples">
<SearchGettingStartedConnectCode />
</EuiPageTemplate.Section>
<EuiPageTemplate.Section>
<EuiPageTemplate.Section data-test-subj="gettingStartedFooter">
<GettingStartedFooter />
</EuiPageTemplate.Section>
</SearchGettingStartedPageTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export const ConsoleTutorialsGroup = () => {
onClick={() => {
tutorial.buttonRef.current?.click();
}}
data-test-subj={tutorial.dataTestSubj}
footer={
<TryInConsoleButton
type="button"
Expand All @@ -124,7 +125,7 @@ export const ConsoleTutorialsGroup = () => {
sharePlugin={share}
consolePlugin={consolePlugin}
telemetryId={tutorial.dataTestSubj}
data-test-subj={tutorial.dataTestSubj}
data-test-subj={`${tutorial.dataTestSubj}-btn`}
buttonProps={{ buttonRef: tutorial.buttonRef }}
content={
<FormattedMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import type {
SearchGettingStartedAppPluginStartDependencies,
SearchGettingStartedServicesContextDeps,
} from './types';
import { docLinks } from './common/doc_links';

export class SearchGettingStartedPlugin
implements
Expand Down Expand Up @@ -49,6 +50,7 @@ export class SearchGettingStartedPlugin
async mount({ element, history }: AppMountParameters) {
const { renderApp } = await import('./application');
const [coreStart, depsStart] = await core.getStartServices();
docLinks.setDocLinks(coreStart.docLinks.links);
const services: SearchGettingStartedServicesContextDeps = {
...depsStart,
history,
Expand Down
9 changes: 9 additions & 0 deletions x-pack/solutions/search/test/functional_search/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
searchInferenceEndpoints: {
pathname: '/app/elasticsearch/relevance/inference_endpoints',
},
searchOverview: {
pathname: '/app/elasticsearch/overview',
},
searchHomepage: {
pathname: '/app/elasticsearch/home',
},
searchGettingStarted: {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I defined this in the base config instead of the feature flag config because it will need to be added here anyway once the FF is removed

pathname: '/app/elasticsearch/getting_started',
},
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
'--xpack.spaces.defaultSolution=es', // Default to Search Solution
`--uiSettings.overrides.searchPlayground:searchModeEnabled=true`,
`--uiSettings.overrides.agentBuilder:enabled=true`,
'--uiSettings.overrides.hideAnnouncements=true',
'--feature_flags.overrides.searchSolution.gettingStartedEnabled=true',
],
},
// load tests in the index file
testFiles: [require.resolve('../index.feature_flags.ts')],
apps: {
...searchFuncationalConfig.get('apps'),
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ export default ({ loadTestFile }: FtrProviderContext): void => {
loadTestFile(require.resolve('./apps/shared/solution_tour'));
// add tests that require feature flags, defined in config.feature_flags.ts
loadTestFile(require.resolve('./tests/agent_builder'));
loadTestFile(require.resolve('./tests/search_getting_started'));
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ export function SearchNavigationProvider({ getService, getPageObjects }: FtrProv
});
});
},
async navigateToElasticsearchSearchGettingStartedPage(basePath?: string) {
await retry.tryForTime(60 * 1000, async () => {
await common.navigateToApp('searchGettingStarted', {
shouldLoginIfPrompted: false,
basePath,
});
});
},
async navigateToIndexDetailPage(indexName: string) {
await solutionNavigation.sidenav.expectLinkExists({ navId: 'data_management' });
await solutionNavigation.sidenav.clickLink({
Expand Down
Loading