From 1e86bfe2970647dceb64e3826a564754211056f9 Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Mon, 28 Sep 2020 15:37:35 +0200 Subject: [PATCH 1/4] Improve error message --- src/plugins/data/common/search/aggs/param_types/field.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/data/common/search/aggs/param_types/field.ts b/src/plugins/data/common/search/aggs/param_types/field.ts index 492294bdf4e5f..93e1baaebb308 100644 --- a/src/plugins/data/common/search/aggs/param_types/field.ts +++ b/src/plugins/data/common/search/aggs/param_types/field.ts @@ -84,7 +84,7 @@ export class FieldParamType extends BaseParamType { } const validField = this.getAvailableFields(aggConfig).find((f: any) => f.name === fieldName); - if (!validField) { + if (!validField || 1 === 1) { throw new Error( i18n.translate( 'data.search.aggs.paramTypes.field.invalidSavedFieldParameterErrorMessage', @@ -92,7 +92,7 @@ export class FieldParamType extends BaseParamType { defaultMessage: 'Saved {fieldParameter} parameter is now invalid. Please select a new field.', values: { - fieldParameter: '"field"', + fieldParameter: `"${fieldName}"`, }, } ) From d6914dcf13e820cd0b1a7c7918db88681bd96ba4 Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Mon, 28 Sep 2020 15:43:21 +0200 Subject: [PATCH 2/4] Remove debug code --- src/plugins/data/common/search/aggs/param_types/field.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/data/common/search/aggs/param_types/field.ts b/src/plugins/data/common/search/aggs/param_types/field.ts index 93e1baaebb308..35e363994430f 100644 --- a/src/plugins/data/common/search/aggs/param_types/field.ts +++ b/src/plugins/data/common/search/aggs/param_types/field.ts @@ -84,7 +84,7 @@ export class FieldParamType extends BaseParamType { } const validField = this.getAvailableFields(aggConfig).find((f: any) => f.name === fieldName); - if (!validField || 1 === 1) { + if (!validField) { throw new Error( i18n.translate( 'data.search.aggs.paramTypes.field.invalidSavedFieldParameterErrorMessage', From 3a4ea7230f5935a1d3f56cb948eb9b1884c7c14d Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Mon, 28 Sep 2020 16:03:19 +0200 Subject: [PATCH 3/4] Unskip test --- test/functional/apps/discover/_doc_navigation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/apps/discover/_doc_navigation.js b/test/functional/apps/discover/_doc_navigation.js index 31aef96918ffa..04b755cc85dc3 100644 --- a/test/functional/apps/discover/_doc_navigation.js +++ b/test/functional/apps/discover/_doc_navigation.js @@ -28,8 +28,8 @@ export default function ({ getService, getPageObjects }) { const esArchiver = getService('esArchiver'); const retry = getService('retry'); - // FLAKY: https://github.com/elastic/kibana/issues/78373 - describe.skip('doc link in discover', function contextSize() { + // eslint-disable-next-line mocha/no-exclusive-tests + describe.only('doc link in discover', function contextSize() { beforeEach(async function () { log.debug('load kibana index with default index pattern'); await esArchiver.loadIfNeeded('discover'); From 8d749032d09bd3ef7f16a3e6bef8d0865d9bc67b Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Wed, 30 Sep 2020 17:33:49 +0200 Subject: [PATCH 4/4] Remove describe.only --- test/functional/apps/discover/_doc_navigation.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/functional/apps/discover/_doc_navigation.js b/test/functional/apps/discover/_doc_navigation.js index 04b755cc85dc3..87a150c7d6961 100644 --- a/test/functional/apps/discover/_doc_navigation.js +++ b/test/functional/apps/discover/_doc_navigation.js @@ -28,8 +28,7 @@ export default function ({ getService, getPageObjects }) { const esArchiver = getService('esArchiver'); const retry = getService('retry'); - // eslint-disable-next-line mocha/no-exclusive-tests - describe.only('doc link in discover', function contextSize() { + describe('doc link in discover', function contextSize() { beforeEach(async function () { log.debug('load kibana index with default index pattern'); await esArchiver.loadIfNeeded('discover');