From 4ddbf7967660c2ad96ae570e7f0232dfa439814e Mon Sep 17 00:00:00 2001 From: Stacey Gammon Date: Tue, 26 May 2020 21:20:50 -0400 Subject: [PATCH] Batch explorer tests should be run in examples config --- .../bfetch_explorer/batched_function.ts | 5 ++--- .../test_suites => examples}/bfetch_explorer/index.ts | 6 +++--- test/examples/config.js | 1 + test/plugin_functional/config.js | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) rename test/{plugin_functional/test_suites => examples}/bfetch_explorer/batched_function.ts (93%) rename test/{plugin_functional/test_suites => examples}/bfetch_explorer/index.ts (86%) diff --git a/test/plugin_functional/test_suites/bfetch_explorer/batched_function.ts b/test/examples/bfetch_explorer/batched_function.ts similarity index 93% rename from test/plugin_functional/test_suites/bfetch_explorer/batched_function.ts rename to test/examples/bfetch_explorer/batched_function.ts index 25c5ba4a7ca3e92..3fe17169dde7e84 100644 --- a/test/plugin_functional/test_suites/bfetch_explorer/batched_function.ts +++ b/test/examples/bfetch_explorer/batched_function.ts @@ -18,15 +18,14 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../../functional/ftr_provider_context'; +import { FtrProviderContext } from '../../functional/ftr_provider_context'; +// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); - const appsMenu = getService('appsMenu'); describe('batchedFunction', () => { beforeEach(async () => { - await appsMenu.clickLink('bfetch explorer'); await testSubjects.click('count-until'); await testSubjects.click('double-integers'); }); diff --git a/test/plugin_functional/test_suites/bfetch_explorer/index.ts b/test/examples/bfetch_explorer/index.ts similarity index 86% rename from test/plugin_functional/test_suites/bfetch_explorer/index.ts rename to test/examples/bfetch_explorer/index.ts index a68a5090b9bed55..1eb5779037abfb1 100644 --- a/test/plugin_functional/test_suites/bfetch_explorer/index.ts +++ b/test/examples/bfetch_explorer/index.ts @@ -17,8 +17,9 @@ * under the License. */ -import { FtrProviderContext } from '../../../functional/ftr_provider_context'; +import { FtrProviderContext } from '../../functional/ftr_provider_context'; +// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects, loadTestFile }: FtrProviderContext) { const browser = getService('browser'); const appsMenu = getService('appsMenu'); @@ -27,8 +28,7 @@ export default function ({ getService, getPageObjects, loadTestFile }: FtrProvid describe('bfetch explorer', function () { before(async () => { await browser.setWindowSize(1300, 900); - await PageObjects.common.navigateToApp('settings'); - await appsMenu.clickLink('bfetch explorer'); + await PageObjects.common.navigateToApp('bfetch-explorer'); }); loadTestFile(require.resolve('./batched_function')); diff --git a/test/examples/config.js b/test/examples/config.js index aedd06c31d4137e..228af71a1f5d05e 100644 --- a/test/examples/config.js +++ b/test/examples/config.js @@ -27,6 +27,7 @@ export default async function ({ readConfigFile }) { testFiles: [ require.resolve('./search'), require.resolve('./embeddables'), + require.resolve('./bfetch_explorer'), require.resolve('./ui_actions'), require.resolve('./state_sync'), ], diff --git a/test/plugin_functional/config.js b/test/plugin_functional/config.js index 9039f7e734a6ee0..74d52b842662b20 100644 --- a/test/plugin_functional/config.js +++ b/test/plugin_functional/config.js @@ -37,7 +37,6 @@ export default async function ({ readConfigFile }) { require.resolve('./test_suites/embeddable_explorer'), require.resolve('./test_suites/core_plugins'), require.resolve('./test_suites/management'), - require.resolve('./test_suites/bfetch_explorer'), require.resolve('./test_suites/doc_views'), ], services: {