[Maps] fix docvalue_fields·js functional test (#114527)
* [Maps] fix docvalue_fields·js functional test * remove unused * eslint * remove _type from check list, copied from 7.x branch and is not in 8.0 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
f88901c6ac
commit
c6b5136c3a
|
@ -15,7 +15,6 @@ export default function ({ getPageObjects, getService }) {
|
|||
describe.skip('docvalue_fields', () => {
|
||||
before(async () => {
|
||||
await security.testUser.setRoles(['global_maps_read', 'test_logstash_reader'], false);
|
||||
await PageObjects.maps.loadSavedMap('document example');
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
@ -46,11 +45,14 @@ export default function ({ getPageObjects, getService }) {
|
|||
it('should format date fields as epoch_millis when data driven styling is applied to a date field', async () => {
|
||||
await PageObjects.maps.loadSavedMap('document example with data driven styles on date field');
|
||||
const { rawResponse: response } = await PageObjects.maps.getResponse();
|
||||
const firstHit = response.hits.hits[0];
|
||||
expect(firstHit).to.only.have.keys(['_id', '_index', '_score', 'fields']);
|
||||
expect(firstHit.fields).to.only.have.keys(['@timestamp', 'bytes', 'geo.coordinates']);
|
||||
expect(firstHit.fields['@timestamp']).to.be.an('array');
|
||||
expect(firstHit.fields['@timestamp'][0]).to.eql('1442709321445');
|
||||
const targetHit = response.hits.hits.find((hit) => {
|
||||
return hit._id === 'AU_x3_g4GFA8no6QjkSR';
|
||||
});
|
||||
expect(targetHit).not.to.be(undefined);
|
||||
expect(targetHit).to.only.have.keys(['_id', '_index', '_score', 'fields']);
|
||||
expect(targetHit.fields).to.only.have.keys(['@timestamp', 'bytes', 'geo.coordinates']);
|
||||
expect(targetHit.fields['@timestamp']).to.be.an('array');
|
||||
expect(targetHit.fields['@timestamp'][0]).to.eql('1442709321445');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue