From 5351e614e10d9ba6355ea309e1f17be2ce234eda Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Wed, 17 May 2017 17:08:14 -0700 Subject: [PATCH] Adding test for nav being shown --- test/functional/apps/management/_getting_started.js | 11 +++++++++++ test/functional/page_objects/common_page.js | 4 ++++ test/functional/page_objects/getting_started_page.js | 11 ----------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/test/functional/apps/management/_getting_started.js b/test/functional/apps/management/_getting_started.js index 3005dfdb8b5ab37..222d04963ddafcb 100644 --- a/test/functional/apps/management/_getting_started.js +++ b/test/functional/apps/management/_getting_started.js @@ -59,6 +59,17 @@ export default ({ getService, getPageObjects }) => { const isLoaded = await PageObjects.gettingStarted.doesContainerExist(); expect(isLoaded).to.be(false); }); + + describe('when a user directly navigates to the Getting Started page', () => { + beforeEach(async () => { + await PageObjects.gettingStarted.navigateTo(); + }); + + it('the kibana chrome (which contains the global nav) is visible', async () => { + const isChromeVisible = await PageObjects.common.isChromeVisible(); + expect(isChromeVisible).to.be(true); + }); + }); }); }); }; \ No newline at end of file diff --git a/test/functional/page_objects/common_page.js b/test/functional/page_objects/common_page.js index 0870718cfe55b03..e7d122efef2abae 100644 --- a/test/functional/page_objects/common_page.js +++ b/test/functional/page_objects/common_page.js @@ -273,6 +273,10 @@ export function CommonPageProvider({ getService, getPageObjects, getPageObject } log.debug(`exists? ${exists}`); return exists; } + + async isChromeVisible() { + return await testSubjects.exists('kibanaChrome'); + } } return new CommonPage(); diff --git a/test/functional/page_objects/getting_started_page.js b/test/functional/page_objects/getting_started_page.js index ae92e00fb66ff2f..aca06aac9d33c8c 100644 --- a/test/functional/page_objects/getting_started_page.js +++ b/test/functional/page_objects/getting_started_page.js @@ -21,21 +21,10 @@ export function GettingStartedPageProvider({ getService, getPageObjects }) { }); } - async optOutLinkExists() { - log.debug('Checking if opt-out link exists'); - return await testSubjects.exists('lnkGettingStartedOptOut'); - } - async navigateTo() { log.debug('Navigating directly to Getting Started page'); await PageObjects.common.navigateToUrl('settings', 'kibana/getting_started'); } - - async optOut() { - log.debug('Opting out of Getting Started page'); - await this.navigateTo(); - await this.clickOptOutLink(); - } } return new GettingStartedPage();