[Metrics UI] Inventory shows * node when there are no results (#78371)

* [Metrics UI] Inventory shows * node when there are no results

* fixing tests to handle the new behavoir
This commit is contained in:
Chris Cowan 2020-09-29 12:55:09 -07:00 committed by GitHub
parent f27b6fef19
commit 1edda05813
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 15 deletions

View file

@ -4,13 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
export const EMPTY_RESPONSE = {
series: [
{
id: '*',
keys: ['*'],
columns: [],
rows: [],
},
],
series: [],
info: { total: 0, afterKey: null, interval: 0 },
};

View file

@ -239,13 +239,7 @@ export default function ({ getService }: FtrProviderContext) {
.send(postBody)
.expect(200);
const body = decodeOrThrow(metricsExplorerResponseRT)(response.body);
expect(body.series).length(1);
expect(body.series[0]!).to.have.property('rows');
expect(body.series[0]!.rows).length(0);
expect(body.pageInfo).to.eql({
afterKey: null,
total: 0,
});
expect(body.series).length(0);
});
it('should work when there is no data with groupBy', async () => {
const postBody = {