From 0b02e38bff12e6864f1dea0e81bd3d9bcf714e0b Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Fri, 24 Jun 2016 09:41:43 -0700 Subject: [PATCH] Fix unit tests to use stored_fields instead of fields ES param. --- .../__tests__/pattern_review_step.js | 16 ++++++++-------- .../__tests__/_get_computed_fields.js | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/plugins/kibana/public/management/sections/indices/add_data_steps/pattern_review_step/__tests__/pattern_review_step.js b/src/plugins/kibana/public/management/sections/indices/add_data_steps/pattern_review_step/__tests__/pattern_review_step.js index 9d9cadae9e569..8e5e1861c65e1 100644 --- a/src/plugins/kibana/public/management/sections/indices/add_data_steps/pattern_review_step/__tests__/pattern_review_step.js +++ b/src/plugins/kibana/public/management/sections/indices/add_data_steps/pattern_review_step/__tests__/pattern_review_step.js @@ -14,7 +14,7 @@ describe('pattern review directive', function () { describe('handling geopoints', function () { - it('should detect geo_point fields when they\'re expressed as an object', function () { + it('should detect geo_point stored_fields when they\'re expressed as an object', function () { const scope = $rootScope.$new(); scope.sampleDoc = { geoip: { @@ -29,10 +29,10 @@ describe('pattern review directive', function () { scope.$digest(); expect(scope).to.have.property('indexPattern'); - expect(scope.indexPattern.fields[0].type).to.be('geo_point'); + expect(scope.indexPattern.stored_fields[0].type).to.be('geo_point'); }); - it('should not count the lat and lon properties as their own fields', function () { + it('should not count the lat and lon properties as their own stored_fields', function () { const scope = $rootScope.$new(); scope.sampleDoc = { geoip: { @@ -47,14 +47,14 @@ describe('pattern review directive', function () { scope.$digest(); expect(scope).to.have.property('indexPattern'); - expect(scope.indexPattern.fields[0].type).to.be('geo_point'); - expect(scope.indexPattern.fields.length).to.be(1); + expect(scope.indexPattern.stored_fields[0].type).to.be('geo_point'); + expect(scope.indexPattern.stored_fields.length).to.be(1); }); }); - describe('detecting date fields', function () { + describe('detecting date stored_fields', function () { - it('should detect sample strings in ISO 8601 format as date fields', function () { + it('should detect sample strings in ISO 8601 format as date stored_fields', function () { const scope = $rootScope.$new(); scope.sampleDoc = { isodate: '2004-03-08T00:05:49.000Z' @@ -64,7 +64,7 @@ describe('pattern review directive', function () { scope.$digest(); expect(scope).to.have.property('indexPattern'); - expect(scope.indexPattern.fields[0].type).to.be('date'); + expect(scope.indexPattern.stored_fields[0].type).to.be('date'); }); }); diff --git a/src/ui/public/index_patterns/__tests__/_get_computed_fields.js b/src/ui/public/index_patterns/__tests__/_get_computed_fields.js index bd03519dea951..3641a0e467e1b 100644 --- a/src/ui/public/index_patterns/__tests__/_get_computed_fields.js +++ b/src/ui/public/index_patterns/__tests__/_get_computed_fields.js @@ -23,11 +23,11 @@ describe('get computed fields', function () { }); it('should request all stored fields', function () { - expect(fn().fields).to.contain('*'); + expect(fn().storedFields).to.contain('*'); }); it('should request _source seperately', function () { - expect(fn().fields).to.contain('_source'); + expect(fn().storedFields).to.contain('_source'); }); it('should request date fields as fielddata_fields', function () {