diff --git a/src/core_plugins/getting_started/public/components/getting_started/getting_started.html b/src/core_plugins/getting_started/public/components/getting_started/getting_started.html index ee55b6728f5ed..963a2776a379c 100644 --- a/src/core_plugins/getting_started/public/components/getting_started/getting_started.html +++ b/src/core_plugins/getting_started/public/components/getting_started/getting_started.html @@ -1,7 +1,4 @@ -
+
{ - const kibanaServer = getService('kibanaServer'); - const esArchiver = getService('esArchiver'); - const remote = getService('remote'); - const log = getService('log'); - - const PageObjects = getPageObjects(['common', 'gettingStarted']); - - describe('Getting Started page', () => { - describe('when no index patterns exist', () => { - beforeEach(async () => { - // delete .kibana index and then wait for Kibana to re-create it - await esArchiver.unload('logstash_functional'); - await esArchiver.load('empty_kibana'); - }); - - describe('when user has not opted out of Getting Started page', () => { - beforeEach(async () => { - // First, we navigate to *somewhere* in Kibana so the browser loads up Kibana. This allows us... - await PageObjects.common.navigateToUrl('discover', ''); - - // ... to remove the Getting Started page opt-out flag from local storage for the Kibana domain - await remote.deleteLocalStorageItem('kibana.isGettingStartedOptedOut'); - }); - - it('redirects to the Getting Started page', async () => { - await PageObjects.common.navigateToUrl('discover', ''); - await PageObjects.common.waitUntilUrlIncludes('getting_started'); - const isLoaded = await PageObjects.gettingStarted.doesContainerExist(); - expect(isLoaded).to.be(true); - }); - }); - - describe('when user has opted out of Getting Started page', () => { - beforeEach(async () => { - await PageObjects.gettingStarted.optOut(); - }); - - it('does not redirect to the Getting Started page', async () => { - await PageObjects.common.navigateToUrl('discover', ''); - const isLoaded = await PageObjects.gettingStarted.doesContainerExist(); - expect(isLoaded).to.be(false); - }); - }); - - }); - - describe('when index patterns exist', () => { - beforeEach(async () => { - log.debug('load kibana index with default index pattern'); - await esArchiver.load('discover'); - await kibanaServer.uiSettings.replace({ - 'dateFormat:tz':'UTC', - 'defaultIndex':'logstash-*' - }); - }); - - it('does not redirect to the Getting Started page', async () => { - await PageObjects.common.navigateToUrl('discover', ''); - 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/apps/management/index.js b/test/functional/apps/management/index.js index a9c01555993ae..afaea2d42cff7 100644 --- a/test/functional/apps/management/index.js +++ b/test/functional/apps/management/index.js @@ -24,7 +24,6 @@ export default function ({ getService, loadTestFile }) { loadTestFile(require.resolve('./_scripted_fields')); loadTestFile(require.resolve('./_index_pattern_filter')); loadTestFile(require.resolve('./_scripted_fields_filter')); - loadTestFile(require.resolve('./_getting_started')); }); } diff --git a/test/functional/page_objects/getting_started_page.js b/test/functional/page_objects/getting_started_page.js index aca06aac9d33c..f875a66ac2aa3 100644 --- a/test/functional/page_objects/getting_started_page.js +++ b/test/functional/page_objects/getting_started_page.js @@ -1,11 +1,9 @@ -export function GettingStartedPageProvider({ getService, getPageObjects }) { +export function GettingStartedPageProvider({ getService }) { const log = getService('log'); const retry = getService('retry'); const testSubjects = getService('testSubjects'); - const PageObjects = getPageObjects(['common']); - class GettingStartedPage { async doesContainerExist() { return await testSubjects.exists('gettingStartedContainer'); @@ -20,11 +18,6 @@ export function GettingStartedPageProvider({ getService, getPageObjects }) { } }); } - - async navigateTo() { - log.debug('Navigating directly to Getting Started page'); - await PageObjects.common.navigateToUrl('settings', 'kibana/getting_started'); - } } return new GettingStartedPage();