[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:
parent
f27b6fef19
commit
1edda05813
|
@ -4,13 +4,6 @@
|
||||||
* you may not use this file except in compliance with the Elastic License.
|
* you may not use this file except in compliance with the Elastic License.
|
||||||
*/
|
*/
|
||||||
export const EMPTY_RESPONSE = {
|
export const EMPTY_RESPONSE = {
|
||||||
series: [
|
series: [],
|
||||||
{
|
|
||||||
id: '*',
|
|
||||||
keys: ['*'],
|
|
||||||
columns: [],
|
|
||||||
rows: [],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
info: { total: 0, afterKey: null, interval: 0 },
|
info: { total: 0, afterKey: null, interval: 0 },
|
||||||
};
|
};
|
||||||
|
|
|
@ -239,13 +239,7 @@ export default function ({ getService }: FtrProviderContext) {
|
||||||
.send(postBody)
|
.send(postBody)
|
||||||
.expect(200);
|
.expect(200);
|
||||||
const body = decodeOrThrow(metricsExplorerResponseRT)(response.body);
|
const body = decodeOrThrow(metricsExplorerResponseRT)(response.body);
|
||||||
expect(body.series).length(1);
|
expect(body.series).length(0);
|
||||||
expect(body.series[0]!).to.have.property('rows');
|
|
||||||
expect(body.series[0]!.rows).length(0);
|
|
||||||
expect(body.pageInfo).to.eql({
|
|
||||||
afterKey: null,
|
|
||||||
total: 0,
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
it('should work when there is no data with groupBy', async () => {
|
it('should work when there is no data with groupBy', async () => {
|
||||||
const postBody = {
|
const postBody = {
|
||||||
|
|
Loading…
Reference in a new issue