mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Guided onboarding] Fix home redirect when on Cloud (#145539)
This commit is contained in:
parent
8e1618ac90
commit
f0670b0a0e
5 changed files with 22 additions and 3 deletions
|
@ -21,6 +21,7 @@ exports[`getting started should render getting started component 1`] = `
|
|||
"toString": [Function],
|
||||
}
|
||||
}
|
||||
data-test-subj="onboarding--landing-page"
|
||||
hasShadow={true}
|
||||
>
|
||||
<EuiTitle
|
||||
|
|
|
@ -183,7 +183,12 @@ export const GettingStarted = () => {
|
|||
return (
|
||||
<KibanaPageTemplate panelled={false} grow>
|
||||
<EuiPageTemplate.Section alignment="center">
|
||||
<EuiPanel color="plain" hasShadow css={paddingCss}>
|
||||
<EuiPanel
|
||||
color="plain"
|
||||
hasShadow
|
||||
css={paddingCss}
|
||||
data-test-subj="onboarding--landing-page"
|
||||
>
|
||||
<EuiTitle size="l" className="eui-textCenter">
|
||||
<h1>{title}</h1>
|
||||
</EuiTitle>
|
||||
|
|
|
@ -198,7 +198,7 @@ export class Home extends Component<HomeProps, State> {
|
|||
if (isNewKibanaInstance) {
|
||||
if (isCloudEnabled) {
|
||||
application.navigateToUrl('./home#/getting_started');
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
return this.renderWelcome();
|
||||
}
|
||||
|
|
|
@ -13,9 +13,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const browser = getService('browser');
|
||||
const esArchiver = getService('esArchiver');
|
||||
const PageObjects = getPageObjects(['common', 'home']);
|
||||
const deployment = getService('deployment');
|
||||
|
||||
describe('Welcome interstitial', () => {
|
||||
before(async () => {
|
||||
beforeEach(async () => {
|
||||
// Need to navigate to page first to clear storage before test can be run
|
||||
await PageObjects.common.navigateToUrl('home', undefined);
|
||||
await browser.clearLocalStorage();
|
||||
|
@ -32,5 +33,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
expect(await PageObjects.home.isWelcomeInterstitialDisplayed()).to.be(true);
|
||||
await PageObjects.common.clickAndValidate('skipWelcomeScreen', 'homeApp');
|
||||
});
|
||||
|
||||
it('redirects to guided onboarding landing page when on Cloud', async () => {
|
||||
const isCloud = await deployment.isCloud();
|
||||
if (isCloud) {
|
||||
await PageObjects.common.navigateToUrl('home', '', { disableWelcomePrompt: false });
|
||||
expect(await PageObjects.home.isGuidedOnboardingLandingDisplayed()).to.be(true);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -45,6 +45,10 @@ export class HomePageObject extends FtrService {
|
|||
return await this.testSubjects.isDisplayed('homeWelcomeInterstitial');
|
||||
}
|
||||
|
||||
async isGuidedOnboardingLandingDisplayed() {
|
||||
return await this.testSubjects.isDisplayed('onboarding--landing-page');
|
||||
}
|
||||
|
||||
async getVisibileSolutions() {
|
||||
const solutionPanels = await this.testSubjects.findAll('~homSolutionPanel', 2000);
|
||||
const panelAttributes = await Promise.all(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue