Skip to content

Commit

Permalink
fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes committed Sep 10, 2020
1 parent 30abf62 commit 4f93f5d
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,15 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext)
const response = await supertest.get(`/api/apm/service-map?start=${start}&end=${end}`);

expect(response.status).to.be(200);
const anomalies = response.body.elements.filter(
const dataWithAnomalies = response.body.elements.filter(
(el: { data: { serviceAnomalyStats?: {} } }) => !isEmpty(el.data.serviceAnomalyStats)
);
expect(anomalies).to.not.empty();
expect(dataWithAnomalies).to.not.empty();
dataWithAnomalies.forEach(({ data }: any) => {
expect(
Object.values(data.serviceAnomalyStats).filter((value) => isEmpty(value))
).to.not.empty();
});
});
});
});
Expand Down

0 comments on commit 4f93f5d

Please sign in to comment.