* [Home app] Fix `this` references * More readable if Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
This commit is contained in:
parent
8875ce2a9a
commit
cd5459a2a0
|
@ -117,7 +117,7 @@ export class Home extends Component<HomeProps, State> {
|
||||||
return this.props.directories.find((directory) => directory.id === id);
|
return this.props.directories.find((directory) => directory.id === id);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFeaturesByCategory(category: FeatureCatalogueCategory) {
|
private getFeaturesByCategory(category: FeatureCatalogueCategory) {
|
||||||
return this.props.directories
|
return this.props.directories
|
||||||
.filter((directory) => directory.showOnHomePage && directory.category === category)
|
.filter((directory) => directory.showOnHomePage && directory.category === category)
|
||||||
.sort((directoryA, directoryB) => (directoryA.order ?? -1) - (directoryB.order ?? -1));
|
.sort((directoryA, directoryB) => (directoryA.order ?? -1) - (directoryB.order ?? -1));
|
||||||
|
@ -177,7 +177,7 @@ export class Home extends Component<HomeProps, State> {
|
||||||
private renderWelcome() {
|
private renderWelcome() {
|
||||||
return (
|
return (
|
||||||
<Welcome
|
<Welcome
|
||||||
onSkip={this.skipWelcome}
|
onSkip={() => this.skipWelcome()}
|
||||||
urlBasePath={this.props.urlBasePath}
|
urlBasePath={this.props.urlBasePath}
|
||||||
telemetry={this.props.telemetry}
|
telemetry={this.props.telemetry}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -26,5 +26,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||||
await PageObjects.common.navigateToUrl('home', undefined, { disableWelcomePrompt: false });
|
await PageObjects.common.navigateToUrl('home', undefined, { disableWelcomePrompt: false });
|
||||||
expect(await PageObjects.home.isWelcomeInterstitialDisplayed()).to.be(true);
|
expect(await PageObjects.home.isWelcomeInterstitialDisplayed()).to.be(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('clicking on "Explore on my own" redirects to the "home" page', async () => {
|
||||||
|
await PageObjects.common.navigateToUrl('home', undefined, { disableWelcomePrompt: false });
|
||||||
|
expect(await PageObjects.home.isWelcomeInterstitialDisplayed()).to.be(true);
|
||||||
|
await PageObjects.common.clickAndValidate('skipWelcomeScreen', 'homeApp');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue